Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiDocFolder

All Superinterfaces:
Cloneable, Comparable, EbiCmElement, EbiDirectory, EbiDirectoryEntry, EbiElement, EbiFrameworkElement, EbiSecurableElement, Serializable

public interface EbiDocFolder
extends EbiDirectory

Objects that implement this interface represent Document Folders. Folders may contain other Folders and/or Documents. A Root Folder is created by the system at installation time and is the top of the Folder hierarchy.


Field Summary
static String EL_DOC_FOLDER
          The element type of Document Folder
static String LIST
          The 'list' permission type.
static String PROTECT
          The 'protect' permission type.
static String READ
          The 'read' permission type.
static String WRITE
          The 'write' permission type.
 
Fields inherited from interface com.sssw.cm.api.EbiDirectory
DIR_TYPE_APP_FIRST, DIR_TYPE_DEFAULT, DIR_TYPE_ROOT, DIR_TYPE_SYS1, DIR_TYPE_SYS2, DIR_TYPE_SYS3, DIR_TYPE_SYS4, DIR_TYPE_SYS5, DIR_TYPE_SYSTEM, OP_ADD_SUBDIR
 
Fields inherited from interface com.sssw.cm.api.EbiDirectoryEntry
OP_ADD_LEAF_NODE
 
Fields inherited from interface com.sssw.cm.api.EbiCmElement
OP_COPY, OP_MOVE, OP_REMOVE, OP_UPDATE
 
Method Summary
 EbiDocument addDocument(EbiContext context, EbiAddDocumentParams params, boolean overwrite)
          Adds a Document to this Folder.
 EbiDocFolder addSubfolder(EbiContext context, String name, int type, String description, Acl acl, boolean overwrite)
          Adds a Subfolder to this Folder.
 EbiDocFolder copy(EbiContext context, EbiDocFolder destFolder, boolean copyFolderSecurity, boolean copySubfolders, boolean copyDocuments, boolean overwrite, int docParts)
          Copies this Folder into the specified destination Folder.
 String getCreator()
          Gets the name of the creator of the Folder
 Timestamp getDateCreated()
          Gets the date/time of the Folder's creation
 Timestamp getDateLastModified()
          Gets the date/time of the last modification of the Folder
 long getFolderSize()
          Gets the current size of the Folder
 String getModifier()
          Gets the name of the user that last modified the Folder
 EbiDocFolder getParentFolder(EbiContext context)
          Gets the Parent Folder for this Folder.
 int getSize()
          Deprecated. EbiDocFolder.getFolderSize()
 EbiDocFolder getSubfolder(EbiContext context, String relativePath)
          Gets a Subfolder of this Folder, given the relative path to the Subfolder.
 EbiDocFolder move(EbiContext context, EbiDocFolder destFolder, boolean withFolderSecurity, boolean overwrite, int docParts)
          Moves this Folder into the specified destination Folder.
 boolean removeSubfolder(EbiContext context, String relativePath)
          Removes the Subfolder specified by its path relative to this Folder.
 void setCreator(String userID)
          Sets the creator.
 void setDateCreated(Timestamp created)
          Sets the date/time created.
 void setFolderSize(long size)
          Sets the size.
 void setSize(int size)
          Sets the size.
 
Methods implemented from interface com.sssw.cm.api.EbiDirectory
getChildren, getChildren, getCount, getDescription, getDirectoryType, getDocument, getEntry, getParentID, isRoot, isSystemDirectory, isTopLevel, publishAll, removeChildren, removeDocument, removeEntry, setDescription, setDirectoryType, setParentID, unpublishAll
 
Methods implemented from interface com.sssw.cm.api.EbiDirectoryEntry
exists, getContentManager, getID, getKey, getName, getParentDirectory, getRepositoryID, getURL, getURLDontThrow, hasChildren, hasNameChanged, isChildOf, isDescendantOf, isDescendantOf, isDirectory, isInDefaultRepository, isInSystemRepository, remove, removeChildren, setID, setID, setLastModified, setName, setRepositoryID, update
 
Methods implemented from interface com.sssw.fw.api.EbiSecurableElement
getAcl, getObjectID, isUserAuthorized, removeAcl, setAcl
 
Methods implemented from interface com.sssw.cm.api.EbiCmElement
fromXML, toXML, validateOperation
 
Methods implemented from interface java.lang.Comparable
compareTo
 
Methods implemented from interface com.sssw.fw.api.EbiFrameworkElement
getElementUUID, getLastModified, getLastModifiedBy, isEqualTo, isReadOnly, resetReadOnly, setLastModified, setLastModifiedBy, setReadOnly
 

Field Detail

EL_DOC_FOLDER

public static final String EL_DOC_FOLDER
The element type of Document Folder
See Also:
EbiElement.getType()

READ

public static final String READ
The 'read' permission type. Specifies who can read the metadata of the Folder (such as name, description, etc.). Note that it is the List access right that specifies who can list the contents of the Folder.

WRITE

public static final String WRITE
The 'write' permission type. Specifies who can modify the metadata of the Folder (such as name, description, etc.). Also, specifies who can add documents to the Folder.

PROTECT

public static final String PROTECT
The 'protect' permission type. Specifies who can modify the ACL on the Folder.

LIST

public static final String LIST
The 'list' permission type. Specifies who can list the contents of the Folder.
Method Detail

getCreator

public String getCreator()
Gets the name of the creator of the Folder
Returns:
creator's name

getDateCreated

public Timestamp getDateCreated()
Gets the date/time of the Folder's creation
Returns:
the date/time of the Folder's creation

getDateLastModified

public Timestamp getDateLastModified()
Gets the date/time of the last modification of the Folder
Returns:
the date/time the Folder was last modified

getModifier

public String getModifier()
Gets the name of the user that last modified the Folder
Returns:
the name of the user that last modified the Folder

getSize

public int getSize()
Deprecated. EbiDocFolder.getFolderSize()

Gets the current size of the Folder
Returns:
Folder size

getFolderSize

public long getFolderSize()
Gets the current size of the Folder
Returns:
Folder size
Since:
v.5.0

setCreator

public void setCreator(String userID)
Sets the creator.
Parameters:
userID - the ID of the Folder's creator

setDateCreated

public void setDateCreated(Timestamp created)
Sets the date/time created.
Parameters:
created - the date/time the Folder was created

setSize

public void setSize(int size)
Sets the size. Recommend not using this as the size is managed by the Content Manager itself.
Parameters:
size - the Folder size

setFolderSize

public void setFolderSize(long size)
Sets the size. Recommend not using this as the size is managed by the Content Manager itself.
Parameters:
size - the Folder size
Since:
v.5.0

getParentFolder

public EbiDocFolder getParentFolder(EbiContext context)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException
Gets the Parent Folder for this Folder.
Parameters:
context - context
Returns:
the Parent Folder, or null if this Folder is the Root Folder

move

public EbiDocFolder move(EbiContext context,
                         EbiDocFolder destFolder,
                         boolean withFolderSecurity,
                         boolean overwrite,
                         int docParts)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException,
                         EboItemExistenceException
Moves this Folder into the specified destination Folder.
Parameters:
context - context
destFolder - the destination Folder
withFolderSecurity - if true, preserves any ACL set on this Folder
overwrite - if true, overwrites any existing Folder with the same name in the destination
docParts - specifies which constituent parts of Documents to move over, as Documents from this Folder and any Subfolders are moved
Returns:
the moved Folder

copy

public EbiDocFolder copy(EbiContext context,
                         EbiDocFolder destFolder,
                         boolean copyFolderSecurity,
                         boolean copySubfolders,
                         boolean copyDocuments,
                         boolean overwrite,
                         int docParts)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException,
                         EboItemExistenceException
Copies this Folder into the specified destination Folder.
Parameters:
context - context
destFolder - the destination Folder
copyFolderSecurity - if true, copy the ACL of this Folder
copySubfolders - if true, copy this Folder's Subfolders
copyDocuments - if true, copy any Documents contained in the Folder as well as in any descendant folders, if copySubfolders is true
overwrite - if true, overwrite any existing Folder with the same name in the destination
docParts - if copyDocuments is true, specifies which constituent parts of the Documents to copy, see EbiDocument
Returns:
the copied Folder
See Also:
EbiDocFolder, EbiDocument

addDocument

public EbiDocument addDocument(EbiContext context,
                               EbiAddDocumentParams params,
                               boolean overwrite)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Adds a Document to this Folder.
Parameters:
context - context
params - the 'add document' parameters object
overwrite - if true, any existing Document with the same name is overwritten
Returns:
the newly added Document
See Also:
EbiDocument, EbiAddDocumentParams

addSubfolder

public EbiDocFolder addSubfolder(EbiContext context,
                                 String name,
                                 int type,
                                 String description,
                                 Acl acl,
                                 boolean overwrite)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Adds a Subfolder to this Folder.
Parameters:
context - context
name - the name of the Subfolder to add
type - the Directory type of the new Subfolder
description - the description of the new Subfolder
acl - the Access Control List for the new Subfolder; if null, then the ACL of the parent Folder is inherited
overwrite - if true, then any existing Subfolder with the same name is overwritten
Returns:
the newly added Subfolder

getSubfolder

public EbiDocFolder getSubfolder(EbiContext context,
                                 String relativePath)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Gets a Subfolder of this Folder, given the relative path to the Subfolder.

Example:

 EbiDocFolder folder = cmgr.lookupDirectoryEntry(
    context, "News", EbiDocFolder.EL_DOC_FOLDER);
 // This will look up the 'News/Sports/Baseball' folder
 EbiDocFolder subFolder = folder.getSubfolder(context, "Sports/Baseball");
 
Parameters:
context - context
relativePath - the path to the Subfolder, relative to this Folder
Returns:
the Subfolder

removeSubfolder

public boolean removeSubfolder(EbiContext context,
                               String relativePath)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Removes the Subfolder specified by its path relative to this Folder.
Parameters:
context - context
relativePath - the relative path to the Subfolder to be removed
Returns:
true if the Subfolder was found and removed, false if not found

Novell exteNd
Director 5.2 API