Return-Path: X-Original-To: apmail-openoffice-dev-archive@www.apache.org Delivered-To: apmail-openoffice-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BAE110422 for ; Sun, 2 Jun 2013 09:52:13 +0000 (UTC) Received: (qmail 9793 invoked by uid 500); 2 Jun 2013 09:52:11 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 9436 invoked by uid 500); 2 Jun 2013 09:52:11 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 9423 invoked by uid 99); 2 Jun 2013 09:52:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 09:52:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rajaths.rajaths@gmail.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-ob0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 09:52:03 +0000 Received: by mail-ob0-f169.google.com with SMTP id up14so5664183obb.0 for ; Sun, 02 Jun 2013 02:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pikSqyc09Dgk5J3pAY2vAcB3oe/UK2338WnJSBCUBQQ=; b=g2uuHusXT1DuFf7a+7wlKuK2mlfMvIqBXtID8gQfCIGRiN2A/Mz6QDpcX47kNmKE0f HD6AUyO7+k8ySe6foc1Bj/rpFkxqWsJutd5vRCesgRBtD4/7KQNjl930VHIAkIEwfYmM MRT4wkvqlaUmsT12ehroSw7WWImHoezFizaNCBHvlHM4CPdoCvIiFrodL3IAbHOGOveV toXMNZKsxP9XbdHHn58lemPFBRWm9NsgQ+rDserprhuCigjxV0u90uL5NkBsEIk/198g NPb97jZ2D4qzE501dpNrxqkMLMgF0H3DYkU26dM3APDArt7nRXAwQUutN5MlZLWSTlDq EUmA== MIME-Version: 1.0 X-Received: by 10.182.220.161 with SMTP id px1mr8362856obc.82.1370166702557; Sun, 02 Jun 2013 02:51:42 -0700 (PDT) Received: by 10.76.68.196 with HTTP; Sun, 2 Jun 2013 02:51:42 -0700 (PDT) In-Reply-To: References: <51A8B8E2.8030305@gmail.com> <20130531170425.GA30601@localhost> <20130531203437.GB558@localhost> <20130601170422.GA29141@localhost> <20130602003630.GA17728@localhost> <20130602063606.GC17728@localhost> Date: Sun, 2 Jun 2013 15:21:42 +0530 Message-ID: Subject: Re: CMIS UCP From: Rajath Shashidhara To: dev Content-Type: multipart/alternative; boundary=001a11c2f31896d48a04de28cbbe X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2f31896d48a04de28cbbe Content-Type: text/plain; charset=ISO-8859-1 Hello, I think there is a bug in OpenOffice 4. Tools->Options->Security. Macro Security Button link is broken. On Sun, Jun 2, 2013 at 2:03 PM, Rajath Shashidhara < rajaths.rajaths@gmail.com> wrote: > Hello, > > Sorry for asking too many questions. > The method execute in the XContent implementation class I have created, > which has parameters: com.sun.star.ucb.Command aCommand, int CommandId, > com.sun.star.ucb.XCommandEnvironment Environment > > now aCommand object has three attributes: > Name,handle,argument > > So if trying to get Metadata. we use command as getPropertyValues. > "getPropertyValues" is the name of the command, > argument -> which property to get. > What is handle? > > Also what is commandid? Any enumeration to represent various commandids? > > > > On Sun, Jun 2, 2013 at 12:06 PM, Ariel Constenla-Haile > wrote: > >> >> Hi Rajath, >> >> On Sun, Jun 02, 2013 at 09:58:56AM +0530, Rajath Shashidhara wrote: >> > Hello, >> > >> > Now that I have added a UNO Object of IDL type Content, there are some >> > methods that need to be implemented. >> > Out of which, com.sun.star.ucb.XContentIdentifier getIdentifier() is >> one of >> > them. >> > I have read the api reference for XContentIdentifier. >> > >> > It needs XComponentContext as an argument for its constructor. >> >> XContentIdentifier is a class, it does not have constructor. >> >> http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/XContentIdentifier.html >> >> >> > That can be obtained from the argument to the constructor of my UCP >> class. >> > But, my question is what is identifier? >> > Is it the name of the file/folder ? >> > Also, the second method, getContentProviderScheme() >> > does it refer to the way of writing the path as cmis:// ? >> >> At the beginning you can simply use the default implementation. Try the >> following macro in an office installation without your extension, it >> will return cmis as schema is the identifier starts with cmis:// >> >> >> REM ***** BASIC ***** >> >> Option Explicit >> >> Sub Main >> Dim aMap as Object >> aMap = >> com.sun.star.container.EnumerableMap.create("string","com.sun.star.ucb.XContentIdentifier") >> >> Dim oUCB as Object >> oUCB = CreateUnoService("com.sun.star.ucb.UniversalContentBroker") >> >> Dim sIds() >> sIds = Array(_ >> "file:///tmp",_ >> "http://www.openoffice.org",_ >> "ftp://demo@openoffice.org/test/dummy",_ >> "cmis://cmis.alfresco.com:80/cmisatom/" ) >> Dim sId$ >> For Each sId in sIds >> aMap.put( sId, oUCB.createContentIdentifier( sId ) ) >> Next >> >> Dim oEnum as Object >> oEnum = aMap.createElementEnumeration(false) >> While oEnum.hasMoreElements() >> Dim oPair as Object >> oPair = oEnum.nextElement() >> MsgBox "URL: " + oPair.First + Chr(13) + _ >> "Content ID: " + oPair.Second.getContentIdentifier() + >> Chr(13) + _ >> "Content Scheme: " + >> oPair.Second.getContentProviderScheme() >> Wend >> End Sub >> >> >> If you want to implement the content identifier yourself, just create >> a class that implements XContentIdentifier. >> >> And simply reuse the XContentIdentifier you get in queryContent(): >> >> public XContent queryContent(XContentIdentifier xIdentifier) throws >> IllegalIdentifierException { >> if (!isValidIdentifier(xIdentifier)) { >> throw new IllegalIdentifierException(); >> } >> // Check if a content with given XContentIdentifier already exists >> // TODO implement a cache mechanism, for example a hash map >> // Key: xIdentifier.getContentIdentifier() >> // Value: xIdentifier >> XContent xRet = queryExistingContent(xIdentifier); >> if (xRet != null) { >> return xRet; >> } >> >> CMISContent aContent = new CMISContent(m_xContext, xIdentifier); >> // cache the new content >> registerNewContent(aContent); >> >> return aContent; >> } >> >> >> Regards >> -- >> Ariel Constenla-Haile >> La Plata, Argentina >> > > > > -- > Rajath S, > M.Sc(Hons.) Physics, > Birla Institute of Technology and Science - Pilani, > Pilani > -- Rajath S, M.Sc(Hons.) Physics, Birla Institute of Technology and Science - Pilani, Pilani --001a11c2f31896d48a04de28cbbe--