|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IFolderManager is an interface for managing IFolder
functionality. It handles folder creation, removal and retrieval. An
IFolder is a container for other Content Server objects,
such as IContentItem, IDataEntryTemplate,
IPresentationTemplate, ISelectionList,
and other IFolder objects.
| Method Summary | |
void |
copyFolder(IFolder sourceFolder,
IFolder destinationFolder)
Copy all the objects of the source folder to the destination folder recursively, including any content items, Data Entry Templates, Presentation Templates, selection lists, sub-folders and all objects in each sub-folder. |
IFolder |
createFolder(IFolder parentFolder,
java.lang.String name)
Creates a new IFolder instance. |
IFolder |
getFolder(java.lang.String UUID)
Returns an IFolder by its UUID. |
IFolder |
getFolderByPath(java.lang.String path)
Returns an IFolder by its path. |
IFolder |
getRootFolder()
Returns the Content Server root folder. |
IFolder[] |
getSubfolders(IFolder folder)
Returns the immediate sub-folders contained in the specified folder. |
void |
moveFolder(IFolder sourceFolder,
IFolder destinationParentFolder)
Move all the objects of the source folder into the specified destination parent folder, including any content items, Data Entry Templates, Presentation Templates, selection lists, sub-folders and all objects in each sub-folder. |
void |
removeFolder(IFolder folder)
Deletes the folder. |
| Method Detail |
public void copyFolder(IFolder sourceFolder,
IFolder destinationFolder)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
ContentException will be thrown if you copy a folder to any of its subfolders.
An IllegalStateException will be thrown if you copy a folder to itself.
sourceFolder - the folder to copy;
cannot be null and has to be persisted prior to call.destinationFolder - the folder to copy into;
cannot be null and has to be persisted prior to call.
java.lang.IllegalStateException - if you copy a folder to itself
or the destination or souce folder has not yet been stored or has been removed.
ContentSecurityException - if the user does not have
permission to access the destination or source folders.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
public IFolder createFolder(IFolder parentFolder,
java.lang.String name)
IFolder instance. The method
IFolder.store needs to be called
to persist this newly-created folder.
The security level of a newly-created, persisted folder will inherit
the security of its parent folder by default.
An IllegalStateException will be thrown
if the parent folder has not been stored.
parentFolder - the parent folder to insert into;
cannot be null.name - the name of the folder.
The name cannot be null, empty, or longer than 255 characters.
The string used for the name will be trimmed of leading and trailing whitespace when it is stored
and is case-insensitive during name comparison.
If there is already a folder in the parent folder with the same name a
NameAlreadyInUseException will be thrown when IFolder.store is
called.
IFolder instance.
java.lang.IllegalStateException - if specified parent folder
has not yet been stored or has been removed.
java.lang.IllegalArgumentException - if the
name is an empty string or longer than 255 characters.
public IFolder getFolder(java.lang.String UUID)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
IFolder by its UUID.
UUID - the IFolder UUID. The UUID of
an object can be obtained using the getUUID
method in the IFolder class; cannot be null, empty or longer than 255 characters.
IFolder or null if
the folder does not exist.
java.lang.IllegalArgumentException - if the
UUID is an empty string or longer than 255 characters.
ContentSecurityException - if the user does not have
permission to access the folder.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
public IFolder getFolderByPath(java.lang.String path)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
IFolder by its path. The path of a folder
can be obtained using the getPath
method in the IFolder class.
Note: This method will not function properly if the folder to be retrieved or any of its containing folders has '/' in its name, since all instances of '/' will be treated as path separator.
path - the IFolder path delimited by '/';
cannot be null, empty or longer than 255 characters.
IFolder or null if
the folder does not exist.
java.lang.IllegalArgumentException - if the
path is an empty string or longer than 255 characters.
ContentSecurityException - if the user does not have
permission to access the folder.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
public IFolder getRootFolder()
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
IFolder for the root folder or
null if the user does not have access to the folder.
ContentSecurityException - if the user does not have
permission to access the root folder.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
public IFolder[] getSubfolders(IFolder folder)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
getRootFolder, then
use this method to retrieve the immediate sub-folders the root folder contains and so on.
folder - the parent folder. Cannot be null.
IFolders which are the immediate
sub-folders of the specified parent folder. The returned array is not ordered.
ContentException - if the method call resulted in a Content Server exception.
ContentSecurityException - if the user does not have
permission to access the folder.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
java.lang.IllegalStateException - if the parent folder
has been deleted or has not been stored.
public void moveFolder(IFolder sourceFolder,
IFolder destinationParentFolder)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
ContentException will be thrown if you move a folder to any of its subfolders.
Note: The sourceFolder will be refreshed with new values for its folder path and parent folder value,
i.e. the parent folder will become the specified destination parent folder, and
the folder path will become a sub-folder path in the desintation parent folder.
Any existing instances of IFolder that refer to the sourceFolder prior
to this move operation will need to be refreshed from the server.
sourceFolder - the folder to move;
cannot be null and has to be persisted prior to call.destinationParentFolder - the parent folder to move the folder into;
cannot be null and has to be persisted prior to call.
java.lang.IllegalStateException - if source folder
has not yet been stored or has been removed or the destination parent folder has not been stored or has been removed.
ContentSecurityException - if the user does not have
permission to access one of the folders.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
public void removeFolder(IFolder folder)
throws ContentSecurityException,
ContentException,
java.rmi.RemoteException
folder - folder to be deleted; cannot be null.
ContentSecurityException - if the user does not have
permission to delete the folder or one of its sub-folders.
ContentException - if the method call resulted in a Content Server exception.
java.rmi.RemoteException - if there was a communication problem
during the execution of the remote method call.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.