public class OKMRepository extends Object implements RepositoryModule
Modifier and Type | Method and Description |
---|---|
void |
copyAttributes(String token,
String srcId,
String dstId,
ExtendedAttributes extAttr)
Copy attributes from a node to another.
|
AppVersion |
getAppVersion(String token)
Retrieve application version.
|
Folder |
getCategoriesFolder(String token)
Obtain the categories folder of the repository.
|
static OKMRepository |
getInstance() |
Folder |
getMailFolder(String token)
Obtain the personal mails folder of the repository.
|
Folder |
getMailFolderBase(String token) |
String |
getNodePath(String token,
String uuid)
Obtain the node path with a given uuid.
|
String |
getNodeUuid(String token,
String path)
Obtain the node uuid with a given path.
|
Folder |
getPersonalFolder(String token)
Obtain the personal documents folder of the repository.
|
Folder |
getPersonalFolderBase(String token) |
String |
getRepositoryUuid(String token)
Get the unique repository identifier
|
Folder |
getRootFolder(String token)
Obtain the root folder of the repository.
|
Folder |
getTemplatesFolder(String token)
Obtain the template folder of the repository.
|
Folder |
getThesaurusFolder(String token)
Obtain the thesaurus folder of the repository.
|
Folder |
getTrashFolder(String token)
Obtains the user trash folder.
|
Folder |
getTrashFolderBase(String token) |
String |
getUpdateMessage(String token)
Get the update message, if any.
|
boolean |
hasNode(String token,
String path)
Test if a node path exists
|
void |
purgeTrash(String token)
Remove all the items in the user trash folder for ever.
|
public static OKMRepository getInstance()
public Folder getRootFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getRootFolder
in interface RepositoryModule
PathNotFoundException
- If there is no root folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getTrashFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getTrashFolder
in interface RepositoryModule
PathNotFoundException
- If there is no user trash folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getTrashFolderBase(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
getTrashFolderBase
in interface RepositoryModule
AccessDeniedException
PathNotFoundException
RepositoryException
DatabaseException
public Folder getTemplatesFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getTemplatesFolder
in interface RepositoryModule
PathNotFoundException
- If there is no templates folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getPersonalFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getPersonalFolder
in interface RepositoryModule
PathNotFoundException
- If there is no user documents folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getPersonalFolderBase(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
getPersonalFolderBase
in interface RepositoryModule
AccessDeniedException
PathNotFoundException
RepositoryException
DatabaseException
public Folder getMailFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getMailFolder
in interface RepositoryModule
PathNotFoundException
- If there is no user documents folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getMailFolderBase(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
getMailFolderBase
in interface RepositoryModule
AccessDeniedException
PathNotFoundException
RepositoryException
DatabaseException
public Folder getThesaurusFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getThesaurusFolder
in interface RepositoryModule
PathNotFoundException
- If there is no user documents folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public Folder getCategoriesFolder(String token) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getCategoriesFolder
in interface RepositoryModule
PathNotFoundException
- If there is no user documents folder node in the repository.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public void purgeTrash(String token) throws PathNotFoundException, AccessDeniedException, LockException, RepositoryException, DatabaseException
RepositoryModule
purgeTrash
in interface RepositoryModule
AccessDeniedException
- If there is any security problem:
you can't modify the user deleted folders and documents because
of lack of permissions.RepositoryException
- If there is any general repository problem.PathNotFoundException
LockException
DatabaseException
public String getUpdateMessage(String token) throws RepositoryException
RepositoryModule
getUpdateMessage
in interface RepositoryModule
RepositoryException
- If there is any general repository problem.public String getRepositoryUuid(String token) throws RepositoryException
RepositoryModule
getRepositoryUuid
in interface RepositoryModule
RepositoryException
- If there is any general repository problem.public boolean hasNode(String token, String path) throws AccessDeniedException, RepositoryException, DatabaseException
RepositoryModule
hasNode
in interface RepositoryModule
path
- The path that identifies an unique document or its UUID.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public String getNodePath(String token, String uuid) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getNodePath
in interface RepositoryModule
uuid
- An unique node identifierPathNotFoundException
- If there is no user node in the repository with this uuid.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public String getNodeUuid(String token, String path) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
RepositoryModule
getNodeUuid
in interface RepositoryModule
path
- An unique path node identifierPathNotFoundException
- If there is no user node in the repository with this uuid.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public AppVersion getAppVersion(String token) throws AccessDeniedException, RepositoryException, DatabaseException
RepositoryModule
getAppVersion
in interface RepositoryModule
token
- Security token.AccessDeniedException
RepositoryException
DatabaseException
public void copyAttributes(String token, String srcId, String dstId, ExtendedAttributes extAttr) throws AccessDeniedException, PathNotFoundException, DatabaseException
RepositoryModule
copyAttributes
in interface RepositoryModule
token
- Security token.srcId
- The path that identifies an unique document or its UUID.dstId
- The path that identifies an unique document or its UUID.extAttr
- Which attributes need to be copied.AccessDeniedException
PathNotFoundException
DatabaseException
Copyright © 2017 Open Knowledge Management System S.L.. All rights reserved.