Page 1 of 1

OKMDocument.setProperties not returning anything

PostPosted:Sun Mar 02, 2014 11:12 pm
by matt81
I am trying to use the the following method with REST web service using PHP.

http://localhost:8080/OpenKM/services/r ... rties?doc=". $param;

This is what the $param array contains:
Code: Select all
$param =  array(
                                 "author"=> "okmAdmin",
                                 "created"=> null,
                                 "path"=> "/okm:root/OHS/safety.docx",
                                 "permissions"=> null,
                                 "subscribed"=> true,
                                 "uuid"=> "2f32e38e-e1e7-441f-8e4b-71dd454461a0",
                                 "actualVersion"=>
                                   array(
                                     "actual"=> true,
                                     "author"=> "okmAdmin",
                                     "checksum"=> null,
                                     "created"=> null,
                                     "name"=> 'mem',
                                     "size"=> null
                                   ),
                                 "checkedOut"=> false,
                                 "convertibleToDxf"=> false,
                                 "convertibleToPdf"=> true,
                                 "convertibleToSwf"=> true,
                                 "description"=> '',
                                 "language"=> '',
                                 "lastModified"=> "",
                                 "locked"=> true,
                                 "mimeType"=> null,
                                 "signed"=> false,
                                 "title"=> ''
                         );
I got the array fields using the getProperties method. That's what it returns.
What is wrong with it. What sort of properties can you actually set using this method?

Thanks

Re: OKMDocument.setProperties not returning anything

PostPosted:Tue Mar 04, 2014 5:58 pm
by jllort
You're testing trial ? which version ?

What do you want to change in document ?

Re: OKMDocument.setProperties not returning anything

PostPosted:Tue Mar 04, 2014 10:41 pm
by matt81
Thanks for replying back.
Yes I am testing Pro Trial version, and I want to set the following properties:
Code: Select all
"subscribed"=> true
"checkedOut"=> false
"locked"=> false,
"signed"=> false,
"title"=> 'test'
If I cannot set these properties, which properties can I use to set using this method.

Thanks

Re: OKMDocument.setProperties not returning anything

PostPosted:Wed Mar 05, 2014 10:11 pm
by matt81
Can I get an answer please,
I am using Pro Trial Version 6.2.26
and using REST as web service in PHP.

Re: OKMDocument.setProperties not returning anything

PostPosted:Sat Mar 08, 2014 10:15 am
by jllort
First always take a look at catalina.log to see the error.
You can not use setProperties to change any document property ( really accepting document here can generate some confusion ). Always is better go to implementation to see what is able to be changed from this method:
http://doxygen.openkm.com/openkm/dd/d76 ... 02998dc84c
I think in community version is not implemented any change here.

Really what fields do you want to change ?

Re: OKMDocument.setProperties not returning anything

PostPosted:Wed Mar 12, 2014 9:46 pm
by matt81
That's waht I need to know, what fields can you set using this method setProperties. I can set a category and keywords using a different method from a different web service. So what is the meaning of this method, what fields can be set???

Thanks

Re: OKMDocument.setProperties not returning anything

PostPosted:Thu Mar 13, 2014 8:35 am
by jllort
This method has not much sense actually, the method name does not help much because as you suggest indicates change document properties but really is not implementing it. In community version for what I see doesn't do anyting. I suggest use specific methods for add keywords, catgories, do not use setProperties ( I think this method should be removed or extended -> I'm not sure what can be the best, but probably removed because for my point of view has no sense, and implementation could be really complex because should consider in logic the events almost of them ). We will think on it.