Difference between revisions of "OKMFolder"
From OpenKM Documentation
(Created page with '{{TOCright}} __TOC__ Methods related to folder management. Category: Webservices Guide') |
|||
Line 2: | Line 2: | ||
Methods related to folder management. | Methods related to folder management. | ||
+ | |||
+ | == Folder create(String token, Folder fld) == | ||
+ | Create a new folder in the repository. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''fld'' - A folder object with the new folder properties. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A folder object with the new created folder properties. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''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. | ||
+ | |||
+ | == Folder getProperties(String token, String fldPath) == | ||
+ | Obtains properties from a previously created folder. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' -The session authorization token . | ||
+ | * ''fldPath'' - The path that identifies an unique folder. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A folder object with the selected folder properties. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''ItemNotFoundException'' - If the indicated folder doesn't exist. | ||
+ | * ''RepositoryException'' - If there is any general repository problem. | ||
+ | |||
+ | == void delete(String token, String fldPath) == | ||
+ | Delete a folder the repository. It is a logical delete, so really is moved to the user trash and can be restored. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''fldPath'' - The path that identifies an unique folder. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A folder object with the selected folder properties. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''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. | ||
+ | |||
+ | == Folder rename(String token, String fldPath, String newName) == | ||
+ | Rename a folder in the repository. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''fldPath'' - The path that identifies an unique folder. | ||
+ | * ''newName'' - The new folder name. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A folder object with the new folder properties. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''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. | ||
+ | |||
+ | == void move(String token, String fldPath, String dstPath) == | ||
+ | Move a folder to another location in the repository. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''fldPath'' - The path that identifies an unique folder. | ||
+ | * ''dstPath'' - The path of the destination folder. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A folder object with the new folder properties. | ||
+ | |||
+ | '''Throws''' | ||
+ | * ''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. | ||
+ | |||
+ | == FolderArray getChilds(String token, String fldPath) == | ||
+ | Retrieve a list of child folders from an existing one. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' - The session authorization token. | ||
+ | * ''fldPath'' - The path that identifies an unique folder. | ||
+ | |||
+ | '''Returns''' | ||
+ | * A Collection with the child folders. | ||
+ | |||
+ | '''Throws''' | ||
+ | * PathNotFoundException - If there is no folder in the repository in this path. | ||
+ | * RepositoryException - If there is any general repository problem. | ||
[[Category: Webservices Guide]] | [[Category: Webservices Guide]] |
Revision as of 11:44, 8 March 2010
Methods related to folder management.
Folder create(String token, Folder fld)
Create a new folder in the repository.
Parameters
- token - The session authorization token.
- fld - A folder object with the new folder properties.
Returns
- A folder object with the new created folder properties.
Throws
- 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.
Folder getProperties(String token, String fldPath)
Obtains properties from a previously created folder.
Parameters
- token -The session authorization token .
- fldPath - The path that identifies an unique folder.
Returns
- A folder object with the selected folder properties.
Throws
- ItemNotFoundException - If the indicated folder doesn't exist.
- RepositoryException - If there is any general repository problem.
void delete(String token, String fldPath)
Delete a folder the repository. It is a logical delete, so really is moved to the user trash and can be restored.
Parameters
- token - The session authorization token.
- fldPath - The path that identifies an unique folder.
Returns
- A folder object with the selected folder properties.
Throws
- 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.
Folder rename(String token, String fldPath, String newName)
Rename a folder in the repository.
Parameters
- token - The session authorization token.
- fldPath - The path that identifies an unique folder.
- newName - The new folder name.
Returns
- A folder object with the new folder properties.
Throws
- 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.
void move(String token, String fldPath, String dstPath)
Move a folder to another location in the repository.
Parameters
- token - The session authorization token.
- fldPath - The path that identifies an unique folder.
- dstPath - The path of the destination folder.
Returns
- A folder object with the new folder properties.
Throws
- 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.
FolderArray getChilds(String token, String fldPath)
Retrieve a list of child folders from an existing one.
Parameters
- token - The session authorization token.
- fldPath - The path that identifies an unique folder.
Returns
- A Collection with the child folders.
Throws
- PathNotFoundException - If there is no folder in the repository in this path.
- RepositoryException - If there is any general repository problem.