Re: Copy metadata of documents enregistred yet to new document
PostPosted:Thu May 24, 2018 5:33 pm
Please can you help me to obtain good result ?
Because information matters
https://forum.openkm.com/
import com.openkm.api.OKMPropertyGroup;
import java.util.Map;
String uuid_origin = "222bd16a-01f1-4b5b-89b7-be72183706bc";
String uuid_destination = "73a99248-6364-4443-b407-e3584c921fc1";
Map properties = OKMPropertyGroup.getInstance().getPropertiesSimple(null, uuid_origin, "okg:cdapodoc"); ......
lnovoa wrote: ↑Fri May 25, 2018 9:03 am You have to add the import to the code.Hi Inovoa,
Code: Select allHow do you check that the code is correct before execute it in openkm?import com.openkm.api.OKMPropertyGroup; import java.util.Map; String uuid_origin = "222bd16a-01f1-4b5b-89b7-be72183706bc"; String uuid_destination = "73a99248-6364-4443-b407-e3584c921fc1"; Map properties = OKMPropertyGroup.getInstance().getPropertiesSimple(null, uuid_origin, "okg:cdapodoc"); ......
lnovoa wrote: ↑Fri May 25, 2018 10:04 am We have a development environment, which consists of a VM in Linux.Dear Inovoa, I have it, some error are there when we use his portable's Eclispe version.
This environment has already installed and configured everything you need to modify your own version of openkm.
The Eclipse IDE also has it configured ready to compile and develop.
One way to test your code is to create a main class in the eclipse and develop your code there.
From there you can access classes and methods and check that your code has no errors.
Then you just have to run it in your current openkm.
I give you a link:
Community development environment
https://www.openkm.com/en/download.html
About your code, I think that with the mistakes you have made should work.
OKMPropertyGroup.getInstance().setPropertiesSimple(null, uuid_destination,"okg:cdapodoc", properties);