Hi Rajath,

On Sun, Jun 02, 2013 at 02:03:56PM +0530, Rajath Shashidhara wrote:
> Hello,
> 
> Sorry for asking too many questions.

It's alright :)

> 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,

I would state it with the sentences switched:

if the application is executing the command "getPropertyValues", you
have to get meta-data from the CMIS service without downloading anything
expect the meta-data itself.

"getPropertyValues" is one of the commands to be first executed by the
application, usually to know if the content represents a folder or
a document.

> argument -> which property to get.

in plural, even if it is only one property, you get a sequence.

> What is handle?

Look at the API reference:
http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/Command.html

long Handle;
contains an implementation specific handle for the command. 

It is up to the implementation (that is, you) whether to use it or
simply ignore it. You can ignore it now and come back later.

> Also what is commandid? Any enumeration to represent various commandids?

For CommandId read
http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/XCommandProcessor.html#execute
"is a unique id for the command. This identifier was obtained by calling
XCommandProcessor::createCommandIdentifier."

Most (if not all) implementations in the core code simply ignore this parameter.


Note that different css.ucb.Command's have different Command.Argument,
and XCommandProcessor.execute() returns different things. This is
document in the Dev's Guide, and with more detail in
http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/Content.html
The SDK from trunk has a nicer formatted documentation.

For "getPropertyValues" you will have to implement a css::sdbc::XRow,
the internal helper implementation is ucbhelper::PropertyValueSet in 
main/ucbhelper/inc/ucbhelper/propertyvalueset.hxx
main/ucbhelper/source/provider/propertyvalueset.cxx


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgpjI40nh__sH.pgp
Description: PGP signature

Reply via email to