• SOLVED how to use the public void move?

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #42770  by jimac
 
in this link https://docs.openkm.com/apidoc/com/okm/ ... ng.String-

it says
Code: Select all
public void move(String token, String docPath, String destPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, LockException, RepositoryException, DatabaseException, ExtensionException, AutomationException
Description copied from interface: DocumentModule
Move a document to another location in the repository.
Code: Select all
Specified by:
    move in interface DocumentModule
    docPath - The path that identifies an unique document.
    destPath - The destination folder path.
Throws:
    PathNotFoundException - If the dstPath does not exists
    ItemExistsException - If there is already a document in the destination folder with the same name.
    AccessDeniedException - If there is any security problem: you can't modify the document's parent folder or the destination folder because of lack of permissions.
    RepositoryException - If there is any general repository problem.
    LockException

I FOLLOWED the format..
But I dont know what to put inside the public void move
and in the public void execute

plase give me a sample code..to be my guide

please help. thank you!!
Attachments
jabamove.png
jabamove.png (242.85 KiB) Viewed 2100 times
Last edited by jimac on Sun Dec 25, 2016 11:12 am, edited 1 time in total.
 #42786  by jllort
 
Take this code as reference.
Code: Select all
String systemToken = DbSessionManager.getInstance().getSystemToken();
OKMDocument.getInstance().move(systemToken, "/okm:root/doc1.pdf", "/okm:root/folder1);
 #42800  by jimac
 
jllort wrote:Take this code as reference.
Code: Select all
String systemToken = DbSessionManager.getInstance().getSystemToken();
OKMDocument.getInstance().move(systemToken, "/okm:root/doc1.PDF", "/okm:root/folder1);


Good day!

Is there a guide on how to code in workflows??
 #42812  by jimac
 
jllort wrote:Take this code as reference.
Code: Select all
String systemToken = DbSessionManager.getInstance().getSystemToken();
OKMDocument.getInstance().move(systemToken, "/okm:root/doc1.PDF", "/okm:root/folder1);

Good day!

Im wondering what is the cause of this problem.
Please see the attached picture

Attachments
move picture error.png
move picture error.png (97.1 KiB) Viewed 2087 times
 #42834  by jllort
 
If you are using OpenKM portable or you have checkout OpenKM code, from eclipse you add a project in your building path:
Right click on project >Properties > Java Build path > tab Project > button add

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.