12-09-2012 02:04 PM
This is the problem: let's say I create a Workspace called "lalala".
Now I run my code
DocumentModel lalalaWs = new DocumentModelImpl("/default-domain/workspaces/", "lalala", "Workspace");
if (!documentManager.exists(lalalaWs.getRef())) {
log.info("it doesn't exist");
}
else {
log.info("it exists");
}
and it prints "it exists", then I delete the Workspace and call the code again and it still prints "it exists"
is it a bug or am I doing something wrong?
12-09-2012 02:09 PM
documentManager is a variable of type CoreSession
12-10-2012 06:23 AM
The function exists() returns true becuause the "Delete" button moves the workspace to the Trash. The file is present but in a different state. The workspace should be removed from the Thrash to be permanently deleted.
12-10-2012 06:25 AM
But now how can I check using the core java api if a workspace is in the trash, remove it and create a new one or else taking it back from the trash?
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.