Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiDocCategory

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

public interface EbiDocCategory
extends EbiDirectory

Objects that implement this interface represent Document Categories. Categories may contain other categories and/or documents. A Root Category is created by the system at installation time and is the top of the category hierarchy.


Field Summary
static String EL_DOC_CATEGORY
          The element type of Document Category
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
 void addDocument(EbiContext context, EbiDocument doc)
          Assign a Document into this Category.
 EbiDocCategory addSubcategory(EbiContext context, String name, int type, String description, Acl acl, boolean overwrite)
          Add a subcategory to this Category.
 EbiDocCategory copy(EbiContext context, EbiDocCategory destCategory, boolean copyCategorySecurity, boolean copySubcategories, boolean assignDocuments, boolean overwrite)
          Copy this Category into the specified destination Category.
 EbiDocCategory getParentCategory(EbiContext context)
          Get the parent Category.
 EbiDocCategory getSubcategory(EbiContext context, String relativePath)
          Get a subcategory with the specified relative path.
 EbiDocCategory move(EbiContext context, EbiDocCategory destCategory, boolean withCategorySecurity, boolean overwrite)
          Move this Category to the specified destination Category.
 boolean removeDocumentRef(EbiContext context, EbiDocument doc)
          Unassign the specified Document from this Category
 boolean removeSubcategory(EbiContext context, String relativePath)
          Remove the subcategory with the specified relative path.
 
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_CATEGORY

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

READ

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

WRITE

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

PROTECT

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

LIST

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

getParentCategory

public EbiDocCategory getParentCategory(EbiContext context)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException
Get the parent Category.
Parameters:
context - context
Returns:
the parent Category or null if this Category is the Root one.

move

public EbiDocCategory move(EbiContext context,
                           EbiDocCategory destCategory,
                           boolean withCategorySecurity,
                           boolean overwrite)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Move this Category to the specified destination Category.
Parameters:
context - context
destCategory - the destination Category; note that this Category may reside in another Repository
withCategorySecurity - if true, preserve security settings
overwrite - overwrite any entries with name collisions
Returns:
the new, moved Category

copy

public EbiDocCategory copy(EbiContext context,
                           EbiDocCategory destCategory,
                           boolean copyCategorySecurity,
                           boolean copySubcategories,
                           boolean assignDocuments,
                           boolean overwrite)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Copy this Category into the specified destination Category.
Parameters:
context - context
destCategory - the destination Category; note that this Category may reside in another Repository
copyCategorySecurity - if true, preserve security settings for the Category (and any subcategories, if those are copied)
copySubcategories - if true, all the descandant subcategories are copied
assignDocuments - if true, documents are assigned into the copied category; note that if the destination repository is different from the one this Category resides in, then the Documents are copied into the destination Repository; they are placed into Folders with the same paths as the Folders they reside in in the source Repository

addDocument

public void addDocument(EbiContext context,
                        EbiDocument doc)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Assign a Document into this Category.
Parameters:
context - context
doc - the Document

addSubcategory

public EbiDocCategory addSubcategory(EbiContext context,
                                     String name,
                                     int type,
                                     String description,
                                     Acl acl,
                                     boolean overwrite)
                              throws EboUnrecoverableSystemException,
                                     EboSecurityException,
                                     EboItemExistenceException
Add a subcategory to this Category.
Parameters:
context - context
name - Category name
type - Directory type (see EbiDirectory)
description - description
acl - the Acl to set; if null then the Acl of the parent Category is inherited
overwrite - overwrite the existing Category with the same name, if any

getSubcategory

public EbiDocCategory getSubcategory(EbiContext context,
                                     String relativePath)
                              throws EboUnrecoverableSystemException,
                                     EboSecurityException,
                                     EboItemExistenceException
Get a subcategory with the specified relative path.
Parameters:
context - context
relativePath - the path to the subcategory, relative to this Category

removeSubcategory

public boolean removeSubcategory(EbiContext context,
                                 String relativePath)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Remove the subcategory with the specified relative path.
Parameters:
context - context
relativePath - the path to the subcategory (relative to this Category)
Returns:
true if the subcategory was successfully removed, false otherwise

removeDocumentRef

public boolean removeDocumentRef(EbiContext context,
                                 EbiDocument doc)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Unassign the specified Document from this Category
Parameters:
context - context
doc - the Document
Returns:
true if the Document was successfully unassigned, false if it was determined that it was not part of the Category

Novell exteNd
Director 5.2 API