Hi,
I'm affraid I need to ask you for clarification of multiple aspects here:
Document versioning:
What I do is that when I upload a new version of the document, I create Version obj, set it's name and then get's a document by 'uuid' assign it version object and then I call "setProperties" for setting the document new document properties. Code:
Folder manipulation:
First, when I create a folder, I need it to have some keywords assigned, by of which I want to be able to do search later. This is how I create folder:
Ghost folders:
What has surprised me is that as I have created folder structure, I have kept the UUID of lowermost folder in the hierarchy. Than I deleted the uppermost folder of this hierarchy in the UI and whole tree has dissapeared - as expected. Weird thing is that when I supply that UUID I kept to the:
I'm using local instance of OpenKM version 6.3.2 build 8289 with Java openKM SDK.
Thanks for helping!
I'm affraid I need to ask you for clarification of multiple aspects here:
Document versioning:
What I do is that when I upload a new version of the document, I create Version obj, set it's name and then get's a document by 'uuid' assign it version object and then I call "setProperties" for setting the document new document properties. Code:
Code: Select all
thing is that version is never set. it keep's incrementing by minor number regardless of what I set.Version v = new Version();
v.setActual(true);
v.setName(version);
Document document = okmWebSrv.getOkmService().getDocumentProperties(docUUID);
document.setActualVersion(v)
okmWebSrv.getOkmService().lock(docUUID);
okmWebSrv.getOkmService().checkin(docUUID, data, "");
okmWebSrv.getOkmService().lock(docUUID);
okmWebSrv.getOkmService().setProperties(document);
okmWebSrv.getOkmService().unlock(docUUID);
Folder manipulation:
First, when I create a folder, I need it to have some keywords assigned, by of which I want to be able to do search later. This is how I create folder:
Code: Select all
and indeed, folder is being ceated but with no keywords assigned, that I can see in the UI. (same with the document keywords)Folder folder = new Folder();
folder.setPath(currentTemplate.getName());
folder.setKeywords(currentTemplate.getKeywords());
created = okmWebSrv.getOkmService().createFolder(folder);
Ghost folders:
What has surprised me is that as I have created folder structure, I have kept the UUID of lowermost folder in the hierarchy. Than I deleted the uppermost folder of this hierarchy in the UI and whole tree has dissapeared - as expected. Weird thing is that when I supply that UUID I kept to the:
Code: Select all
I can still see this folder existing! Even document creation under this (deleted) folder fails with "ItemExistsException" as if it would exists. I don't see it in the UI, even after tomcat restart.okmWebSrv.getOkmService().getFolderProperties({UUID});
I'm using local instance of OpenKM version 6.3.2 build 8289 with Java openKM SDK.
Thanks for helping!