Page 1 of 1

Script to auto add PropertyGroups.

PostPosted:Wed May 09, 2012 12:53 pm
by dzikus
Hello i have property group called "PropertySample" with some metadata.

I want to automaticaly add this property group to all documents that will be added to some folder.

I readed on some messages from this forum that Scripting will be the best place to do that, but in this place my knowledge isn't sufficient. I know how to add script in repository group i also test some examples from http://wiki.openkm.com/index.php/Scripting.

Could someone plase give me example of script that will add property group to document?

Re: Script to auto add PropertyGroups.

PostPosted:Sat May 12, 2012 6:17 am
by jllort
Here you have got all classes descrition http://doxygen.openkm.com/5.1.x/

for example you can take a look at PropertyGroupServlet.java http://doxygen.openkm.com/5.1.x/d6/dc4/ ... rvlet.html

And use something like:
OKMPropertyGroup.getInstance().addGroup(null, path, grpName);