On 6/3/13 6:46 PM, Rajath Shashidhara wrote: > Hello, > > > I have changed the getPropertyValues return type to XRow. > > One Problem I'm facing is that the stated UNOtype sequence is not available > for me. I checked com.sun.star.uno package also. I typecasted the > command.argument to Property[] because > from these two examples: > http://wiki.openoffice.org/wiki/Documentation/DevGuide/UCB/Executing_Content_Commands > http://wiki.openoffice.org/wiki/Documentation/DevGuide/UCB/Executing_Content_Commands > > Argument is initialized as com.sun.star.beans.Property[](specifying it > particularly because there is a Property type in chemistry api also).
the Command.Argument is of type Any, see and use AnyConverter to convert object into Any -> http://www.openoffice.org/api/docs/java/ref/com/sun/star/uno/AnyConverter.html Juergen > > Again My github: > https://github.com/rajaths589/CMISContentProvider.git > > > On Mon, Jun 3, 2013 at 1:00 PM, Jürgen Schmidt <jogischm...@gmail.com>wrote: > >> Hi Rajath, >> >> first of all sorry for not answering over the weekend but I try to take >> a "real" break over the weekend and focus on some private work items. >> >> But Ariel gave you very detailed and good advice, it seems that he would >> be a better mentor ;-) >> >> The office API will be of course the more difficult part of this project >> because you won't find so much documentation and samples as for Java. >> The UCB is a special candidate in the office API and it takes some time >> to understand it. Exception are playing a special role in the context of >> the UCB and you will learn this over time. >> >> The SDK contains also an example showing the usage of the UCB API. But >> it's a good idea to play around on your own and get some understanding >> how it works. >> >> Juergen >> >> >> >> >> On 6/3/13 6:59 AM, Rajath Shashidhara wrote: >>> Hello Ariel, >>> >>> Actually, this is my first code using openoffice api. >>> I'll do these before completing my ucp. >>> >>> Sorry. I'll get back to you with the understanding of the general api. >>> >>> >>> On Mon, Jun 3, 2013 at 10:20 AM, Ariel Constenla-Haile < >>> ariel.constenla.ha...@gmail.com> wrote: >>> >>>> Hi Rajath, >>>> >>>> On Mon, Jun 03, 2013 at 01:28:24AM +0530, Rajath Shashidhara wrote: >>>>> Hello everyone, >>>>> >>>>> I have completed some part of the CMISUCP. >>>>> >>>>> I have made my own implementation of XContent, XContentIdentifier >>>>> interfaces. >>>>> >>>>> I have partially Completed implementation of the following methods: >>>>> queryContent() >>>>> execute() -> "getPropertyValues", "open" >>>>> >>>>> >>>>> I was not very clear about the return type of execute method. >>>>> I might have erred there. >>>> >>>> In "open" you are returning a java.io.InputStream. According to the API >>>> documentation, "For non-folder objects, the OpenCommandArgument2 struct >>>> will be prefilled with a data sink object, which will be filled with the >>>> content data."; important point: "OpenCommandArgument::Sink: a sink, >>>> where the implementation can put the document data into." >>>> >>>> And in "getPropertyValues" you are returning >>>> a java.util.Map<String,String>. According to the API docs, the return >>>> type is a ::com::sun::star::sdbc::XRow (as told in a previous mail). >>>> >>>> Both errors tell me you need a deeper knowledge of the UCB API: before >>>> trying to implement your own UCP, you need a general understanding of >>>> how the UCB API works, this is something fundamental, and these two >>>> basic errors tell you are missing this point. >>>> >>>> So back to the basics: >>>> >>>> - create client application >>>> - using the UCB API, get some properties of a file/folder >>>> - if the content is a file, execute an "open" command. If the content is >>>> a folder, list its content. >>>> - if the content is a file, >>>> a) store the stream to disk >>>> b) use the stream to load the file inside OpenOffice >>>> >>>> The code should work using local files/folders, http, webdav, etc. Try >>>> with http://demo.owncloud.org/files/webdav.php so that you have to use >>>> an interaction handler for authentication (user=test, password=test). >>>> >>>> This (together with reading the API reference) will give you a first >>>> idea of how "open" and "getPropertyValues" work. >>>> >>>> >>>> Regards >>>> -- >>>> Ariel Constenla-Haile >>>> La Plata, Argentina >>>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >> For additional commands, e-mail: dev-h...@openoffice.apache.org >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org