public class OKMFolder extends Object implements FolderModule
Modifier and Type | Method and Description |
---|---|
void |
copy(String token,
String fldPath,
String dstPath)
Copy a folder to another location in the repository.
|
Folder |
create(String token,
Folder fld)
Create a new folder in the repository.
|
void |
createMissingFolders(String token,
String fldPath)
Create missing folders.
|
Folder |
createSimple(String token,
String fldPath) |
void |
delete(String token,
String fldPath)
Delete a folder the repository.
|
void |
extendedCopy(String token,
String fldPath,
String dstPath,
ExtendedAttributes extAttr)
Copy a folder to another location in the repository.
|
List<Folder> |
getChildren(String token,
String fldId)
Retrieve a list of children folders from an existing one.
|
List<Folder> |
getChilds(String token,
String fldId)
Deprecated.
|
ContentInfo |
getContentInfo(String token,
String fldPath)
Retrive the content info of the folder: number of folders, number of documents, and total size.
|
static OKMFolder |
getInstance() |
String |
getPath(String token,
String uuid)
Get the folder path from a UUID
|
Folder |
getProperties(String token,
String fldPath)
Obtains properties from a previously created folder.
|
boolean |
isValid(String token,
String fldId)
Test if a folder path is valid.
|
void |
move(String token,
String fldPath,
String dstPath)
Move a folder to another location in the repository.
|
void |
purge(String token,
String fldPath)
Deletes definitively a folder from the repository.
|
Folder |
rename(String token,
String fldPath,
String newName)
Rename a folder in the repository.
|
public static OKMFolder getInstance()
public Folder create(String token, Folder fld) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException, ExtensionException, AutomationException
FolderModule
create
in interface FolderModule
fld
- A folder object with the new folder properties.PathNotFoundException
- If the parent folder doesn't exist.ItemExistsException
- If there is already a folder in the repository with the same name in the same path.AccessDeniedException
- If there is any security problem: you can't modify the parent folder because of
lack of permissions.RepositoryException
- If there is any general repository problem.DatabaseException
ExtensionException
AutomationException
public Folder createSimple(String token, String fldPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException, ExtensionException, AutomationException
public Folder getProperties(String token, String fldPath) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
FolderModule
getProperties
in interface FolderModule
fldPath
- The path that identifies an unique folder.PathNotFoundException
- If the indicated folder doesn't exist.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public void delete(String token, String fldPath) throws LockException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
FolderModule
delete
in interface FolderModule
fldPath
- The path that identifies an unique folder.LockException
- Can't delete a folder with locked documents.PathNotFoundException
- If there is no folder in the repository in this path.AccessDeniedException
- If there is any security problem: you can't modify the folder because of lack of
permissions.RepositoryException
- If there is any general repository problem.DatabaseException
public void purge(String token, String fldPath) throws LockException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
FolderModule
purge
in interface FolderModule
fldPath
- The path that identifies an unique folder.LockException
- Can't delete a folder with locked documents.PathNotFoundException
- If there is no folder in the repository in this path.AccessDeniedException
- If there is any security problem: you can't modify the folder because of lack of
permissions.RepositoryException
- If there is any general repository problem.DatabaseException
public Folder rename(String token, String fldPath, String newName) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException
FolderModule
rename
in interface FolderModule
fldPath
- The path that identifies an unique folder.newName
- The new folder name.PathNotFoundException
- If there is no folder in the repository in this path.ItemExistsException
- If there is already a folder in the repository with the same name in the same path.AccessDeniedException
- If there is any security problem: you can't modify the folder because of lack of
permissions.RepositoryException
- If there is any general repository problem.DatabaseException
public void move(String token, String fldPath, String dstPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException
FolderModule
move
in interface FolderModule
fldPath
- The path that identifies an unique folder.dstPath
- The path of the destination folder.PathNotFoundException
- If the dstPath does not exists.ItemExistsException
- If there is already a folder in the destination folder with the same name.AccessDeniedException
- If there is any security problem: you can't modify the parent folder or the
destination folder because of lack of permissions.RepositoryException
- If there is any general repository problem.DatabaseException
public void copy(String token, String fldPath, String dstPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, IOException, AutomationException, DatabaseException, UserQuotaExceededException
FolderModule
copy
in interface FolderModule
fldPath
- The path that identifies an unique folder.dstPath
- The path of the destination folder.PathNotFoundException
- If the dstPath does not exists.ItemExistsException
- If there is already a folder in the destination folder with the same name.AccessDeniedException
- If there is any security problem: you can't modify the parent folder or the
destination folder because of lack of permissions.RepositoryException
- If there is any general repository problem.IOException
AutomationException
DatabaseException
UserQuotaExceededException
public void extendedCopy(String token, String fldPath, String dstPath, ExtendedAttributes extAttr) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, IOException, AutomationException, DatabaseException, UserQuotaExceededException
FolderModule
extendedCopy
in interface FolderModule
fldPath
- The path that identifies an unique folder.dstPath
- The path of the destination folder.extAttr
- Attributes to define what need to be duplicated.PathNotFoundException
- If the dstPath does not exists.ItemExistsException
- If there is already a folder in the destination folder with the same name.AccessDeniedException
- If there is any security problem: you can't modify the parent folder or the
destination folder because of lack of permissions.RepositoryException
- If there is any general repository problem.IOException
AutomationException
DatabaseException
UserQuotaExceededException
@Deprecated public List<Folder> getChilds(String token, String fldId) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
FolderModule
getChilds
in interface FolderModule
fldId
- The path that identifies an unique folder or its UUID.PathNotFoundException
- If there is no folder in the repository in this pathRepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public List<Folder> getChildren(String token, String fldId) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
FolderModule
getChildren
in interface FolderModule
fldId
- The path that identifies an unique folder or its UUID.PathNotFoundException
- If there is no folder in the repository in this pathRepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public ContentInfo getContentInfo(String token, String fldPath) throws AccessDeniedException, RepositoryException, PathNotFoundException, DatabaseException
FolderModule
getContentInfo
in interface FolderModule
fldPath
- The path that identifies an unique folder.AccessDeniedException
- If there is any security problem: you can't access this folder because of lack of
permissions.RepositoryException
- If there is any general repository problem.PathNotFoundException
- If there is no folder in the repository with this path.DatabaseException
public boolean isValid(String token, String fldId) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException
FolderModule
isValid
in interface FolderModule
fldId
- The path that identifies an unique folder or its UUID.PathNotFoundException
- If the node does not exists.RepositoryException
- If there is any general repository problem.AccessDeniedException
DatabaseException
public String getPath(String token, String uuid) throws AccessDeniedException, RepositoryException, DatabaseException
FolderModule
getPath
in interface FolderModule
uuid
- The unique folder id.AccessDeniedException
- If there is any security problem: you can't access this folder because of lack of
permissions.RepositoryException
- If there is any problem.DatabaseException
public void createMissingFolders(String token, String fldPath) throws RepositoryException, DatabaseException, PathNotFoundException, ItemExistsException, AccessDeniedException, ExtensionException, AutomationException
Copyright © 2016. All rights reserved.