• OKMDocument.setProperties not returning anything

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #28002  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
 #28032  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
Last edited by matt81 on Thu Mar 06, 2014 3:34 am, edited 1 time in total.
 #28061  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 ?
 #28085  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
 #28089  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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.