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 7B42E1056F for ; Sun, 2 Jun 2013 20:26:15 +0000 (UTC) Received: (qmail 81693 invoked by uid 500); 2 Jun 2013 20:26:12 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 81619 invoked by uid 500); 2 Jun 2013 20:26:12 -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 81611 invoked by uid 99); 2 Jun 2013 20:26:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 20:26:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ariel.constenla.haile@gmail.com designates 209.85.128.43 as permitted sender) Received: from [209.85.128.43] (HELO mail-qe0-f43.google.com) (209.85.128.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 20:26:06 +0000 Received: by mail-qe0-f43.google.com with SMTP id k5so1909860qej.2 for ; Sun, 02 Jun 2013 13:25:46 -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=tKBdjhDwqjJM1RdwRre4+OCVoaQnU7M2Y7BoJ9OdGpk=; b=Ew8ddybqfHrTCw9SBd5/HJVjA4AaHjzySTkkwppYvL6BmJGI0k7Q0zaV0551g/g+Cd 6mJ6WpEEXvSsps1IHji/cbataEWJm8dFKoxuTqHU/T0qH+5WmoGGUO7ugctKjvYcLPEJ 31OvczwwP/7NFX44Jpf9YMhSeqsVBijbDkDoLWXnk0PThEB4ijYWik8jMUVCno6z3Vt1 c9C3WnU08DvQYcGMP+xN9JL77o+qqXxTEA+H8YzC8OrP1vwZnCzFlB5BG9b9p+Y/rTPa L4XmNlSRdLqt8m6VQ47Pi2p5kuiVSAVvAh1kF/smEbOLYWUaG6JApGZZPrPNwXK8gRDF Q44w== MIME-Version: 1.0 X-Received: by 10.229.173.1 with SMTP id n1mr3809381qcz.76.1370204746181; Sun, 02 Jun 2013 13:25:46 -0700 (PDT) Received: by 10.229.117.4 with HTTP; Sun, 2 Jun 2013 13:25:46 -0700 (PDT) In-Reply-To: References: <20130531203437.GB558@localhost> <20130601170422.GA29141@localhost> <20130602003630.GA17728@localhost> <20130602063606.GC17728@localhost> <20130602102009.GB4979@localhost> Date: Sun, 2 Jun 2013 17:25:46 -0300 Message-ID: Subject: Fwd: CMIS UCP From: Ariel Constenla-Haile To: dev@openoffice.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org It seems Apache SMTP service is failing, forwarding via my gmail account. ---------- Forwarded message ---------- From: Ariel Constenla-Haile Date: Sun, Jun 2, 2013 at 2:46 PM Subject: Re: CMIS UCP To: dev@openoffice.apache.org Hi Rajath, On Sun, Jun 02, 2013 at 05:12:03PM +0530, Rajath Shashidhara wrote: > Hi Ariel, > > > I'm still not clear about one thing: > I'm completing the implementation of the function execute() for > "getPropertyValues" command. > But, until now I assumed that the path and name of the object whose > properties I'm getting are contained in the XIdentifier object that is a > parameter to queryContent method. My Implementation of XContent has an > constructor with XContentIdentifier as one of the parameters. > > But, I added a cout statement to the file ucp to print the > XContentIdentifierObject->getContentIdentifier(), thinking that the > returned string will be the path to the content which is being queried. > But, the print statements were a little a bunch of hexadecimals, when I > tried to access a file from open dialog. May be it is better to play with the open dialog later, when you implement listing a directory; for now, it is easier to play with a Basic macro. The open dialog will query your UCP the moment you start typing cmis:/ which is not a valid content identifier for your UCP. As you already understood, you check this in queryContent: public XContent queryContent(XContentIdentifier xIdentifier) throws IllegalIdentifierException { Logger.getLogger(CMISContentProvider.class.getName()).log( Level.INFO, String.format("Content ID \"%s\"", xIdentifier.getContentIdentifier())); if (!isValidIdentifier(xIdentifier)) { throw new IllegalIdentifierException(); } // Check if a content with given XContentIdentifier already exists // TODO implement a hash map // Key: xIdentifier.getContentIdentifier() // Value: XContent XContent xRet = queryExistingContent(xIdentifier); if (xRet != null) { return xRet; } CMISContent aContent = new CMISContent(m_xContext, xIdentifier); // cache the new content registerNewContent(aContent); return aContent; } Two notes: - you have to cache contents - related to this, there should be only one instance of your UCP; test with the following macro (replace "org.apache.openoffice.ucp.cmis.CMISContentProvider" witht the implementation name of your UCP): REM ***** BASIC ***** Sub Main Dim o1, o2, o3, o4 o1 = CreateUnoService("org.apache.openoffice.ucp.cmis.CMISContentProvider") o2 = CreateUnoService("org.apache.openoffice.ucp.cmis.CMISContentProvider") MsgBox EqualUnoObjects( o1, o2 ) o3 = CreateUnoService("com.sun.star.comp.FTPContentProvider") o4 = CreateUnoService("com.sun.star.comp.FTPContentProvider") MsgBox EqualUnoObjects( o3, o4 ) End Sub > Also, is the argument in the Command refer to which property is being > referred? For the command "getPropertyValues", the argument is a sequence of com.sun.star.beans.Property, where Name has the name of the property. Note that it is a sequence even if it a single property. Use com.sun.star.uno.AnyConverter to convert the any. Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org For additional commands, e-mail: dev-help@openoffice.apache.org