|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for managing IFolder
functionality. Handles folder creation, removal and retrieval. An
IFolder
is a container for other Publisher objects,
such as IContentItem
, IDataEntryTemplate
,
IPresentationTemplate
, ISelectionList
,
and other IFolder
objects.
Method Summary | |
void |
copyFolder(IFolder sourceFolder,
IFolder destinationFolder)
Copies all the objects of the source folder to the destination folder recursively, including any content items, Data Entry Templates, Presentation Templates, selection lists, subfolders and all objects in each subfolder. |
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 Publisher root folder. |
IFolder[] |
getSubfolders(IFolder folder)
Returns the immediate subfolders contained in the specified folder. |
void |
moveFolder(IFolder sourceFolder,
IFolder destinationParentFolder)
Moves all the objects of the source folder into the specified destination parent folder, including any content items, Data Entry Templates, Presentation Templates, selection lists, subfolders and all objects in each subfolder. |
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 must be persisted prior to calldestinationFolder
- the folder to copy into;
cannot be null
and must 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 Publisher exception
java.rmi.RemoteException
- if there was a communication problem
during the execution of the remote method callpublic IFolder createFolder(IFolder parentFolder, java.lang.String name)
IFolder
instance. The method
IFolder.store
must 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;
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 characterspublic IFolder getFolder(java.lang.String UUID) throws ContentSecurityException, ContentException, java.rmi.RemoteException
IFolder
by its UUID.
UUID
- the IFolder
UUID; cannot be null
, empty or longer than 255 characters. The UUID of
an object can be obtained using the getUUID
method in the IFolder
class.
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 Publisher exception
java.rmi.RemoteException
- if there was a communication problem
during the execution of the remote method callpublic 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 a 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 Publisher exception
java.rmi.RemoteException
- if there was a communication problem
during the execution of the remote method callpublic 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 Publisher exception
java.rmi.RemoteException
- if there was a communication problem
during the execution of the remote method callpublic IFolder[] getSubfolders(IFolder folder) throws ContentSecurityException, ContentException, java.rmi.RemoteException
getRootFolder
, then
use this method to retrieve the immediate subfolders the root folder contains and so on.
folder
- the parent folder; cannot be null
IFolder
s which are the immediate
subfolders of the specified parent folder. The returned array is not ordered.
ContentException
- if the method call resulted in a Publisher 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 storedpublic 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;
the parent folder will become the specified destination parent folder, and
the folder path will become a subfolder 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 must be persisted prior to calldestinationParentFolder
- the parent folder to move the folder into;
cannot be null
and must 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 Publisher exception
java.rmi.RemoteException
- if there was a communication problem
during the execution of the remote method callpublic 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 subfolders
ContentException
- if the method call resulted in a Publisher 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 ©2010 Oracle® Corporation. All Rights Reserved.