Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiContentManager

All Superinterfaces:
EbiEventListener, EbiStateChangeListener, EbiStateChangeProducer, EbiStateChangeProducer, EventListener

public interface EbiContentManager
extends EbiStateChangeListener, EbiStateChangeProducer

This is the Content Manager interface.
The Content Manager provides the following capabilities:

To obtain an instance of Content Manager:

 EbiContentManager cmgr = com.sssw.fw.factory.EboFactory.getManager(EbiContentManager.CONTENT_MGR);
 
Note: it is expected that an application would not use EbiContentManager directly, but would use EbiContentMgmtDelegate instead.


Field Summary
static String CM_FULL_QUALIFIER
          The full qualifier/identifier of CM as a subsystem
static String CM_QUALIFIER
          The qualifier/identifier of CM as a subsystem
static int COMPARE_ALL
          The mode for "compare all the properties of user agents": browser names, browser versions (major and minor), and platforms.
static int COMPARE_MAJOR_VERS
          The mask for "compare major versions".
static int COMPARE_MINOR_VERS
          The mask for "compare minor versions".
static int COMPARE_NAMES
          The mask for "compare browser names".
static int COMPARE_NONE
          The mode for "do not compare user agents" for the getDocumentLayout method.
static int COMPARE_PLATFORMS
          The mask for "compare platforms".
static String CONTENT_MGR
          The Content Manager identifier string.
 
Method Summary
 void addCategory(EbiContext context, EbiDocCategory parent, EbiDocCategory child, Acl acl)
          Adds a Category to the specified Parent Category.
 EbiDocCategory addCategory(EbiContext context, EbiDocCategory parent, String name, int type, String description, Acl acl)
          Creates a new category.
 EbiDirectory addDirectory(EbiContext context, EbiDirectory parent, String name, int type, String description, Acl acl)
          Adds a Directory, given its parent and its name.
 EbiDocument addDocument(EbiContext context, EbiAddDocumentParams params)
          Adds a Document.
 void addDocumentCategoryReference(EbiContext context, String docID, String categoryID)
          Adds a Document to the specified Category.
 void addDocumentField(EbiContext context, EbiDocField field, Acl acl)
          Creates a new Document Extension Metadata Field.
 EbiDocField addDocumentField(EbiContext context, String fieldName, String valueType, byte[] extnMeta, Acl acl)
          Creates a new Document Extension Metadata Field.
 void addDocumentLayoutStyle(EbiContext context, EbiDocLayoutStyle style, Acl acl)
          Adds a new Document Layout Style for the specified Document Type.
 EbiDocLayoutStyle addDocumentLayoutStyle(EbiContext context, String docTypeID, String styleName, String description, boolean isDefault, Acl acl)
          Adds a new Document Layout Style for the specified Document Type.
 EbiDocLink addDocumentLink(EbiContext context, String docidParent, String docidChild, int versionidChild)
          Adds a Link between a Link Parent Document and a Link Child Document.
 EbiDocLink addDocumentLink(EbiContext context, String docidParent, String docidChild, int versionidChild, byte[] extnMeta)
          Adds a Link between a Link Parent Document and a link child Document.
 void addDocumentType(EbiContext context, EbiDocType type, String[] fieldIDs, Acl acl)
          Adds a Document Type.
 EbiDocType addDocumentType(EbiContext context, String name, String description, String[] fieldIDs, Acl acl)
          Adds a Document Type.
 EbiDocType addDocumentType(EbiContext context, String name, String description, String[] fieldIDs, byte[] extnMeta, Acl acl)
          Adds a Document Type.
 void addFieldToDocumentType(EbiContext context, String fieldID, String docTypeID)
          Adds the specified field to the specified document type.
 void addFolder(EbiContext context, EbiDocFolder parent, EbiDocFolder child, Acl acl)
          Creates a new Folder.
 EbiDocFolder addFolder(EbiContext context, EbiDocFolder parent, String name, int type, String description, Acl acl)
          Creates a new Folder.
 EbiLayoutDocDescriptor addLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID, String userAgent)
          Adds a Layout Document Descriptor.
 int checkinDocument(EbiContext context, String docID, String mimeType, byte[] data, String comment, boolean keepCheckedOut)
          Checks in a new Version of the specified Document.
 boolean checkoutDocument(EbiContext context, String docID)
          Deprecated. EbiContentManager.checkoutDocument(EbiContext, String, boolean)
 EbiDocument checkoutDocument(EbiContext context, String docPath, boolean isDocID)
          Checks out a specified Document.
 EbiDocCategory copyCategory(EbiContext context, EbiDocCategory sourceCategory, EbiDocCategory destCategory, boolean copyCategorySecurity, boolean copySubcategories, boolean assignDocuments, boolean overwrite)
          Copies the specified source Category into the destination Category.
 EbiDirectoryEntry copyDirectoryEntry(EbiContext context, EbiDirectoryEntry entryToCopy, EbiDirectoryEntry destEntry, boolean overwrite, int docParts)
          Copies a Directory Entry into the specified destination Entry.
 EbiDocument copyDocument(EbiContext context, EbiDocument doc, EbiDocFolder destFolder, boolean overwrite, int docParts)
          Copies the specified Document to the specified destination Folder.
 EbiDocument copyDocument(EbiContext context, EbiDocument doc, EbiDocument newParentDoc)
          Copies the specified Document to another Parent Document.
 EbiDocFolder copyFolder(EbiContext context, EbiDocFolder sourceFolder, EbiDocFolder destFolder, boolean copyFolderSecurity, boolean copySubfolders, boolean copyDocuments, boolean overwrite, int docParts)
          Copies the specified source Folder into the destination Folder.
 EbiAddDocumentParams createAddDocumentParams()
          Creates an "add document parameters" object that is used in the addDocument method.
 EbiDocLayoutSet createDocLayoutSet(EbiContext context, String layoutStyleID)
          News up a Document Layout Set.
 EbiDocVersionDescriptor createDocVersionDescriptor(EbiContext context, String docID, int versionID)
          News up a Document Version Descriptor.
 EbiDocExtnMeta createExtnMeta()
          Creates a blank Extension Meta object which will act as a holder of Extension Meta Info's.
 EbiDocExtnMetaInfo createExtnMetaInfo(EbiDocField field)
          Creates a blank Extension Metadata Info for the given Extension Field.
 EbiQuery createQuery(String queryType)
          Creates a query object of a specific type.
 Collection findElements(EbiContext context, EbiQuery query)
          Given a query object, executes the search and returns the results.
 String findElements(EbiContext context, EbiQuery query, boolean rowwise)
          Given a query object, executes a search and returns the results as XML.
 Document findElementsDOM(EbiContext context, EbiQuery query, boolean rowwise)
          Given a query object, executes a search and returns the results in org.w3c.dom.Document.
 Collection findElementsFiltered(EbiContext context, EbiQuery query)
          This method works exactly the same way as findElements(EbiContext, EbiQuery), except it performs security filtering of the results.
 String findElementsFiltered(EbiContext context, EbiQuery query, boolean rowwise)
          Given a query object, executes the search and returns the results as XML.Currently, this is supported for EbiDocQuery only.
 Document findElementsFilteredDOM(EbiContext context, EbiQuery query, boolean rowwise)
          Given a query object, executes the search and returns the results in org.w3c.dom.Document.
 Acl getAcl(EbiContext context, EbiSecurableElement el)
          Gets the Access Control List currently set for an element.
 EbiContentAdmin getAdminElement(EbiContext context)
          Gets a reference to the Admin Element.
 Collection getAllAccessible(EbiContext context, Collection elements, String elementType, String right, String adminRight)
          From a list of securable elements, filters out the ones that are accessible to the user whose context is passed in.
 EbiDocCategory getCategory(EbiContext context, EbiDocCategory parent, String name)
          Gets a category by its name.
 EbiDocCategory getCategory(EbiContext context, String categoryID)
          Gets a Category by its ID.
 Collection getChildDocuments(EbiContext context, String docID)
          Enumerates the Documents that are Children of the specified Document.
 EbiDocContent getContent(EbiContext context, String docID, boolean getBytes)
          Gets the Content for the Document with the specified ID.
 EbiDataFetcherDelegate getDataFetcher()
          Gets the Data Fetcher object for this Content Manager.
 String getDataSource()
          Gets the name of the Data Source that this Content Manager is associated with
 EbiDocLayoutStyle getDefaultDocumentLayoutStyle(EbiContext context, String docTypeID)
          Gets the Layout Style that is the default for the specified Document Type.
 EbiDirectoryContents getDirectoryContents(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments)
          Gets the list of directory contents.
 int getDirectoryCount(EbiContext context, EbiDirectory dir, boolean countSubdirs, boolean countDocs, boolean countAccessibleOnly)
          Calculates the number of entries in the given directory.
 Collection getDirectoryList(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments)
          Gets the list of directory contents.
 EbiDocument getDocument(EbiContext context, String docID)
          Gets the Document specified by its ID.
 Collection getDocumentCategoryReferences(EbiContext context, String docID)
          Gets the list of Categories that the document with the specified ID belongs to.
 EbiDocVersion getDocumentContentVersion(EbiContext context, String docID, int versionID, boolean getBytes)
          Gets a specific Version of a Document whose ID is supplied.
 Collection getDocumentContentVersions(EbiContext context, String docID, boolean getBytes)
          Enumerates all the existing versions of a specific Document.
 EbiDocExtnMeta getDocumentExtnMeta(EbiContext context, String docID)
          Gets the Extension Metadata for the given Document.
 EbiDocExtnMetaInfo getDocumentExtnMetaInfo(EbiContext context, String docID, String extnFieldID)
          Given the name of an Extension Metadata Field for a specific Document, retrieves the set of values of that Field.
 EbiDocField getDocumentFieldByID(EbiContext context, String fieldID)
          Gets a Document Field by ID.
 EbiDocField getDocumentFieldByName(EbiContext context, String fieldName)
          Gets a Document Field by name.
 Collection getDocumentFields(EbiContext context)
          Enumerates all the existing Document Fields.
 Collection getDocumentFields(EbiContext context, String docTypeID)
          Enumerates the Document Fields for a given Document Type.
 EbiDocVersionDescriptor getDocumentLayout(EbiContext context, String docID, int mode, boolean getDefaultIfNotFound)
          Given a Context and a Document ID, retrieves the appropriate Document Layout.
 EbiDocLayoutSet getDocumentLayoutSet(EbiContext context, String docID)
          For a given Document, obtains its Document Layout Set.
 EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context, String layoutStyleID)
          Gets details on a specific Document Layout Style.
 EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context, String docTypeID, String styleName)
          Given the name of a Layout Style defined for a specific Document Type, get the metadata of that Style.
 Collection getDocumentLayoutStyles(EbiContext context, String docTypeID)
          Enumerates all the Document Layout Styles that were created for the specified Document Type.
 EbiDocLink getDocumentLink(EbiContext context, String docidParent, String docidChild)
          Gets the link between the Link Parent and the Link Child Documents.
 Collection getDocumentsByType(EbiContext context, String docTypeID)
          Gets the list of Documents of the specified Type.
 EbiDocType getDocumentTypeByID(EbiContext context, String docTypeID)
          Gets a specific Document Type by ID.
 EbiDocType getDocumentTypeByName(EbiContext context, String docTypeName)
          Gets a specific Document Type by name.
 Collection getDocumentTypes(EbiContext context)
          Enumerates existing Document Types.
 Collection getDocumentTypesWithField(EbiContext context, String fieldID)
          Enumerates the Document Types that have the given Field.
 EbiDirectoryEntry getEntry(EbiContext context, EbiDirectory parent, String name)
          Gets an Entry (by name) in a Directory.
 EbiExporter getExporter()
          Gets a CM Data Exporter object.
 Collection getFilteredChildDocuments(EbiContext context, String docID)
          Enumerates the Documents that are Children of the specified Document.
 EbiDirectoryContents getFilteredDirectoryContents(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments)
          Gets the list of directory contents.
 Collection getFilteredDirectoryList(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments)
          Gets the list of directory contents.This method works for both folders and categories, as EbiDirectory is a superinterface of both EbiDocFolder and EbiDocCategory.
 Collection getFilteredDocumentCategoryReferences(EbiContext context, String docID)
          Gets the list of Categories that the Document with the specified ID belongs to.
 Collection getFilteredDocumentFields(EbiContext context)
          Enumerates all the existing Document Fields.
 Collection getFilteredDocumentFields(EbiContext context, String docTypeID)
          Enumerates the Document Fields for a given Document Type.
 Collection getFilteredDocumentLayoutStyles(EbiContext context, String docTypeID)
          Enumerates all the Document Layout Styles that were created for the specified Document Type.
 Collection getFilteredDocumentsByType(EbiContext context, String docTypeID)
          Gets the list of Documents of the specified Type.
 Collection getFilteredDocumentTypes(EbiContext context)
          Enumerates existing Document Types.
 Collection getFilteredDocumentTypesWithField(EbiContext context, String fieldID)
          Enumerates the Document Types that have the given Field.
 Collection getFilteredLinkChildDocuments(EbiContext context, String docidParent)
          For a given Document, gets the list of Documents that are linked to it.
 Collection getFilteredLinkParentDocuments(EbiContext context, String docidChild)
          For a given document, gets the list of Documents to which it is linked.
 EbiDocFolder getFolder(EbiContext context, EbiDocFolder parent, String name)
          Gets a folder by its name.
 EbiDocFolder getFolder(EbiContext context, String folderID)
          Gets a folder by its ID.
 EbiImporter getImporter()
          Gets a CM Data Importer object.
 EbiDocVersion getLatestDocumentContentVersion(EbiContext context, String docID, boolean getBytes)
          Gets the latest Version of a Document whose ID is supplied.
 EbiLayoutDocDescriptor getLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID, String userAgent)
          Gets a Layout Document Descriptor.
 Collection getLayoutDocumentDescriptors(EbiContext context, String layoutStyleID)
          Gets the Layout Document Descriptors for a given Layout Style.
 Collection getLinkChildDocuments(EbiContext context, String docidParent)
          For a given Document, gets the list of Documents that are linked to it.
 Collection getLinkParentDocuments(EbiContext context, String docidChild)
          For a given document, gets the list of Documents to which it is linked.
 Collection getLinks(EbiContext context)
          Return the list of all the Document Links.
 Collection getLinks(EbiContext context, String docID, boolean isLinkParent)
          Get the list of Links that the specified Document is involved in.
 EbiDocQueryConverter getQueryConverter()
          Gets the document query converter object
 EbiQueryEngineDelegate getQueryEngine()
          Gets the Query Engine that this Content Manager is associated with.
 String getQueryEngineRepository()
          Gets the name of the Query Engine Repository (the one that this Content Manager is associated with).
 EbiRelatedElements getRelatedElements(EbiContext context, EbiFrameworkElement element, int relType, boolean checkAccess)
          Returns the list of elements that are related to the specified one.
 String getRepositoryID()
          Gets the Repository ID that the Content Manager instance is associated with.
 EbiDocCategory getRootCategory(EbiContext context)
          Gets the Root Category.
 EbiDirectory getRootDirectory(EbiContext context, String elType)
          Gets the Root Directory of the specified type.
 EbiDocFolder getRootFolder(EbiContext context)
          Gets the Root Folder.
 boolean hasAccess(EbiContext context, EbiSecurableElement el, String accessRight)
          Checks whether the user whose context is supplied, is authorized the specified type of access to the specified element.
 boolean hasAdminAccess(EbiContext context, String accessRight)
          Determine if the user whose context is passed in has a specific access right on the Content Admin element.
 boolean hasDirectoryEntryChildren(EbiDirectoryEntry entry)
          Tells whether the specified Directory Entry has any child Entries: For a Document, this will check if it has any child Documents.
 boolean isAuthorized(EbiContext context, EbiSecurableElement el, String accessRight)
          Checks whether the user whose context is supplied, is authorized the specified type of access to the specified element.
 boolean isDefaultContentManager()
          Tells whether this Content Manager is the one managing the Default Repository.
 boolean isDirectoryEntryChildOf(EbiDirectoryEntry child, EbiDirectoryEntry parent)
          Tells whether the specified Directory Entry is a child of the other Directory Entry: For a Document, a Folder, a Category, or another Document may be its parent.
 boolean isSystemContentManager()
          Tells whether this Content Manager is the one managing the System Repository.
 EbiDirectoryEntry lookupDirectoryEntry(EbiContext context, EbiDirectory parent, String path)
          Looks up a Directory Entry, given its path.
 EbiDirectoryEntry lookupDirectoryEntry(EbiContext context, String path, String elType)
          Looks up a Directory Entry, given its path and Directory Entry element type.
 EbiDocCategory moveCategory(EbiContext context, EbiDocCategory sourceCategory, EbiDocCategory destCategory, boolean withCategorySecurity, boolean overwrite)
          Moves the specified Category into the destination Category.
 EbiDirectoryEntry moveDirectoryEntry(EbiContext context, EbiDirectoryEntry entryToMove, EbiDirectoryEntry destEntry, boolean overwrite, int docParts)
          Moves a Directory Entry into the specified destination Entry.
 EbiDocument moveDocument(EbiContext context, EbiDocument doc, EbiDocFolder destFolder, boolean overwrite, int docParts)
          Moves the specified Document to be located under a new Parent Folder.
 EbiDocument moveDocument(EbiContext context, EbiDocument doc, EbiDocument newParentDoc)
          Moves the specified Document to be located under a new Parent Document.
 EbiDocFolder moveFolder(EbiContext context, EbiDocFolder sourceFolder, EbiDocFolder destFolder, boolean withFolderSecurity, boolean overwrite, int docParts)
          Moves the specified source Folder into the destination Folder.
 void publishDocumentContentVersion(EbiContext context, String docID, int versionID, boolean force, boolean overwrite)
          Publishes the specified Version of the specified Document.
 boolean removeAcl(EbiContext context, EbiSecurableElement el)
          Removes the Access Control List currently set for an element.
 boolean removeCategory(EbiContext context, String categoryID, boolean force)
          Removes a category.
 boolean removeContentData(EbiContext context, String docID)
          Deprecated. EbiContentManager.unpublishDocumentContent(EbiContext, String)
 boolean removeDirectory(EbiContext context, String path, String elType, boolean force)
          Removes the specified Directory
 boolean removeDocument(EbiContext context, String docID)
          Removes Document with the specified ID.
 boolean removeDocumentCategoryReference(EbiContext context, String docID, String categoryID)
          Removes a Document from the specified Category.
 boolean removeDocumentField(EbiContext context, String fieldID)
          Removes the specified Document Field.
 boolean removeDocumentLayoutSet(EbiContext context, String docID)
          For the Document with the specified ID, removes its Layout Set, if any.
 boolean removeDocumentLayoutStyle(EbiContext context, String layoutStyleID)
          Removes the specified Document Layout Style.
 boolean removeDocumentLink(EbiContext context, String docidParent, String docidChild)
          Removes the Link between the Link Parent and the Link Child Documents.
 boolean removeDocumentType(EbiContext context, String docTypeID)
          Removes the Document Type specified by its ID.
 boolean removeElementFully(EbiContext context, EbiFrameworkElement element)
          Removes the specified element fully, i.e.
 boolean removeFieldFromDocumentType(EbiContext context, String fieldID, String docTypeID)
          Removes the specified Field from the specified Document Type.
 boolean removeFieldFromDocumentType(EbiContext context, String fieldID, String docTypeID, boolean removeFieldValues)
          Removes the specified Field from the specified Document Type.
 boolean removeFolder(EbiContext context, String folderID, boolean force)
          Removes a Folder.
 boolean removeLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID)
          Removes the specified Layout Document Descriptor.
 void rollbackDocumentContent(EbiContext context, String docID, int rollbackVersionID, boolean publish)
          Rolls document content from the latest version back to the specified version.
 Collection runQuery(EbiContext context, EbiQuery query, boolean checkAccess)
          Given a query object, executes a search and return the results.
 void setAcl(EbiContext context, EbiSecurableElement el, Acl acl)
          Sets an Access Control List on an element.
 void setRepositoryID(String repositoryID)
          Sets the Repository ID that the Content Manager instance is to be associated with.
 boolean uncheckoutDocument(EbiContext context, String docID)
          Unchecks out the specified Document: releases the lock on the Document set by the user whose context is passed in.
 boolean unlockDocument(EbiContext context, String docID)
          Releases or "picks" the lock set on the Document with the specified ID.
 boolean unpublishDocumentContent(EbiContext context, String docID)
          Unpublishes the Content of a specific Document.
 void updateCategory(EbiContext context, EbiDocCategory category)
          Updates a category.
 void updateDocument(EbiContext context, EbiDocument document)
          Updates Metadata of the specified Document.
 void updateDocument(EbiContext context, EbiDocument document, boolean keepCheckedOut)
          Updates metadata of the specified Document.
 void updateDocumentExtnMeta(EbiContext context, String docID, EbiDocExtnMeta meta)
          Sets the Extension Metadata Field values for the given Document.
 void updateDocumentExtnMetaInfo(EbiContext context, String docID, EbiDocExtnMetaInfo extnMetaInfo)
          Sets the values of a specific Extension Metadata Field for the given Document.
 void updateDocumentField(EbiContext context, EbiDocField field)
          Update the Metadata of the specified Document Field.
 void updateDocumentLayoutSet(EbiContext context, EbiDocLayoutSet layoutSet)
          For a given Document, specifies its Document Layout Set.
 void updateDocumentLayoutStyle(EbiContext context, EbiDocLayoutStyle layoutStyle)
          Updates the specified Document Layout Style.
 void updateDocumentLink(EbiContext context, EbiDocLink link)
          Updates the specified Document Link.
 void updateDocumentLink(EbiContext context, String docidParent, String docidChild, int newVersionIdChild)
          Updates the specified Document Link.
 void updateDocumentType(EbiContext context, EbiDocType docType)
          Updates the Document Type.
 void updateFolder(EbiContext context, EbiDocFolder folder)
          Updates a Folder.
 void updateLayoutDocumentDescriptor(EbiContext context, EbiLayoutDocDescriptor desc, String newUserAgent)
          Updates a specified Layout Document Descriptor.
 EbiDirectory validateDirectory(EbiContext context, String path, String elType)
          Checks to see if the specified Directory exists.
 String validateOperation(EbiContext context, String elID, String elType, int opCode)
          Tells whether or not a specific operation is valid for the given element of a specific type.
 
Methods implemented from interface com.sssw.fw.event.api.EbiStateChangeListener
stateChanged
 
Methods implemented from interface com.sssw.cm.event.api.EbiStateChangeProducer
addCategoryStateChangeListener, addDocumentStateChangeListener, addFolderStateChangeListener, addStateChangeListener, addVetoableCategoryStateChangeListener, addVetoableDocumentStateChangeListener, addVetoableFolderStateChangeListener, addVetoableStateChangeListener
 
Methods implemented from interface com.sssw.fw.event.api.EbiEventListener
getListenerDescription, getLog, setListenerDescription, setLog
 
Methods implemented from interface com.sssw.fw.event.api.EbiStateChangeProducer
addStateChangeListener, addStateChangeListener, addVetoableStateChangeListener, addVetoableStateChangeListener, fireStateChange, fireVetoableStateChange, getListeners, getScpDescription, getScpLog, getVetoableListeners, hasListeners, hasVetoableListeners, removeStateChangeListener, removeVetoableStateChangeListener, setScpDescription, setScpLog
 

Field Detail

CONTENT_MGR

public static final String CONTENT_MGR
The Content Manager identifier string. This is used to obtain an instance of the Content Manager:
 EbiContentManager cmgr = com.sssw.fw.factory.EboFactory.getManager(EbiContentManager.CONTENT_MGR);
 

CM_QUALIFIER

public static final String CM_QUALIFIER
The qualifier/identifier of CM as a subsystem

CM_FULL_QUALIFIER

public static final String CM_FULL_QUALIFIER
The full qualifier/identifier of CM as a subsystem

COMPARE_NONE

public static final int COMPARE_NONE
The mode for "do not compare user agents" for the getDocumentLayout method. This is useful for asking for the default Layout right away.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)

COMPARE_ALL

public static final int COMPARE_ALL
The mode for "compare all the properties of user agents": browser names, browser versions (major and minor), and platforms. Use for the getDocumentLayout method.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)

COMPARE_NAMES

public static final int COMPARE_NAMES
The mask for "compare browser names". Use for the getDocumentLayout method.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)

COMPARE_MAJOR_VERS

public static final int COMPARE_MAJOR_VERS
The mask for "compare major versions". Use for the getDocumentLayout method.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)

COMPARE_MINOR_VERS

public static final int COMPARE_MINOR_VERS
The mask for "compare minor versions". Use for the getDocumentLayout method.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)

COMPARE_PLATFORMS

public static final int COMPARE_PLATFORMS
The mask for "compare platforms". Use for the getDocumentLayout method.
See Also:
EbiContentManager.getDocumentLayout(EbiContext, String, int, boolean)
Method Detail

setRepositoryID

public void setRepositoryID(String repositoryID)
                     throws EboUnrecoverableSystemException
Sets the Repository ID that the Content Manager instance is to be associated with.
Parameters:
repositoryID - the ID of the repository

getRepositoryID

public String getRepositoryID()
                       throws EboUnrecoverableSystemException
Gets the Repository ID that the Content Manager instance is associated with.
Returns:
the repository ID

isSystemContentManager

public boolean isSystemContentManager()
                               throws EboUnrecoverableSystemException
Tells whether this Content Manager is the one managing the System Repository.
Returns:
true if this is the System Content Manager, false otherwise

isDefaultContentManager

public boolean isDefaultContentManager()
                                throws EboUnrecoverableSystemException
Tells whether this Content Manager is the one managing the Default Repository.

getDataSource

public String getDataSource()
                     throws EboUnrecoverableSystemException
Gets the name of the Data Source that this Content Manager is associated with
Returns:
the name of the Data Source

addDocumentType

public EbiDocType addDocumentType(EbiContext context,
                                  String name,
                                  String description,
                                  String[] fieldIDs,
                                  Acl acl)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Adds a Document Type.

Security constraints:
The user whose context is passed in needs to have the Write permission on the Content Admin element.

Example:

 EbiDocField fldCast = cmgr.getDocumentFieldByName(context, "Cast");
 EbiDocField fldDirector = cmgr.getDocumentFieldByName(context, "Director");
 EbiDocField fldGenre = cmgr.getDocumentFieldByName(context, "Genre");
 String[] fieldIDs = { fldCast.getFieldID(), fldDirector.getFieldID(), fldGenre.getFieldID() };
 java.security.acl acl = ... // see com.sssw.fw.security.client.EboFactory
 EbiDocType docType = cmgr.addDocumentType(
     context, "MovieReview", "The Moview Review Doctype", fieldIDs, acl);
 
Parameters:
context - context
name - the name of the new Document Type; must be unique
description - the description of the Document Type (optional)
fieldIDs - the IDs of Fields that every Document of this type will have
acl - the Access Control List for the new Document Type; null value is allowed
Returns:
EbiDocType representing the new type
See Also:
EboFactory, EbiContentManager.getDocumentFieldByName(EbiContext, String), EbiContentManager.getDocumentFieldByID(EbiContext, String)

addDocumentType

public EbiDocType addDocumentType(EbiContext context,
                                  String name,
                                  String description,
                                  String[] fieldIDs,
                                  byte[] extnMeta,
                                  Acl acl)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Adds a Document Type.

Security constraints:
The user whose context is passed in needs to have the Write permission on the Content Admin element.

Example:

 EbiDocField fldCast = cmgr.getDocumentFieldByName(context, "Cast");
 EbiDocField fldDirector = cmgr.getDocumentFieldByName(context, "Director");
 EbiDocField fldGenre = cmgr.getDocumentFieldByName(context, "Genre");
 String[] fieldIDs = { fldCast.getFieldID(), fldDirector.getFieldID(), fldGenre.getFieldID() };
 String meta = "The extension metadata follows....";
 java.security.acl acl = ... // see com.sssw.fw.security.client.EboFactory
 EbiDocType docType = cmgr.addDocumentType(
     context, "MovieReview", "The Moview Review Doctype", fieldIDs, meta.getBytes(), acl);
 
Parameters:
context - context
name - the name of the new Document Type
description - the description of the Document Type (optional)
fieldIDs - the IDs of fields that every Document of this type will have
extnMeta - Extension Metadata
acl - the Access Control List for the new Document Type; null value is allowed
Returns:
EbiDocType representing the new Type

addDocumentType

public void addDocumentType(EbiContext context,
                            EbiDocType type,
                            String[] fieldIDs,
                            Acl acl)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException,
                            EboItemExistenceException
Adds a Document Type.

Security constraints:
The user whose context is passed in needs to have the Write permission on the Content Admin element.

Example:

 EbiDocField fldCast = cmgr.getDocumentFieldByName(context, "Cast");
 EbiDocField fldDirector = cmgr.getDocumentFieldByName(context, "Director");
 EbiDocField fldGenre = cmgr.getDocumentFieldByName(context, "Genre");
 String[] fieldIDs = { fldCast.getFieldID(), fldDirector.getFieldID(), fldGenre.getFieldID() };
 java.security.acl acl = ... // see com.sssw.fw.security.client.EboFactory
 EbiDocType type = com.sssw.cm.factory.EboFactory.getElement(EbiDocType.EL_DOC_TYPE);
 cmgr.addDocumentType(
     context, type, fieldIDs, acl);
 
Parameters:
context - context
type - the new Type
fieldIDs - the IDs of Fields that every Document of this Type will have
acl - the Access Control List for the new Document Type; null value is allowed

getDocumentTypes

public Collection getDocumentTypes(EbiContext context)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException
Enumerates existing Document Types.

Note: this method returns all of the available Document Types without any security filtering. Use getFilteredDocumentTypes if you want the API to do security filtering. Example:

 Iterator iterTypes = cmgr.getDocumentTypes(context).iterator();
 while (iterTypes.hasNext())
    EbiDocType type = (EbiDocType)iterTypes.next();
 
Parameters:
context - context
Returns:
Collection of EbiDocType's

getFilteredDocumentTypes

public Collection getFilteredDocumentTypes(EbiContext context)
                                    throws EboUnrecoverableSystemException,
                                           EboSecurityException
Enumerates existing Document Types.

Security constraints:
Only the types to which the user whose context is passed in has access, are returned. In order for a type to be in the returned list, the user must have Read access to it, or they must have the Read access to the Content Admin element. Example:

 Iterator iterTypes = cmgr.getFilteredDocumentTypes(context).iterator();
 while (iterTypes.hasNext())
    EbiDocType type = iterTypes.next();
 
Parameters:
context - context
Returns:
Collection of EbiDocType's

getDocumentTypeByName

public EbiDocType getDocumentTypeByName(EbiContext context,
                                        String docTypeName)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException
Gets a specific Document Type by name.

Security constraints:
The user whose context is passed in must have the Read access to the Document type, or the Read access to the Content Admin element; otherwise a security exception is thrown. Example:

 EbiDocType type = cmgr.getDocumentTypeByName(context, "MovieReview");
 
Parameters:
context - context
name - Document type's name
Returns:
the EbiDocType representing the Document type or null if not found

getDocumentTypeByID

public EbiDocType getDocumentTypeByID(EbiContext context,
                                      String docTypeID)
                               throws EboUnrecoverableSystemException,
                                      EboSecurityException
Gets a specific Document Type by ID.

Security constraints:
The user whose context is passed in must have the Read access to the Document type, or the Read access to the Content Admin element; otherwise a security exception is thrown. Example:

 EbiDocument doc = ...
 EbiDocType type = cmgr.getDocumentTypeByID(context, doc.getDocTypeID());
 
Parameters:
context - context
ID - Document type's ID
Returns:
the EbiDocType representing the Document type or null if not found

removeDocumentType

public boolean removeDocumentType(EbiContext context,
                                  String docTypeID)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Removes the Document Type specified by its ID.

Security constraints:
The user whose context is passed in must have the Write access to the Document Type or the Write access to the Content Admin element; otherwise a security exception is thrown. Example:

 boolean removed = cmgr.removeDocumentType(context, docTypeID);
 
Parameters:
context - context
docTypeID - the Document Type ID
Returns:
true if the Type was successfully removed, false if the Type was not found

updateDocumentType

public void updateDocumentType(EbiContext context,
                               EbiDocType docType)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Updates the Document Type.

Security constraints:
The user whose context is passed in must have the Write access to the Document Type or the Write access to the Content Admin element; otherwise a security exception is thrown. Example:

 EbiDocType type = ...
 type.setDescription("The Movie Review Document Type");
 cmgr.updateDocumentType(context, type);
 
Parameters:
context - context
docType - the updated Document Type

createAddDocumentParams

public EbiAddDocumentParams createAddDocumentParams()
Creates an "add document parameters" object that is used in the addDocument method.

Returns:
a EbiAddDocumentParams object
See Also:
EbiAddDocumentParams

addDocument

public EbiDocument addDocument(EbiContext context,
                               EbiAddDocumentParams params)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Adds a Document.

Notes:

Security constraints:
Unless the user whose context is passed in, has the Write access to the Content Admin element, the following constraints apply:

  1. The user must have the Write access to the folder in which the Document is being created.
  2. They must have the Write access to the Document type that is assigned to the Document.
  3. They must have the Write access to every category to which this Document is assigned.

Example:

 // Get the doctype
 EbiDocType type = cmgr.getDocumentTypeByName(context, "Movie Review");
 // Get the folder
 EbiDocFolder folder = (EbiDocFolder)cmgr.lookupDirectoryEntry(
     context, "MyApp/MovieReviews/Current", EbiDocFolder.EL_DOC_FOLDER);

 // Figure out the fields we need to fill out for the Document
 EbiDocField fldDirector = cmgr.getDocumentFieldByName(context, "Director");
 EbiDocField fldGenre = cmgr.getDocumentFieldByName(context, "Genre");
 EbiDocField fldYear = cmgr.getDocumentFieldByName(context, "Year");
 EbiDocField fldCast = cmgr.getDocumentFieldByName(context, "Cast");

 // New up an extension metadata information holder
 EbiDocExtnMeta extnMetaData = cmgr.createExtnMeta();

 // Add the director information
 EbiDocExtnMetaInfo infoDirector = cmgr.createExtnMetaInfo(fldDirector);
 String[] director = { "Brian De Palma" };
 infoDirector.setFieldValues(director);
 extnMetaData.setExtnMetaInfo(infoDirector);

 // Add the genre information
 EbiDocExtnMetaInfo infoGenre = cmgr.createExtnMetaInfo(fldGenre);
 String[] genre = { "Sci-Fi", "Adventure" };
 infoGenre.setFieldValues(genre);
 extnMetaData.setExtnMetaInfo(infoGenre);

 // Add the year of production information
 EbiDocExtnMetaInfo infoYear = cmgr.createExtnMetaInfo(fldYear);
 Integer[] year = { new Integer(2000) };
 infoYear.setFieldValues(year);
 extnMetaData.setExtnMetaInfo(infoYear);

 // Add the cast list
 EbiDocExtnMetaInfo infoCast = cmgr.createExtnMetaInfo(fldCast);
 String[] cast = { "Gary Sinise", "Tim Robbins", "Don Cheadle", "Connie Nielsen" };
 infoCast.setFieldValues(cast);
 extnMetaData.setExtnMetaInfo(infoCast);

 // Specify the Layout set for the new Document (optional)
 EbiDocLayoutStyle style = cmgr.getDocumentLayoutStyle(
    context, type.getDocTypeID(), "WithPicOnLeft");
 EbiDocLayoutSet layoutSet = cmgr.createDocLayoutSet(context, style.getStyleID());

 // Create a Document version descriptor for the layout Document
 // that is used for Netscape clients (use version 5 of it).
 EbiDocVersionDescriptor layout1 = cmgr.createDocVersionDescriptor(
    context, id1, 5);
 layoutSet.setLayoutDescriptor(layout1);

 // Create a Document version descriptor for the layout Document
 // that is used for Internet Explorer clients (we will use
 // whatever the currently published version is for that Document).
 EbiDocVersionDescriptor layout2 = cmgr.createDocVersionDescriptor(
    context, id2, -1);
 layoutSet.setLayoutDescriptor(layout2);

 // The IDs of categories to which the Document will belong:
 // "Entertainment" and "Movies".
 EbiDocCategory cat1 = cmgr.lookupDirectoryEntry(
    context, "Entertainment", EbiDocCategory.EL_DOC_CATEGORY);
 EbiDocCategory cat2 = cmgr.lookupDirectoryEntry(
    context, "Movies", EbiDocCategory.EL_DOC_CATEGORY);
 String[] categoryIDs = { cat1.getID(), cat2.getID() };

 // Now, add the Document
 String docAbstract = "When the first manned mission to Mars....";
 String docContent = "Houston, we have a problem....";
 Date expirationDate = DateFormat.getDateInstance().parse("07/10/2001 4:50 PM, PDT");
 byte[] content = docContent.getBytes();

 EbiAddDocumentParams params = cmgr.createAddDocumentParams();

 params.setName("MissionToMars");
 params.setDocTypeID(type.getDocTypeID());
 // The Document will be added to the current movie reviews folder
 params.setFolderID(folder.getID());
 params.setCategories(categoryIDs);
 params.setAuthor("Bob Smith");
 params.setTitle("Mission to Mars");
 params.setSubtitle("Let there be life.");
 params.setAbstract(docAbstract);
 params.setExpirationDate(new Timestamp(expirationDate.getTime()));
 params.setExtensionMetaData(extnMetaData);
 params.setLayoutSet(layoutSet);
 params.setStatus(null);
 params.setMimeType("text/xml");
 params.setContent(content);
 params.setComment("Initial revision.");
 params.setAcl(null); // no ACL, inherit ACL of parent folder
 params.setPublishImmediately(true);

 EbiDocument document = cmgr.addDocument(ctx, params);
 
Parameters:
context - context
params - the parameters defining the new Document
Returns:
EbiDocument representing the new Document

getDocument

public EbiDocument getDocument(EbiContext context,
                               String docID)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Gets the Document specified by its ID.

Security constraints:
The user whose context is passed in must have the Read access to the Document or the Read access to the Content Admin element.

Parameters:
context - context
docID - the ID of the Document
Returns:
EbiDocument representing the Document or null if not found

getDocumentsByType

public Collection getDocumentsByType(EbiContext context,
                                     String docTypeID)
                              throws EboUnrecoverableSystemException,
                                     EboSecurityException,
                                     EboItemExistenceException
Gets the list of Documents of the specified Type.

Security constraints:
The user whose context is passed in must have the List access to the Document Type, or the Read access on the Content Admin element.

Note: this method returns all the Documents that belong to the Type, without any security filtering. Use getFilteredDocumentsByType if you want the API to do the security filtering.

 Iterator iterDocs = cmgr.getDocumentsByType(context, docTypeID).iterator();
 while (iterDocs.hasNext())
    EbiDocument doc = (EbiDocument)iterDocs.next();
 
Parameters:
context - context
docTypeID - the Document Type's ID
Returns:
a Collection of EbiDocument's

getFilteredDocumentsByType

public Collection getFilteredDocumentsByType(EbiContext context,
                                             String docTypeID)
                                      throws EboUnrecoverableSystemException,
                                             EboSecurityException,
                                             EboItemExistenceException
Gets the list of Documents of the specified Type.

Security constraints:

 Iterator iterDocs = cmgr.getFilteredDocumentsByType(context, docTypeID).iterator();
 while (iterDocs.hasNext())
    EbiDocument doc = (EbiDocument)iterDocs.next();
 
Parameters:
context - context
docTypeID - the Document Type ID
Returns:
a Collection of EbiDocument's

getContent

public EbiDocContent getContent(EbiContext context,
                                String docID,
                                boolean getBytes)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Gets the Content for the Document with the specified ID. This method gets the published/final Version of the Document and returns null if no final version was found, which can be because the Document has no content at all or because it has no final Version of it.

Security constraints:
The user whose context is passed in must have the Read access on the Document, or the Read access on the Content Admin element.

Parameters:
context - context
docID - the ID of the Document whose content is to be retrieved; the ID must point to an existing Document
getBytes - whether to include the actual Content in the returned EbiDocContent, or just the Metadata describing Content
Returns:
EbiDocContent representing the content, or null if the Document has no published Version of its Content.

removeContentData

public boolean removeContentData(EbiContext context,
                                 String docID)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Deprecated. EbiContentManager.unpublishDocumentContent(EbiContext, String)

Removes the Content of a specific Document. This does not remove the actual Document, just its content. The content is removed from the "live"/publish area that holds the "final"/"current" Version of the Document's content.

Security constraints:
The user whose context is passed in must have the Publish access to the Document, or the Write access to the Content Admin element.

Parameters:
context - context
docID - the ID of the Document whose content is to be removed
Returns:
true if successfully removed the Content data, or false if there was no Content found for the Document

unpublishDocumentContent

public boolean unpublishDocumentContent(EbiContext context,
                                        String docID)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException
Unpublishes the Content of a specific Document.
Parameters:
context - context
docID - the ID of the Document
Returns:
true if successfully unpublished the Content, or false if there was no Content found for the Document

updateDocument

public void updateDocument(EbiContext context,
                           EbiDocument document)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Updates Metadata of the specified Document.

General constraints:
The Document must be checked out before the updates can be made. Once updateDocument is done, it automatically releases the lock on the Document.

Security constraints:
The user whose context is passed in must have the Write access to the Document, or the Write access to the Content Admin element.

 EbiDocument doc = ...
 doc.setTitle("The new title...");
 cmgr.updateDocument(context, doc);
 
Parameters:
context - context
document - the Document

updateDocument

public void updateDocument(EbiContext context,
                           EbiDocument document,
                           boolean keepCheckedOut)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Updates metadata of the specified Document.

General constraints:
The Document must be checked out before the updates can be made.

Security constraints:
The user whose context is passed in must have the Write access to the Document, or the Write access to the Content Admin element.

 EbiDocument doc = ...
 doc.setTitle("The new title...");
 cmgr.updateDocument(context, doc, true);
 
Parameters:
context - context
document - the Document
keepCheckedOut - if true, the Document is kept checked out to the user, if false, the lock is released and the Document is made available for other users' changes

removeDocument

public boolean removeDocument(EbiContext context,
                              String docID)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException,
                              EboItemExistenceException
Removes Document with the specified ID. To remove just the Content of the Document, use removeContentData.

Security constraints:
The user whose context is passed in must have the Write access to the Document, or the Write access to the Content Admin element.

General constraints:

The following pieces are removed:

Parameters:
context - context
docID - the ID of the Document to be removed
Returns:
true if the Document has been successfully removed, false if it was not found

getChildDocuments

public Collection getChildDocuments(EbiContext context,
                                    String docID)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Enumerates the Documents that are Children of the specified Document. This is different from getLinkChildDocuments, since this method returns the Child Documents, not the Linked Documents.

Note: this method does not perform any security filtering of returned results. Use getFilteredChildDocuments if you want the API to perform the security filtering.

Parameters:
context - context
docID - the ID of the Document to list Children for
Returns:
a Collection of EbiDocument's each of which represents a Child Document; empty if none found

getFilteredChildDocuments

public Collection getFilteredChildDocuments(EbiContext context,
                                            String docID)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
Enumerates the Documents that are Children of the specified Document. This is different from getLinkChildDocuments, since this method returns the Child Documents, not the Linked Documents.

Security constraints:
Only the Child Documents accessible to the user whose context is passed in, are returned. The user must have the Read access to the child Document or the Read access to the Content Admin element, in order for the Document to be returned as part of the collection.

Parameters:
context - context
docID - the ID of the Document to list Children for
Returns:
a Collection of EbiDocument's each of which represents a Child Document; empty if none found

moveDocument

public EbiDocument moveDocument(EbiContext context,
                                EbiDocument doc,
                                EbiDocument newParentDoc)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Moves the specified Document to be located under a new Parent Document.
Parameters:
context - context
doc - the Document to move
newParentDoc - the new Parent Document
Returns:
refreshed Document object for the newly moved Document

moveDocument

public EbiDocument moveDocument(EbiContext context,
                                EbiDocument doc,
                                EbiDocFolder destFolder,
                                boolean overwrite,
                                int docParts)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Moves the specified Document to be located under a new Parent Folder.

Example:

 EbiDocument movedDoc = cmgr.moveDocument(
    context, doc, destFolder, true, EbiDocument.DOC_PART_META | EbiDocument.DOC_PART_CONTENT);
 
Parameters:
context - context
doc - the Document to move
destFolder - the new Parent Folder (destination)
overwrite - if true, overwrite any Document with the same name in the destination Folder
docParts - which parts to move, see EbiDocument.DOC_PART_XXXX
Returns:
the refreshed Document object for the moved Document

copyDocument

public EbiDocument copyDocument(EbiContext context,
                                EbiDocument doc,
                                EbiDocument newParentDoc)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Copies the specified Document to another Parent Document.
Parameters:
context - context
doc - the Document to move
newParentDoc - the new Parent Document
Returns:
refreshed Document object for the newly moved Document

copyDocument

public EbiDocument copyDocument(EbiContext context,
                                EbiDocument doc,
                                EbiDocFolder destFolder,
                                boolean overwrite,
                                int docParts)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Copies the specified Document to the specified destination Folder. Example:
 EbiDocument copiedDoc = cmgr.copyDocument(
    context, doc, destFolder, true, EbiDocument.DOC_PART_META | EbiDocument.DOC_PART_CONTENT);
 
Parameters:
context - context
doc - the Document to copy
destFolder - the destination Folder
overwrite - if true, overwrite any Document with the same name in the destination Folder
docParts - which parts to move, see EbiDocument.DOC_PART_XXXX
Returns:
the Document object for the copied Document

addDocumentField

public EbiDocField addDocumentField(EbiContext context,
                                    String fieldName,
                                    String valueType,
                                    byte[] extnMeta,
                                    Acl acl)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Creates a new Document Extension Metadata Field. Note: 'fieldName' must specify a unique name; the expected values for 'valueType' are specified in EbiDocField (FT_BOOLEAN, FT_STRING, etc.) Field names are case-sensitive.

Security constraints:
The user whose context is passed in must have the Write access to the Content Admin element. Example:

 String meta = ...
 EbiDocField field = cmgr.addDocumentField(
    context, "Year", EbiDocField.FT_INTEGER, meta.getBytes(), acl);
 
Parameters:
context - context
fieldName - the name of the new Field; must be unique
valueType - the description of the Field's value type
extnMeta - Extension Metadata
acl - the Access Control List for the new Field
Returns:
EbiDocField representing the new Field
See Also:
EbiDocField

addDocumentField

public void addDocumentField(EbiContext context,
                             EbiDocField field,
                             Acl acl)
                      throws EboUnrecoverableSystemException,
                             EboSecurityException,
                             EboItemExistenceException
Creates a new Document Extension Metadata Field. Security constraints:
The user whose context is passed in must have the Write access to the Content Admin element. Example:
 EbiDocField field = (EbiDocField)com.sssw.cm.factory.EboFactory.getElement(EbiDocField.EL_DOC_FIELD);
 field.setFieldName("Year");
 field.setFieldValueType(EbiDocField.FT_INTEGER);
 field.setExtensionMeta("Some extension meta...".getBytes());
 cmgr.addDocumentField(context, field, acl);
 
Parameters:
context - context
field - the Field to add
acl - the Access Control List for the new Field
See Also:
EbiDocField

removeDocumentField

public boolean removeDocumentField(EbiContext context,
                                   String fieldID)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException
Removes the specified Document Field.

Security constraints:
The user whose context is passed in must have the Write access to the Content Admin element.

Notes:

Parameters:
context - context
fieldID - the ID of the Field to be removed
Returns:
true if the Field was successfully removed, false if it was not found
See Also:
EbiDocField

updateDocumentField

public void updateDocumentField(EbiContext context,
                                EbiDocField field)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Update the Metadata of the specified Document Field.

Security constraints:
The user whose context is passed in must have the Write access to the Document Field or to the Content Admin element.

Parameters:
context - context
field - the Field with updated information
See Also:
EbiDocField

getDocumentFields

public Collection getDocumentFields(EbiContext context)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException
Enumerates all the existing Document Fields.

Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentFields if you want the API to perform the security filtering.

 Iterator iterFields = cmgr.getDocumentFields(context).iterator();
 while (iterFields.hasNext())
    EbiDocField field = (EbiDocField)iterFields.next();
 
Parameters:
context - context
Returns:
Collection of EbiDocField's; the collection is empty if there are no Fields defined
See Also:
EbiDocField

getFilteredDocumentFields

public Collection getFilteredDocumentFields(EbiContext context)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException
Enumerates all the existing Document Fields.

Security constraints:
Only the fields accessible to the user whose context is passed in, are returned. The user must have the Read access to the field or the Read access to the Content Admin element, in order for the field to be returned as part of the collection.

Parameters:
context - context
Returns:
Collection of EbiDocField's; the collection is empty if there are no fields defined
See Also:
EbiDocField

getDocumentFieldByName

public EbiDocField getDocumentFieldByName(EbiContext context,
                                          String fieldName)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException
Gets a Document Field by name.

Security constraints:
The user whose context is passed in must have the Read access to the Document Field or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
fieldName - the name of the Field
Returns:
EbiDocField representing the Field or null if not found
See Also:
EbiDocField

getDocumentFieldByID

public EbiDocField getDocumentFieldByID(EbiContext context,
                                        String fieldID)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException
Gets a Document Field by ID.

Security constraints:
The user whose context is passed in must have the Read access to the document field or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
fieldID - the ID of the Field
Returns:
EbiDocField representing the Field or null if not found
See Also:
EbiDocField

getDocumentFields

public Collection getDocumentFields(EbiContext context,
                                    String docTypeID)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Enumerates the Document Fields for a given Document Type.

Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentFields if you want the API to perform the security filtering.

Parameters:
context - context
docTypeID - the ID of the Document Type
Returns:
Collection of EbiDocField's for this Document Type
See Also:
EbiDocField

getFilteredDocumentFields

public Collection getFilteredDocumentFields(EbiContext context,
                                            String docTypeID)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
Enumerates the Document Fields for a given Document Type.

Security constraints:
Only the Fields accessible to the user whose context is passed in, are returned. The user must have the Read access to the Field or the Read access to the Content Admin element, in order for the field to be returned as part of the collection.

Parameters:
context - context
docTypeID - the ID of the Document Type
Returns:
Collection of EbiDocField's for this Document Type
See Also:
EbiDocField

getDocumentTypesWithField

public Collection getDocumentTypesWithField(EbiContext context,
                                            String fieldID)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
Enumerates the Document Types that have the given Field.

Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentTypesWithField if you want the API to perform the security filtering.

 Iterator iterTypes = cmgr.getDocumentTypesWithField(context, fieldID).iterator();
 while (iterTypes.hasNext())
    EbiDocType type = (EbiDocType)iterTypes.next();
 
Parameters:
context - context
fieldID - the ID of the Field
Returns:
Collection of EbiDocType's that all share this Field; empty if none found
See Also:
EbiDocField, EbiDocType

getFilteredDocumentTypesWithField

public Collection getFilteredDocumentTypesWithField(EbiContext context,
                                                    String fieldID)
                                             throws EboUnrecoverableSystemException,
                                                    EboSecurityException,
                                                    EboItemExistenceException
Enumerates the Document Types that have the given Field.

Security constraints:
Only the Types accessible to the user whose context is passed in, are returned. The user must have the Read access to the Type or the Read access to the Content Admin element, in order for the type to be returned as part of the collection.

 Iterator iterTypes = cmgr.getFilteredDocumentTypesWithField(
    context, fieldID).iterator();
 while (iterTypes.hasNext())
    EbiDocType type = (EbiDocType)iterTypes.next();
 
Parameters:
context - context
fieldID - the ID of the field
Returns:
Collection of EbiDocType's that all share this field; empty if none found
See Also:
EbiDocField, EbiDocType

addFieldToDocumentType

public void addFieldToDocumentType(EbiContext context,
                                   String fieldID,
                                   String docTypeID)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException,
                                   EboItemExistenceException
Adds the specified field to the specified document type. Note that any documents of this type added prior to the addition of the field, will have null values for this field.

Security constraints:
The user whose context is passed in must have the Write access to the Document Type or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
fieldID - the ID of the Field to add to the Type
docTypeID - the ID of the Document Type to which the Field is to be added

removeFieldFromDocumentType

public boolean removeFieldFromDocumentType(EbiContext context,
                                           String fieldID,
                                           String docTypeID)
                                    throws EboUnrecoverableSystemException,
                                           EboSecurityException,
                                           EboItemExistenceException
Removes the specified Field from the specified Document Type.

Notes:

Security constraints:
The user whose context is passed in must have the Write access to the Document Type or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
fieldID - the ID of the Field to remove
docTypeID - the ID of the Document Type from which the Field is removed
Returns:
true if the field was successfully removed from the type, false if the field was not part of the Type

removeFieldFromDocumentType

public boolean removeFieldFromDocumentType(EbiContext context,
                                           String fieldID,
                                           String docTypeID,
                                           boolean removeFieldValues)
                                    throws EboUnrecoverableSystemException,
                                           EboSecurityException,
                                           EboItemExistenceException
Removes the specified Field from the specified Document Type.

Notes:

Security constraints:
The user whose context is passed in must have the Write access to the Document Type or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
fieldID - the ID of the Field to remove
docTypeID - the ID of the Document Type from which the Field is removed
removeFieldValues - if true, any values that had been set on existing Documents (of the specified Type) for this field, are removed
Returns:
true if the Field was successfully removed from the Type, false if the Field was not part of the Type

createExtnMetaInfo

public EbiDocExtnMetaInfo createExtnMetaInfo(EbiDocField field)
Creates a blank Extension Metadata Info for the given Extension Field. This is a factory method that just creates an Extension Meta Info which may be used in EbiDocExtnMeta.setExtnMetaInfo.
Parameters:
field - the extension field
Returns:
the new extension meta info object
See Also:
EbiDocExtnMetaInfo, EbiDocExtnMeta, EbiDocField

createExtnMeta

public EbiDocExtnMeta createExtnMeta()
Creates a blank Extension Meta object which will act as a holder of Extension Meta Info's. The created object may be used in the addDocument and updateDocumentExtnMeta methods.
Returns:
the new Extension Metadata object
See Also:
EbiDocExtnMetaInfo, EbiDocExtnMeta, EbiDocField

getDocumentExtnMetaInfo

public EbiDocExtnMetaInfo getDocumentExtnMetaInfo(EbiContext context,
                                                  String docID,
                                                  String extnFieldID)
                                           throws EboUnrecoverableSystemException,
                                                  EboSecurityException,
                                                  EboItemExistenceException
Given the name of an Extension Metadata Field for a specific Document, retrieves the set of values of that Field.

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the Document ID
extnFieldID - the ID of the Extension Metadata Field
Returns:
EbiDocExtnMetaInfo containing the Field values

updateDocumentExtnMetaInfo

public void updateDocumentExtnMetaInfo(EbiContext context,
                                       String docID,
                                       EbiDocExtnMetaInfo extnMetaInfo)
                                throws EboUnrecoverableSystemException,
                                       EboSecurityException,
                                       EboItemExistenceException
Sets the values of a specific Extension Metadata Field for the given Document. Note: the supplied values overwrite whatever values the field may already have for this Document.

General constraints:
The Document must be checked out before the updates can be made.

Security constraints:
The user whose context is passed in must have the Read access to the document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document
extnMetaInfo - the descriptor of the Extension Metadata Field

getDocumentExtnMeta

public EbiDocExtnMeta getDocumentExtnMeta(EbiContext context,
                                          String docID)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          EboItemExistenceException
Gets the Extension Metadata for the given Document. The Extension Meta contains a list of Field names mapped to their values.

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document
Returns:
the EbiDocExtnMeta for the Document

updateDocumentExtnMeta

public void updateDocumentExtnMeta(EbiContext context,
                                   String docID,
                                   EbiDocExtnMeta meta)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException,
                                   EboItemExistenceException
Sets the Extension Metadata Field values for the given Document.

General constraints:
The Document must be checked out before the updates can be made.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the Document ID
meta - the Extension Metadata defining the Field name / Field values mappings for the specified Document

getDocumentLayoutStyles

public Collection getDocumentLayoutStyles(EbiContext context,
                                          String docTypeID)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          EboItemExistenceException
Enumerates all the Document Layout Styles that were created for the specified Document Type. E.g. for the type "Movie Review", the existing Styles may be "with the picture on the right", "with the picture on the left", etc.

Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentTypesWithField if you want the API to perform the security filtering.

Parameters:
context - context
docTypeID - the ID of the Document Type for which the associated Layout Styles are to be enumerated
Returns:
Collection of EbiDocLayoutStyle's that are the Styles associated with the specified Document Type

getFilteredDocumentLayoutStyles

public Collection getFilteredDocumentLayoutStyles(EbiContext context,
                                                  String docTypeID)
                                           throws EboUnrecoverableSystemException,
                                                  EboSecurityException,
                                                  EboItemExistenceException
Enumerates all the Document Layout Styles that were created for the specified Document Type. E.g. for the type "Movie Review", the existing styles may be "with the picture on the right", "with the picture on the left", etc.

Security constraints:
Only the styles accessible to the user whose context is passed in, are returned. The user must have the Read access to the style or the Read access to the Content Admin element, in order for the style to be returned as part of the collection.

Parameters:
context - context
docTypeID - the ID of the Document Type for which the associated Layout Styles are to be enumerated
Returns:
Collection of EbiDocLayoutStyle's that are the Styles associated with the specified Document Type

addDocumentLayoutStyle

public EbiDocLayoutStyle addDocumentLayoutStyle(EbiContext context,
                                                String docTypeID,
                                                String styleName,
                                                String description,
                                                boolean isDefault,
                                                Acl acl)
                                         throws EboUnrecoverableSystemException,
                                                EboSecurityException,
                                                EboItemExistenceException
Adds a new Document Layout Style for the specified Document Type. E.g. for the type "Movie Review", add a new Style where the picture is shown on the left hand side.

Security constraints:
The user whose context is passed in must have the Write access to the Document Type whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docTypeID - the ID of the Document Type for which this Style is being created
styleName - the name of the style; must be unique within the set of styles defined on the Document Type
description - the description of the new Style
isDefault - whether this Style is to be used as the default Style for the specified Document Type; using 'true' will reset any previously specified default to not be the default
acl - the access control list for the new Layout Style; the value of null is allowed
Returns:
the Layout Style object representing the newly created Layout Style

addDocumentLayoutStyle

public void addDocumentLayoutStyle(EbiContext context,
                                   EbiDocLayoutStyle style,
                                   Acl acl)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException,
                                   EboItemExistenceException
Adds a new Document Layout Style for the specified Document Type. E.g. for the type "Movie Review", add a new style where the picture is shown on the left hand side.

Security constraints:
The user whose context is passed in must have the Write access to the Document Type whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
style - the Style to add
acl - the Access Control List for the new Layout Style; the value of null is allowed
Returns:
the Layout Style object representing the newly created Layout Style

getDocumentLayoutStyle

public EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context,
                                                String layoutStyleID)
                                         throws EboUnrecoverableSystemException,
                                                EboSecurityException
Gets details on a specific Document Layout Style.

Security constraints:
The user whose context is passed in must have the Read access to the Layout Style whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyleID - the ID of the Layout Style whose metadata is requested
Returns:
the Layout Style object, or null if not found

getDocumentLayoutStyle

public EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context,
                                                String docTypeID,
                                                String styleName)
                                         throws EboUnrecoverableSystemException,
                                                EboSecurityException
Given the name of a Layout Style defined for a specific Document Type, get the metadata of that Style.
Parameters:
context - context
docTypeID - Document Type ID
styleName - Layout Style name
Returns:
the Layout Style object, or null if not found
See Also:
EbiDocType, EbiDocLayoutStyle

removeDocumentLayoutStyle

public boolean removeDocumentLayoutStyle(EbiContext context,
                                         String layoutStyleID)
                                  throws EboUnrecoverableSystemException,
                                         EboSecurityException
Removes the specified Document Layout Style.

Security constraints:
The user whose context is passed in must have the Write access to the Layout Style whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyleID - the ID of the Layout Style that is to be removed
Returns:
true if the style was successfully removed, false if it was not found
See Also:
EbiDocLayoutStyle

updateDocumentLayoutStyle

public void updateDocumentLayoutStyle(EbiContext context,
                                      EbiDocLayoutStyle layoutStyle)
                               throws EboUnrecoverableSystemException,
                                      EboSecurityException,
                                      EboItemExistenceException
Updates the specified Document Layout Style. The changes are specified by using the setter methods on the passed in EbiDocLayoutStyle.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyle - the Layout Style object (with updates)

getDefaultDocumentLayoutStyle

public EbiDocLayoutStyle getDefaultDocumentLayoutStyle(EbiContext context,
                                                       String docTypeID)
                                                throws EboUnrecoverableSystemException,
                                                       EboSecurityException,
                                                       EboItemExistenceException
Gets the Layout Style that is the default for the specified Document Type.

Security constraints:
The user whose context is passed in must have the Read access to the Style, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docTypeID - the ID of the Document Type for which the default Layout Style is to be found
Returns:
the default Layout Style
See Also:
EbiDocType, EbiDocLayoutStyle

addLayoutDocumentDescriptor

public EbiLayoutDocDescriptor addLayoutDocumentDescriptor(EbiContext context,
                                                          String layoutStyleID,
                                                          String layoutDocID,
                                                          String userAgent)
                                                   throws EboUnrecoverableSystemException,
                                                          EboSecurityException,
                                                          EboItemExistenceException
Adds a Layout Document Descriptor.

Security constraints:
The user whose context is passed in must have the Write access to the Layout Style whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyleID - the ID of the Layout Style
layoutDocID - the ID of the Layout Document
userAgent - the user agent string specifying the type of client for which the Layout Document is intended; use null to mark the Layout Document which is the default for the Style
Returns:
EbiLayoutDocDescriptor representing the new Layout Document Descriptor

removeLayoutDocumentDescriptor

public boolean removeLayoutDocumentDescriptor(EbiContext context,
                                              String layoutStyleID,
                                              String layoutDocID)
                                       throws EboUnrecoverableSystemException,
                                              EboSecurityException
Removes the specified Layout Document Descriptor.

Security constraints:
The user whose context is passed in must have the Write access to the layout style whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyleID - the ID of the Layout Style
layoutDocID - the ID of the Layout Document
Returns:
true if the descriptor was successfully removed, false if it was not found
See Also:
EbiDocLayoutStyle, EbiLayoutDocDescriptor

updateLayoutDocumentDescriptor

public void updateLayoutDocumentDescriptor(EbiContext context,
                                           EbiLayoutDocDescriptor desc,
                                           String newUserAgent)
                                    throws EboUnrecoverableSystemException,
                                           EboSecurityException,
                                           EboItemExistenceException
Updates a specified Layout Document Descriptor.

Security constraints:
The user whose context is passed in must have the Write access to the Layout Style whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

 cmgr.updateLayoutDocumentDescriptor(
    context, desc, "User Agent: Mozilla/4.7 [en] (WinNT; I)");
 
Parameters:
context - context
desc - the Descriptor to update
newUserAgent - the new value for the User Agent

getLayoutDocumentDescriptor

public EbiLayoutDocDescriptor getLayoutDocumentDescriptor(EbiContext context,
                                                          String layoutStyleID,
                                                          String layoutDocID,
                                                          String userAgent)
                                                   throws EboUnrecoverableSystemException,
                                                          EboSecurityException,
                                                          EboItemExistenceException
Gets a Layout Document Descriptor.

Security constraints:
The user whose context is passed in must have the Read access to the Layout Style whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutStyleID - the ID of a Layout Style
layoutDocID - the ID of a Layout Document
userAgent - the User Agent
Returns:
the descriptor, or null if not found

getLayoutDocumentDescriptors

public Collection getLayoutDocumentDescriptors(EbiContext context,
                                               String layoutStyleID)
                                        throws EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               EboItemExistenceException
Gets the Layout Document Descriptors for a given Layout Style.

Security constraints:
The user whose context is passed in must have the Read access to the Layout Style whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

 EbiDocLayoutStyle style = cmgr.getDocumentLayoutStyle(
    context, docTypeID, "WithPicOnLeft");
 Iterator iterDescs = cmgr.getLayoutDocumentDescriptors(
    context, style.getStyleID());
 while (iterDescs.hasNext())
    EbiLayoutDocDescriptor desc = (EbiLayoutDocDescriptor)iterDescs.next();
 
Parameters:
context - context
layoutStyleID - the ID of the Layout Style
Returns:
a Collection of EbiLayoutDocDescriptor's

createDocLayoutSet

public EbiDocLayoutSet createDocLayoutSet(EbiContext context,
                                          String layoutStyleID)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          EboItemExistenceException
News up a Document Layout Set. This is a factory method; use the newly defined Layout Set in addDocument or updateDocumentLayoutSet.
Parameters:
layoutStyleID - the ID of the Document Layout Style
Returns:
the new EbiDocLayoutSet

createDocVersionDescriptor

public EbiDocVersionDescriptor createDocVersionDescriptor(EbiContext context,
                                                          String docID,
                                                          int versionID)
                                                   throws EboUnrecoverableSystemException,
                                                          EboSecurityException,
                                                          EboItemExistenceException
News up a Document Version Descriptor. This is a factory method; use the newly defined Version Descriptor in EbiDocLayoutSet.setLayoutDescriptor(EbiDocVersionDescriptor).
Parameters:
docID - the Document ID (must be > 0)
versionID - the Version ID of the specified Document; must be > 0 or it may be -1 which indicates that the currently published version of the Document is to be used
Returns:
the new EbiDocVersionDescriptor
See Also:
EbiDocVersionDescriptor

getDocumentLayoutSet

public EbiDocLayoutSet getDocumentLayoutSet(EbiContext context,
                                            String docID)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
For a given Document, obtains its Document Layout Set. The retrieved Set is a mapping of the Layout Style chosen for this Document to pairs { Document ID, Document Version ID } where each pair represents a real Layout (an implementation of a Style).

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document for which this Set is being created
Returns:
EbiDocLayoutSet representing the newly created Layout Set
See Also:
EbiDocLayoutSet

updateDocumentLayoutSet

public void updateDocumentLayoutSet(EbiContext context,
                                    EbiDocLayoutSet layoutSet)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
For a given Document, specifies its Document Layout Set. The Set is a mapping of the Layout Style chosen for this Document to pairs { Document ID, Document Version ID } where each pair represents a real Layout (an implementation of a Style). Note that the Set specified by calling this method overwrites whatever Layout Set, if any, had been previously associated with this Document.

Security constraints:
The user whose context is passed in must have the Write access to the document whose layout set is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
layoutSet - the updated Layout Set

removeDocumentLayoutSet

public boolean removeDocumentLayoutSet(EbiContext context,
                                       String docID)
                                throws EboUnrecoverableSystemException,
                                       EboSecurityException,
                                       EboItemExistenceException
For the Document with the specified ID, removes its Layout Set, if any.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document
Returns:
true if the Layout Set was successfully removed, false if it was not found
See Also:
EbiDocLayoutSet

getDocumentLayout

public EbiDocVersionDescriptor getDocumentLayout(EbiContext context,
                                                 String docID,
                                                 int mode,
                                                 boolean getDefaultIfNotFound)
                                          throws EboUnrecoverableSystemException,
                                                 EboSecurityException,
                                                 EboItemExistenceException
Given a Context and a Document ID, retrieves the appropriate Document Layout. E.g. if the Context specifies a Netscape client, the method will try to locate an appropriate Layout that can be used to render the specified Document.
The algorithm is as follows:

1. If there is a Document Layout Set defined for the Document:


2. If no Document Layout Set is defined for the Document:

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document whose Layout is to be found
mode - the search mode specifying how to compare User Agent strings associated with various Layout Documents against the User Agent contained in the supplied context
getDefaultIfNotFound - if true, attempt to locate the default Document Layout in case we don't find a specific Layout that would match the Client
Returns:
the descriptor { Document ID, Document Version ID } pointing to the Document Layout, or null if not found
See Also:
EbiDocVersionDescriptor

getDocumentContentVersion

public EbiDocVersion getDocumentContentVersion(EbiContext context,
                                               String docID,
                                               int versionID,
                                               boolean getBytes)
                                        throws EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               EboItemExistenceException
Gets a specific Version of a Document whose ID is supplied.

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document
versionID - the ID of the Version to get
getBytes - whether to include the actual Document Content into the returned EbiDocVersion
Returns:
EbiDocVersion representing the Version of the Document's Content, or null if the Version is not found
See Also:
EbiDocVersion

getLatestDocumentContentVersion

public EbiDocVersion getLatestDocumentContentVersion(EbiContext context,
                                                     String docID,
                                                     boolean getBytes)
                                              throws EboUnrecoverableSystemException,
                                                     EboSecurityException,
                                                     EboItemExistenceException
Gets the latest Version of a Document whose ID is supplied. This is not necessarily the same version as the published one, just the latest one in the Version List.

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document
getBytes - whether to include the actual Document Content into the returned EbiDocVersion
Returns:
EbiDocVersion representing the version of the Document's Content, or null if no versions are found
See Also:
EbiDocVersion

getDocumentContentVersions

public Collection getDocumentContentVersions(EbiContext context,
                                             String docID,
                                             boolean getBytes)
                                      throws EboUnrecoverableSystemException,
                                             EboSecurityException,
                                             EboItemExistenceException
Enumerates all the existing versions of a specific Document.

Security constraints:
The user whose context is passed in must have the Read access to the Document whose ID is passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Example:

 Iterator iterVersions = cmgr.getDocumentContentVersions(
    context, docID, false).iterator();
 while (iterVersions.hasNext())
    EbiDocVersion ver = (EbiDocVersion)iterVersions.next();
 
Parameters:
context - context
docID - the ID of the Document
getBytes - whether to put the actual content into the returned EbiDocContent's
Returns:
a Collection of EbiDocVersion's representing Versions of the Document; the returned Versions are sorted by the Version ID in descending order, so the latest Version, if there are any Versions, is the first in the list
See Also:
EbiDocVersion

publishDocumentContentVersion

public void publishDocumentContentVersion(EbiContext context,
                                          String docID,
                                          int versionID,
                                          boolean force,
                                          boolean overwrite)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          EboItemExistenceException
Publishes the specified Version of the specified Document. The publish operation is equivalent to a "release" of a Document's Content. The published content is ready to go "live".

Security constraints:
The user whose context is passed in must have the Publish access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document whose Version is to be published
versionID - the Version ID of the Document that is to be published
force - whether to force an immediate publish; if set to true, may cause any of the effectiveness dates set for the Document to be changed. For example, if a Document has a Publish Date that is after the current date/time, then publish with "force" will reset the Publish Date to be "null" (or "to be published as soon as possible"), and will publish the selected Document's Version. If the value is false, the API checks to see if it's too early to publish, or too late, by comparing the current date/time against the preset publish date/time. In either of those cases, an application exception is thrown.
overwrite - if set to true, any published content that already exists for the Document is overwritten with the specified Version; if set to false, then publish will throw an exception if it detects that there is already a published Version
See Also:
EbiDocument, EbiDocVersion

rollbackDocumentContent

public void rollbackDocumentContent(EbiContext context,
                                    String docID,
                                    int rollbackVersionID,
                                    boolean publish)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Rolls document content from the latest version back to the specified version.

General constraints:
rollbackVersionID needs to specify a valid, existing version that precedes (is older than) the latest Document Content Version.

Scenarios:

Latest version: 5
Published version: 2
Rollback version: 3
Effect: versions 5 and 4 are removed; version 3 is published (if the 'publish' flag is true

Current version: 5
Published version: 2
Rollback version: 2
Effect: versions 5, 4, 3 are removed, no publish is done (since it is not necessary).

Current version: 5
Published version: 3
Rollback version: 1
Effect: versions 5, 4, 3, 2 are removed, the published content is removed, and, if the 'publish' flag is true, then version 1 is published instead. The published content of version 3 needs to be removed to prevent it from pointing back to version that no longer exists.

Security constraints:
The user whose context is passed in needs to have the Write access to the Document, or the Write access to the Content Admin element.

Parameters:
context - context
docID - the ID of the Document whose Content Version is being rolled back
rollbackVersionID - the version number to roll back to
publish - if true, the version that the content is rolled back to is published
See Also:
EbiDocVersion

checkoutDocument

public boolean checkoutDocument(EbiContext context,
                                String docID)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Deprecated. EbiContentManager.checkoutDocument(EbiContext, String, boolean)

Checks out a specified Document. This reserves the specified Document for the user whose context is passed in. The Document is exclusively locked for this user such that noone else may check in new Versions of the Document until this user removes their lock by checking in a new Version, or by issueing an 'uncheckout'.

An exception is thrown if the Document is currently checked out to a user other than the one whose context is passed in.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "Folder1/MyDoc", EbiDocument.EL_DOCUMENT);
 cmgr.checkoutDocument(context, doc.getID());
 // Note: need to make sure we have a refreshed object before reusing it!
 doc = cmgr.getDocument(context, doc.getID());
 doc.setDescription("The licensing agreement");
 cmgr.updateDocument(context, doc);
 
Parameters:
context - context
docID - the ID of the Document to be checked out
Returns:
true if the Document was successfully checked out to the user whose context is passed in; false if it is already checked out to this user
See Also:
EbiContentManager.checkinDocument(EbiContext, String, String, byte[], String, boolean), EbiContentManager.uncheckoutDocument(EbiContext, String), EbiContentManager.unlockDocument(EbiContext, String)

checkoutDocument

public EbiDocument checkoutDocument(EbiContext context,
                                    String docPath,
                                    boolean isDocID)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Checks out a specified Document. This reserves the specified Document for the user whose context is passed in. The Document is exclusively locked for this user such that noone else may check in new Versions of the Document until this user removes their lock by checking in a new Version, or by issueing an 'uncheckout'.

An exception is thrown if the Document is currently checked out to a user other than the one whose context is passed in.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "Folder1/MyDoc", EbiDocument.EL_DOCUMENT);
 doc = cmgr.checkoutDocument(context, doc.getID(), true);
 doc.setDescription("The licensing agreement");
 cmgr.updateDocument(context, doc);
 
Parameters:
context - context
docPath - the ID or URI of the Document to be checked out
isDocID - this value is true if ID of the Document is passed, false if the URI of the Document is passed
Returns:
EbiDocument if the Document was successfully checked out to the user whose context is passed in
See Also:
EbiContentManager.checkinDocument(EbiContext, String, String, byte[], String, boolean), EbiContentManager.uncheckoutDocument(EbiContext, String), EbiContentManager.unlockDocument(EbiContext, String)

checkinDocument

public int checkinDocument(EbiContext context,
                           String docID,
                           String mimeType,
                           byte[] data,
                           String comment,
                           boolean keepCheckedOut)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Checks in a new Version of the specified Document. An exception is thrown if this Document is not currently checked out to the user whose context is passed in.

Security constraints:
The user whose context is passed in must have the Write access to the Document whose ID is passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "Folder1/MyDoc", EbiDocument.EL_DOCUMENT);
 if (doc != null) {
    cmgr.checkoutDocument(context, doc.getID());
    int versionID = cmgr.checkinDocument(
       context, doc.getID(), "text/plain", newData,
       "Revised version.", false);
    System.out.println("Checked in version " + versionID);
 }
 
Parameters:
context - context
docID - the ID of the Document for which a new Version is checked in
mimeType - the MIME type of the new Version
data - the new content data
comment - the comment from the user doing the check-in
keepCheckedOut - if true, the new Version is inserted but the Document is still checked out to the user, if false, the lock is released and the Document is made available for other users' changes
Returns:
the Version ID of the new Version of the Document
See Also:
EbiContentManager.checkoutDocument(EbiContext, String), EbiContentManager.uncheckoutDocument(EbiContext, String), EbiContentManager.unlockDocument(EbiContext, String)

uncheckoutDocument

public boolean uncheckoutDocument(EbiContext context,
                                  String docID)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Unchecks out the specified Document: releases the lock on the Document set by the user whose context is passed in.

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "Folder1/MyDoc", EbiDocument.EL_DOCUMENT);
 cmgr.checkoutDocument(context, doc.getID());
 // Do some work ...
 cmgr.checkinDocument(
    context, doc.getID(), "text/plain", newData,
    "Revised version.", true);
 // Keeping the doc checked out, doing more work...
 // .....
 // We decided to uncheck out
 cmgr.uncheckoutDocument(context, doc.getID());
 
Parameters:
context - context
docID - the ID of the Document to be unchecked out.
Returns:
true if the Document was successfully unchecked out, false if it was not checked out to the user whose context is passed in
See Also:
EbiContentManager.checkinDocument(EbiContext, String, String, byte[], String, boolean), EbiContentManager.checkoutDocument(EbiContext, String), EbiContentManager.unlockDocument(EbiContext, String)

unlockDocument

public boolean unlockDocument(EbiContext context,
                              String docID)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException,
                              EboItemExistenceException
Releases or "picks" the lock set on the Document with the specified ID. This method is expected to be used for administrative purposes, e.g. to force the removal of a lock set by a person that is not available to remove it.

Security constraints:
The user whose context is passed in must have the Write access to the Content Admin element, otherwise a security exception is thrown.

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "Folder1/MyDoc", EbiDocument.EL_DOCUMENT);
 cmgr.unlockDocument(context, doc.getID());
 // Note: need to make sure we have a refreshed object before reusing it!
 doc = cmgr.getDocument(context, doc.getID());
 // Do some work with the document ...
 
Parameters:
context - context
docID - the ID of the Document
Returns:
true if the Document was successfully unlocked, false if it was not locked
See Also:
EbiContentManager.checkinDocument(EbiContext, String, String, byte[], String, boolean), EbiContentManager.checkoutDocument(EbiContext, String), EbiContentManager.uncheckoutDocument(EbiContext, String)

addDocumentLink

public EbiDocLink addDocumentLink(EbiContext context,
                                  String docidParent,
                                  String docidChild,
                                  int versionidChild)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Adds a Link between a Link Parent Document and a Link Child Document. For the Child Document, its specific version may be "locked in". Note: the Parent and the Child must not be the same Document. Both the Parent and the Child Documents must be checked out to the user.

Security constraints:
The user whose context is passed in must have the Write access to both the Parent and the Child documents whose IDs are passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
docidChild - the ID of the Link Child Document
versionidChild - the ID of the version of the Link Child Document; pass in the value of -1 to indicate that the published version of the Link Child Document is to be used
Returns:
EbiDocLink describing the new Link
See Also:
EbiDocLink

addDocumentLink

public EbiDocLink addDocumentLink(EbiContext context,
                                  String docidParent,
                                  String docidChild,
                                  int versionidChild,
                                  byte[] extnMeta)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Adds a Link between a Link Parent Document and a link child Document. For the Child Document, its specific version may be "locked in". Note: the Parent and the Child must not be the same Document. Both the Parent and the Child Documents must be checked out to the user.

Security constraints:
The user whose context is passed in must have the Write access to both the Parent and the Child Documents whose IDs are passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
docidChild - the ID of the Link Child Document
versionidChild - the ID of the Version of the Link Child Document; pass in the value of -1 to indicate that the published Version of the Link Child Document is to be used
extnMeta - Extension Metadata, if any, for the Link
Returns:
EbiDocLink describing the new Link
See Also:
EbiDocLink

getDocumentLink

public EbiDocLink getDocumentLink(EbiContext context,
                                  String docidParent,
                                  String docidChild)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Gets the link between the Link Parent and the Link Child Documents.

Security constraints:
The user whose context is passed in must have the Read access to both the Parent Document and the Child Document whose IDs are passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
docidChild - the ID of the Link Child Document
Returns:
EbiDocLink if the link exists, null if the Link is not found
See Also:
EbiDocLink

removeDocumentLink

public boolean removeDocumentLink(EbiContext context,
                                  String docidParent,
                                  String docidChild)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Removes the Link between the Link Parent and the Link Child Documents. The specified link must exist and both the Link Parent and the Link Child Documents must be checked out to the user.

Security constraints:
The user whose context is passed in must have the Write access to both the Parent Document and the Child Document whose IDs are passed in, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docidParent - the ID of the link parent Document
docidChild - the ID of the link child Document
Returns:
true if the Document Link was successfully removed, false if it was not found
See Also:
EbiDocLink

updateDocumentLink

public void updateDocumentLink(EbiContext context,
                               String docidParent,
                               String docidChild,
                               int newVersionIdChild)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Updates the specified Document Link. Note: the specified Link must exist and both the Link Parent and the Link Child Documents must be checked out to the user.

Security constraints:
The user whose context is passed in must have the Write access to both the Parent Document and the Child Document whose IDs are passed in, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
docidChild - the ID of the Link Child Document
newVersionIdChild - the new value for the Child Document's version ID for this Link; pass in the value of -1 to indicate that the published Version of the Link Child Document is to be used
See Also:
EbiDocLink

updateDocumentLink

public void updateDocumentLink(EbiContext context,
                               EbiDocLink link)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Updates the specified Document Link. Note: the specified Link must exist and both the Link Parent and the Link Child Documents must be checked out to the user.

Security constraints:
The user whose context is passed in must have the Write access to both the Parent Document and the Child Document whose IDs are passed in as part of the specified EbiDocLink, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
link - the updated Link information
See Also:
EbiDocLink

getLinkParentDocuments

public Collection getLinkParentDocuments(EbiContext context,
                                         String docidChild)
                                  throws EboUnrecoverableSystemException,
                                         EboSecurityException,
                                         EboItemExistenceException
For a given document, gets the list of Documents to which it is linked. The specified Document must exist.

Note: this method does not perform any security filtering of returned results. Use getFilteredLinkParentDocuments if you want the API to perform the security filtering.

Parameters:
context - context
docidChild - the ID of the Link Child Document
Returns:
a Collection of EbiDocument's; the Collection is empty if the Document is not linked to any other ones
See Also:
EbiDocument, EbiDocLink

getFilteredLinkParentDocuments

public Collection getFilteredLinkParentDocuments(EbiContext context,
                                                 String docidChild)
                                          throws EboUnrecoverableSystemException,
                                                 EboSecurityException,
                                                 EboItemExistenceException
For a given document, gets the list of Documents to which it is linked. The specified Document must exist.

Security constraints
Only the Parent Documents to which the user whose context is passed in has access, are returned. In order for a Parent Document to be in the returned list, the user must have Read access to it, or they must have the Read access to the Content Admin element.Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories.

Parameters:
context - context
docidChild - the ID of the Link Child Document
Returns:
a Collection of EbiDocument's; the Collection is empty if the Document is not linked to any other ones
See Also:
EbiDocument, EbiDocLink

getLinkChildDocuments

public Collection getLinkChildDocuments(EbiContext context,
                                        String docidParent)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException,
                                        EboItemExistenceException
For a given Document, gets the list of Documents that are linked to it. This is different from getChildDocuments in that this returns the list of the Linked Documents, not the Child Documents.

Note: this method does not perform any security filtering of returned results. Use getFilteredLinkChildDocuments if you want the API to perform the security filtering.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
Returns:
the list of Linked Documents (EbiDocument's); empty if no links are found
See Also:
EbiDocument, EbiDocLink

getFilteredLinkChildDocuments

public Collection getFilteredLinkChildDocuments(EbiContext context,
                                                String docidParent)
                                         throws EboUnrecoverableSystemException,
                                                EboSecurityException,
                                                EboItemExistenceException
For a given Document, gets the list of Documents that are linked to it. This is different from getChildDocuments in that this returns the list of the Linked Documents, not the Child Documents.

Security constraints
Only the Child Documents accessible to the user whose context is passed in, are returned. The user must have the Read access to the child Document or the Read access to the Content Admin element, in order for the Document to be returned as part of the collection. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories.

Parameters:
context - context
docidParent - the ID of the Link Parent Document
Returns:
the list of Linked Documents (EbiDocument's); empty if no Links are found
See Also:
EbiDocument, EbiDocLink

getLinks

public Collection getLinks(EbiContext context)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Return the list of all the Document Links.
Parameters:
context - context
Returns:
collection of EbiDocLink's
See Also:
EbiDocument, EbiDocLink

getLinks

public Collection getLinks(EbiContext context,
                           String docID,
                           boolean isLinkParent)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Get the list of Links that the specified Document is involved in.
Parameters:
context - context
docID - the ID of the Document
isLinkParent - if true, the Document is assumed to be a Link-Parent, if false, it's assumed to be a Link-Child
Returns:
a Collection of EbiDocLink's
See Also:
EbiDocument, EbiDocLink

createQuery

public EbiQuery createQuery(String queryType)
Creates a query object of a specific type. Below is the summary of the method's usage:

Query type

Return value type

Return value usage

EbiDocQuery.DOC_QUERY

EbiDocQuery

in findElements, to search document metadata and extension metadata fields

EbiFtsDocMetaDataQuery.FTS_DOC_MD_QUERY

EbiFtsDocMetaDataQuery

in findElements, to full-text search document metadata

EbiFtsDocContentQuery.FTS_DOC_CONTENT_QUERY

EbiFtsDocContentQuery

in findElements, to full-text search document contents

Note: EbiFtsDocMetaDataQuery and EbiFtsDocContentQuery are deprecated, use the following instead:

 com.sssw.search.api.EbiQuery query = com.sssw.search.factory.EboFactory.getQuery();
 
Parameters:
the - query type
Returns:
the query object
See Also:
EbiDocQuery, EbiQuery, "the findElements methods"

findElements

public Collection findElements(EbiContext context,
                               EbiQuery query)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException
Given a query object, executes the search and returns the results. Below is the summary of the method's usage:

Query type

Result type

Search type

EbiDocQuery

Collection of EbiDocument's

Document metadata and extension metadata fields

EbiFtsDocMetaDataQuery

Collection of EbiDocument's

Full text search over document metadata

EbiFtsDocContentQuery

Collection of EbiDocContent's

Full text search over document contents

Note: EbiFtsDocMetaDataQuery and EbiFtsDocContentQuery are deprecated, instead use findElements(EbiContext, com.sssw.search.api.EbiQuery, boolean)

Note: this method does not perform any security filtering of returned results. Use findElementsFiltered if you want the API to perform the security filtering.

Parameters:
context - context
query - the query object
Returns:
a Collection of search results

runQuery

public Collection runQuery(EbiContext context,
                           EbiQuery query,
                           boolean checkAccess)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Given a query object, executes a search and return the results. This method is for Search Service-based queries. Example:
 com.sssw.search.api.EbiQuery query = com.sssw.cm.factory.EboFactory.getQuery();
 query.setText("movie+science+fiction");
 query.selectAll();    // select all columns
 // query.select(com.sssw.cm.core.EbiCmConstants.DOCID);  // select individual column
 // query.select(com.sssw.cm.core.EbiCmConstants.TITLE);  // select individual column
 Iterator iterRes = cmgr.runQuery(context, query, true).iterator();
 while (iterRes.hasNext()) {
    com.sssw.cm.api.EbiQueryResult res = (EbiQueryResult)iterRes.next();
    System.out.println("DOCID: " + res.getID());
    System.out.println("TITLE: " + res.getTitle());
    String content = (res.getData() != null) ? new String(res.getData()) : "none";
    System.out.println("CONTENT: " + content);
    System.out.println("RELEVANCE: " + res.getIntegerProperty(res.PROP_DOC_WEIGHT));
    System.out.println("QUICK SUMMARY: " + res.getProperty(res.PROP_DOC_QUICK_SUMMARY));
 }
 
Parameters:
context - context
query - the Search API query object
checkAccess - if true, the results are filtered based on the access of the user whose context is passed in: only read-accessible documents are returned; if false, no such filtering is performed
Returns:
a Collection of com.sssw.cm.api.EbiQueryResult's
Throws:
EboUnrecoverableSystemException - if an unrecoverable error occurs
EboSecurityException - if a security-related error occurs

findElementsFiltered

public Collection findElementsFiltered(EbiContext context,
                                       EbiQuery query)
                                throws EboUnrecoverableSystemException,
                                       EboSecurityException
This method works exactly the same way as findElements(EbiContext, EbiQuery), except it performs security filtering of the results.

Security constraints:
In order for an item to be in the returned Collection,the user whose context is passed in must have Read access to it, or they must have the Read access to the Content Admin element. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories.

Parameters:
context - context
query - the query object
Returns:
a Collection of search results

findElements

public String findElements(EbiContext context,
                           EbiQuery query,
                           boolean rowwise)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Given a query object, executes a search and returns the results as XML. Note: currently, this is supported for EbiDocQuery, only.
Parameters:
context - the context
query - the query object
rowwise - whether to return the results as rows of data or as columns of data
See Also:
"contentmgmt-docmeta-search_3_0.dtd", "contentmgmt-query-results_3_0.dtd", EbiDocQuery

findElementsFiltered

public String findElementsFiltered(EbiContext context,
                                   EbiQuery query,
                                   boolean rowwise)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException
Given a query object, executes the search and returns the results as XML.Currently, this is supported for EbiDocQuery only.

Security constraints:
In order for an item to be in the returned list,the user whose context is passed in must have Read access to it, or they must have the Read access to the Content Admin element. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories.

Parameters:
context - the context
query - the query object
rowwise - whether to return the results as rows of data or as columns of data
See Also:
"contentmgmt-docmeta-search_3_0.dtd", "contentmgmt-query-results_3_0.dtd", EbiDocQuery

findElementsDOM

public Document findElementsDOM(EbiContext context,
                                EbiQuery query,
                                boolean rowwise)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException
Given a query object, executes a search and returns the results in org.w3c.dom.Document. Note: currently, this is supported for EbiDocQuery, only.
Parameters:
context - the context
query - the query object
rowwise - whether to return the results as rows of data or as columns of data
See Also:
"contentmgmt-docmeta-search_3_0.dtd", "contentmgmt-query-results_3_0.dtd", EbiDocQuery

findElementsFilteredDOM

public Document findElementsFilteredDOM(EbiContext context,
                                        EbiQuery query,
                                        boolean rowwise)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException
Given a query object, executes the search and returns the results in org.w3c.dom.Document. Currently, this is supported for EbiDocQuery only.

Security constraints:
In order for an item to be in the returned Document the user whose context is passed in must have Read access to it, or they must have the Read access to the Content Admin element. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories.

Parameters:
context - the context
query - the query object
rowwise - whether to return the results as rows of data or as columns of data
See Also:
"contentmgmt-docmeta-search_3_0.dtd", "contentmgmt-query-results_3_0.dtd", EbiDocQuery

getQueryConverter

public EbiDocQueryConverter getQueryConverter()
Gets the document query converter object
Returns:
document query converter

getQueryEngine

public EbiQueryEngineDelegate getQueryEngine()
                                      throws EboUnrecoverableSystemException
Gets the Query Engine that this Content Manager is associated with.
Returns:
the Query Engine delegate
See Also:
EbiQueryEngineDelegate

getQueryEngineRepository

public String getQueryEngineRepository()
                                throws EboUnrecoverableSystemException
Gets the name of the Query Engine Repository (the one that this Content Manager is associated with).
Returns:
the name of the Query Engine Repository

getDataFetcher

public EbiDataFetcherDelegate getDataFetcher()
                                      throws EboUnrecoverableSystemException
Gets the Data Fetcher object for this Content Manager.
Returns:
the Data Fetcher delegate
See Also:
EbiDataFetcherDelegate

setAcl

public void setAcl(EbiContext context,
                   EbiSecurableElement el,
                   Acl acl)
            throws EboUnrecoverableSystemException,
                   EboSecurityException
Sets an Access Control List on an element.

Security constraints:
The user whose context is passed in must have the Protect access to the element or the Write access to the Content Admin element. However, if the ACL is being set on the Content Admin element, then the user must have the Protect access to it.

Parameters:
context - context
el - securable element
acl - the Access Control List specifying permissions for the element
See Also:
EbiSecurableElement

getAcl

public Acl getAcl(EbiContext context,
                  EbiSecurableElement el)
           throws EboUnrecoverableSystemException,
                  EboSecurityException
Gets the Access Control List currently set for an element.

Security constraints:
The user whose context is passed in must have the Read access to the element that is passed in, or the Read access to the Content Admin element.

Parameters:
context - context
el - securable element
Returns:
the Access Control List specifying the permissions set on the element
See Also:
EbiSecurableElement

removeAcl

public boolean removeAcl(EbiContext context,
                         EbiSecurableElement el)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException
Removes the Access Control List currently set for an element.

Security constraints:
The user whose context is passed in must have the Protect access to the element or the Write access to the Content Admin element. However, if the ACL is being removed on the Content Admin element, then the user must have the Protect access to it.

Parameters:
context - context
el - securable element
Returns:
true if the ACL was successfully removed, false otherwise
See Also:
EbiSecurableElement

isAuthorized

public boolean isAuthorized(EbiContext context,
                            EbiSecurableElement el,
                            String accessRight)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException
Checks whether the user whose context is supplied, is authorized the specified type of access to the specified element. This method combines the functionality of 'hasAccess' and 'hasAdminAccess'. If the user has the specified access right for the Content Admin element, true is returned. If not, the access right is checked for the element that is passed in. For example, boolean auth = cmgr.isAuthorized(ctx, myFolder, EboPermission.WRITE); If the user whose context is passed in has WRITE access to Content Admin, true is returned. If not, true is returned if the user has WRITE access to the specified folder. Note that the LIST access right maps to the READ access right on the Content Admin element and the PUBLISH access right maps to the WRITE access right on it. So, isAuthorized(ctx, myFolder, EboPermission.LIST) returns true if the user has the READ access on Content Admin.
Parameters:
context - context
el - securable element
accessRight - the access right to check
Returns:
true if the user has the specified type of access to the element, false otherwise
See Also:
EbiSecurableElement

getAdminElement

public EbiContentAdmin getAdminElement(EbiContext context)
                                throws EboUnrecoverableSystemException,
                                       EboSecurityException
Gets a reference to the Admin Element.

Security constraints:
The user whose context is passed in must have the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
Returns:
the EbiContentAdmin object
See Also:
EbiContentAdmin

hasAdminAccess

public boolean hasAdminAccess(EbiContext context,
                              String accessRight)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Determine if the user whose context is passed in has a specific access right on the Content Admin element. This is a shortcut for isAuthorized invoked with a reference to the Content Admin element.
Parameters:
context - context
accessRight - the access right to check
Returns:
true if the user has the specified type of access to the Content Admin element, false otherwise

hasAccess

public boolean hasAccess(EbiContext context,
                         EbiSecurableElement el,
                         String accessRight)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException
Checks whether the user whose context is supplied, is authorized the specified type of access to the specified element. Unlike 'isAuthorized', this method does not check whether the user may have admin access.
Parameters:
context - contex
el - the element to check access to
accessRight - the access right to check
Returns:
true if the user has the specified type of access to the element, false otherwise
See Also:
EbiSecurableElement

getAllAccessible

public Collection getAllAccessible(EbiContext context,
                                   Collection elements,
                                   String elementType,
                                   String right,
                                   String adminRight)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException
From a list of securable elements, filters out the ones that are accessible to the user whose context is passed in.

Example:

 Collection docTypes = ...
 // Filter out doctypes to which we have READ access
 Collection acc = cmgr.getAllAccessible(
    context, docTypes, EbiDocType.EL_DOC_TYPE,
    EbiPermission.READ,     // must have READ on each type
    EbiPermission.READ);    // or READ on Content Admin
 
Parameters:
context - context
elements - elements to be filtered
elementType - the type of elements
right - the access right to check
adminRight - the admin right to check
Returns:
filtered out collection of elements

addFolder

public EbiDocFolder addFolder(EbiContext context,
                              EbiDocFolder parent,
                              String name,
                              int type,
                              String description,
                              Acl acl)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException,
                              EboItemExistenceException
Creates a new Folder.

Security constraints:
The user whose context is passed in must have the Write access to the Parent Folder, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the Parent Folder under which the new one is to be created
name - the name of the new Folder
type - the folder type; see the comments in EbiDirectory on the directory types and how to use them, especially DIR_TYPE_APP_FIRST; pass in EbiDirectory.DIR_TYPE_DEFAULT if you don't want to supply any application-specific value
description - the description for the new Folder
acl - the Access Control List for the new Folder; if the value is null, the ACL of the Parent Folder is applied
Returns:
EbiDocFolder representing the new Folder
See Also:
EbiDocFolder

addFolder

public void addFolder(EbiContext context,
                      EbiDocFolder parent,
                      EbiDocFolder child,
                      Acl acl)
               throws EboUnrecoverableSystemException,
                      EboSecurityException,
                      EboItemExistenceException
Creates a new Folder.

Security constraints:
The user whose context is passed in must have the Write access to the Parent Folder, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the Parent Folder under which the new one is to be created
child - the Folder to add
acl - the Access Control List for the new Folder; if the value is null, the ACL of the Parent Folder is applied
See Also:
EbiDocFolder

getFolder

public EbiDocFolder getFolder(EbiContext context,
                              EbiDocFolder parent,
                              String name)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Gets a folder by its name. Obtains metadata describing a specific Folder.

Security constraints:
The user whose context is passed in must have the Read access to the Folder, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the parent folder
name - the name of the folder to look up
Returns:
EbiDocFolder representing the Folder; null if not found
See Also:
EbiDocFolder

getFolder

public EbiDocFolder getFolder(EbiContext context,
                              String folderID)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Gets a folder by its ID. Obtains metadata describing a specific folder.

Security constraints:
The user whose context is passed in must have the Read access to the Folder, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
folderID - the ID of the Folder to look up
Returns:
EbiDocFolder representing the Folder; null if not found
See Also:
EbiDocFolder

removeFolder

public boolean removeFolder(EbiContext context,
                            String folderID,
                            boolean force)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException,
                            EboItemExistenceException
Removes a Folder.

Security constraints:
The user whose context is passed in must have the Write access to the Folder, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
folderID - the ID of the Folder to remove
force - whether to remove all Folders and Documents in the specified Folder in addition to the Folder itself; use this parameter with the value of 'true' to remove a Folder tree.
Returns:
true if the folder was successfully removed, false if it was not found

updateFolder

public void updateFolder(EbiContext context,
                         EbiDocFolder folder)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException,
                         EboItemExistenceException
Updates a Folder. Updates the metadata describing a Folder.

Security constraints:
The user whose context is passed in must have the Write access to the Folder, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
folder - the Folder object containing the updated metadata for the folder
See Also:
EbiDocFolder

getRootFolder

public EbiDocFolder getRootFolder(EbiContext context)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Gets the Root Folder. Obtains metadata describing the Root Folder.

Security constraints:
The user whose context is passed in must have the Read access to the Folder, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
Returns:
EbiDocFolder representing the Root Folder
See Also:
EbiDocFolder

copyFolder

public EbiDocFolder copyFolder(EbiContext context,
                               EbiDocFolder sourceFolder,
                               EbiDocFolder destFolder,
                               boolean copyFolderSecurity,
                               boolean copySubfolders,
                               boolean copyDocuments,
                               boolean overwrite,
                               int docParts)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Copies the specified source Folder into the destination Folder.
Parameters:
context - context
sourceFolder - the Folder to copy
destFolder - the destination Folder
copyFolderSecurity - if true, copy the Folder's ACL
copySubfolders - if true, do a recursive copy
copyDocuments - if true, copy the documents
overwrite - if true, overwrite any already existing entries
docParts - which parts of Documents to copy, if copyDocuments is true
Returns:
the copied Folder
See Also:
EbiDocFolder

moveFolder

public EbiDocFolder moveFolder(EbiContext context,
                               EbiDocFolder sourceFolder,
                               EbiDocFolder destFolder,
                               boolean withFolderSecurity,
                               boolean overwrite,
                               int docParts)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Moves the specified source Folder into the destination Folder.
Parameters:
context - context
sourceFolder - the Folder to move
destFolder - the destination Folder
withFolderSecurity - if true, preserve Folder's ACL
overwrite - if true, overwrite any already existing entries
docParts - which parts of Documents to preserve
Returns:
the moved Folder
See Also:
EbiDocFolder

addCategory

public EbiDocCategory addCategory(EbiContext context,
                                  EbiDocCategory parent,
                                  String name,
                                  int type,
                                  String description,
                                  Acl acl)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Creates a new category.

Security constraints:
The user whose context is passed in must have the Write access to the parent category, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the parent category under which the new one is to be created
name - the name of the new Category
type - the category type; see the comments in EbiDirectory on the directory types and how to use them, especially DIR_TYPE_APP_FIRST; pass in EbiDirectory.DIR_TYPE_DEFAULT if you don't want to supply any application-specific value
description - the description for the new Category
acl - the access control list for the new Category; if the value is null, the ACL of the Parent Category is applied
Returns:
EbiDocCategory representing the new Category
See Also:
EbiDocCategory

addCategory

public void addCategory(EbiContext context,
                        EbiDocCategory parent,
                        EbiDocCategory child,
                        Acl acl)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Adds a Category to the specified Parent Category.

Example:

 EbiDocCategory newCategory = com.sssw.cm.factory.EboFactory.getElement(EbiDocCategory.EL_DOC_CATEGORY);
 newCategory.setID();
 newCategory.setName("myNewCategory");
 newCategory.setDescription("Test");
 newCategory.setDirectoryType(EbiDirectory.DIR_TYPE_DEFAULT);
 cmgr.addCategory(context, parent, newCategory, acl);
 
Parameters:
context - context
parent - the parent category
child - the child category to add
acl - the ACL to set on the child
See Also:
EbiDocCategory

getCategory

public EbiDocCategory getCategory(EbiContext context,
                                  EbiDocCategory parent,
                                  String name)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Gets a category by its name. Obtains metadata describing a specific category.

Security constraints:
The user whose context is passed in must have the Read access to the Category, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the Parent Category
name - the name of the Category to look up
Returns:
EbiDocCategory representing the Category; null if not found
See Also:
EbiDocCategory

getCategory

public EbiDocCategory getCategory(EbiContext context,
                                  String categoryID)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Gets a Category by its ID. Obtains metadata describing a specific category.

Security constraints:
The user whose context is passed in must have the Read access to the Category, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
categoryID - the ID of the Category to look up
Returns:
EbiDocCategory representing the Category; null if not found
See Also:
EbiDocCategory

removeCategory

public boolean removeCategory(EbiContext context,
                              String categoryID,
                              boolean force)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Removes a category.

Security constraints:
The user whose context is passed in must have the Write access to the category, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
categoryID - the ID of the category to remove
force - whether to remove all categories and documents in the specified category in addition to the category itself; use this parameter with the value of 'true' to remove a category tree.
Returns:
true if the category was successfully removed, false if it was not found
See Also:
EbiDocCategory

updateCategory

public void updateCategory(EbiContext context,
                           EbiDocCategory category)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Updates a category. Updates the metadata describing a category.

Security constraints:
The user whose context is passed in must have the Write access to the category, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
category - the Category object containing the updated metadata for the Category
See Also:
EbiDocCategory

getRootCategory

public EbiDocCategory getRootCategory(EbiContext context)
                               throws EboUnrecoverableSystemException,
                                      EboSecurityException
Gets the Root Category. Obtains metadata describing the Root Category.

Security constraints:
The user whose context is passed in must have the Read access to the category, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
Returns:
EbiDocCategory representing the Root Category
See Also:
EbiDocCategory

addDocumentCategoryReference

public void addDocumentCategoryReference(EbiContext context,
                                         String docID,
                                         String categoryID)
                                  throws EboUnrecoverableSystemException,
                                         EboSecurityException,
                                         EboItemExistenceException
Adds a Document to the specified Category.

Security constraints:
The user whose context is passed in must have the Write access to the category, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document that is to be added to a Category
categoryID - the ID of the Category to which the Document is to be added

removeDocumentCategoryReference

public boolean removeDocumentCategoryReference(EbiContext context,
                                               String docID,
                                               String categoryID)
                                        throws EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               EboItemExistenceException
Removes a Document from the specified Category. This does not remove the Document itself, just the reference to it in the Category.

Security constraints:
The user whose context is passed in must have the Write access to the category, or the Write access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
docID - the ID of the Document that is to be removed from the specified Category
categoryID - the ID of the Category from which the specified Document is to be removed
Returns:
true if the Document was successfully removed from the Category, false if the Document is not part of the Category

getDocumentCategoryReferences

public Collection getDocumentCategoryReferences(EbiContext context,
                                                String docID)
                                         throws EboUnrecoverableSystemException,
                                                EboSecurityException,
                                                EboItemExistenceException
Gets the list of Categories that the document with the specified ID belongs to.

Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentCategoryReferences if you want the API to perform the security filtering.

Example:

 Iterator iterRefs = cmgr.getDocumentCategoryReferences(context, docID).iterator();
 while (iterRefs.hasNext())
    EbiDocCategory category = (EbiDocCategory)iterRefs.next();
 
Parameters:
context - context
docID - the ID of the document
Returns:
a Collection of EbiDocCategory objects each of which represents a Category that the Document belongs to

getFilteredDocumentCategoryReferences

public Collection getFilteredDocumentCategoryReferences(EbiContext context,
                                                        String docID)
                                                 throws EboUnrecoverableSystemException,
                                                        EboSecurityException,
                                                        EboItemExistenceException
Gets the list of Categories that the Document with the specified ID belongs to.

Security constraints:
Only the Categories to which the user whose context is passed in has access to, are returned. All Categories are returned if the user has the Read access to the Content Admin element.

Parameters:
context - context
docID - the ID of the Document
Returns:
a Collection of EbiDocCategory objects each of which represents a Category that the document belongs to

copyCategory

public EbiDocCategory copyCategory(EbiContext context,
                                   EbiDocCategory sourceCategory,
                                   EbiDocCategory destCategory,
                                   boolean copyCategorySecurity,
                                   boolean copySubcategories,
                                   boolean assignDocuments,
                                   boolean overwrite)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException,
                                   EboItemExistenceException
Copies the specified source Category into the destination Category.
Parameters:
context - context
sourceCategory - the category to copy
destCategory - the destination category
copyCategorySecurity - if true, copy category security
copySubcategories - if true, do a recursive copy
assignDocuments - assign documents into respective categories
overwrite - overwrite any existing directory entries
Returns:
the copied category

moveCategory

public EbiDocCategory moveCategory(EbiContext context,
                                   EbiDocCategory sourceCategory,
                                   EbiDocCategory destCategory,
                                   boolean withCategorySecurity,
                                   boolean overwrite)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException,
                                   EboItemExistenceException
Moves the specified Category into the destination Category.
Parameters:
context - context
sourceCategory - the Category to move
destCategory - the destination Category
withCategorySecurity - copy the Category security
overwrite - whether to overwrite any existing directory entries
Returns:
the copied Category

getEntry

public EbiDirectoryEntry getEntry(EbiContext context,
                                  EbiDirectory parent,
                                  String name)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Gets an Entry (by name) in a Directory.

Security constraints:
The user whose context is passed in must have the Read access to the entry, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
parent - the Parent Directory
name - the name of the entry to look up
Returns:
EbiDirectoryEntry representing the found entry; null if not found
See Also:
EbiDirectoryEntry, EbiDirectory

getDirectoryList

public Collection getDirectoryList(EbiContext context,
                                   EbiDirectory dir,
                                   boolean getSubdirectories,
                                   boolean getDocuments)
                            throws EboUnrecoverableSystemException,
                                   EboSecurityException
Gets the list of directory contents. Notes:

Example:

 EbiDocFolder folder = ...
 Iterator iterList = cmgr.getDirectoryList(
    context, folder, true, true).iterator();
 while (iterList.hasNext()) {
    EbiDirectoryEntry entry = (EbiDirectoryEntry)iterList.next();
    if (entry instanceof EbiDocFolder) {
       EbiDocFolder folder = (EbiDocFolder)entry;
       ...
    }
    else if (entry instanceof EbiDocument) {
       EbiDocument doc = (EbiDocument)entry;
       ...
    }
 }
 
Parameters:
context - context
dir - the Directory
getSubdirectories - whether to get the list of Directories that are child directories under the specified one
getDocuments - whether to get the list of Documents that are located in the specified Directory
Returns:
a Collection of EbiDirectoryEntry's that are the contents of the specified Directory

getFilteredDirectoryList

public Collection getFilteredDirectoryList(EbiContext context,
                                           EbiDirectory dir,
                                           boolean getSubdirectories,
                                           boolean getDocuments)
                                    throws EboUnrecoverableSystemException,
                                           EboSecurityException
Gets the list of directory contents.This method works for both folders and categories, as EbiDirectory is a superinterface of both EbiDocFolder and EbiDocCategory.

Security Contraints:
In order for an entry to be in the returned list, the user whose context is passed in must have Read access to it, or they must have the Read access to the Content Admin element. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories

Parameters:
context - context
dir - the directory
getSubdirectories - whether to get the list of directories that are child directories under the specified one
getDocuments - whether to get the list of documents that are located in the specified directory
Returns:
a Collection of EbiDirectoryEntry's that are the contents of the specified directory
See Also:
EbiContentManager.getDirectoryList(EbiContext, EbiDirectory, boolean, boolean)

getDirectoryContents

public EbiDirectoryContents getDirectoryContents(EbiContext context,
                                                 EbiDirectory dir,
                                                 boolean getSubdirectories,
                                                 boolean getDocuments)
                                          throws EboUnrecoverableSystemException,
                                                 EboSecurityException
Gets the list of directory contents. Similar to getDirectoryList, but different in the sense that EbiDirectoryContents provides a findEntry method which may be useful in certain cases. This method works for both Folders and Categories, as EbiDirectory is a superinterface of both EbiDocFolder and EbiDocCategory.

Notes:

Parameters:
context - context
dir - the directory
getSubdirectories - whether to get the list of directories that are child directories under the specified one
getDocuments - whether to get the list of documents that are located in the specified directory
Returns:
an EbiDirectoryContents representing the contents of the specified directory

getFilteredDirectoryContents

public EbiDirectoryContents getFilteredDirectoryContents(EbiContext context,
                                                         EbiDirectory dir,
                                                         boolean getSubdirectories,
                                                         boolean getDocuments)
                                                  throws EboUnrecoverableSystemException,
                                                         EboSecurityException
Gets the list of directory contents. Similar to getDirectoryList, but different in the sense that EbiDirectoryContents provides a findEntry method which may be useful in certain cases. This method works for both folders and categories, as EbiDirectory is a superinterface of both EbiDocFolder and EbiDocCategory.

Security constraints:
In order for an entry to be in the returned list, the user whose context is passed in must have Read access to it, or they must have the Read access to the Content Admin element. Note that security filtering is based on the READ permisssion on the elements retrievd, not on the LIST permission that might be set on their respective parent directories

Parameters:
context - context
dir - the Directory
getSubdirectories - whether to get the list of Directories that are Child Directories under the specified one
getDocuments - whether to get the list of Documents that are located in the specified Directory
Returns:
an EbiDirectoryContents representing the contents of the specified Directory

lookupDirectoryEntry

public EbiDirectoryEntry lookupDirectoryEntry(EbiContext context,
                                              EbiDirectory parent,
                                              String path)
                                       throws EboUnrecoverableSystemException,
                                              EboSecurityException
Looks up a Directory Entry, given its path.

Security constraints:
The user whose context is passed in must have the Read access to the Entry, or the Read access to the Content Admin element, otherwise a security exception is thrown.

Parameters:
context - context
path - the path to the entry (forward slash-delimited, e.g. "/myFolder1/myFolder2/myDoc1"); the path is relative to the parent
Returns:
the Directory Entry or null if not found

lookupDirectoryEntry

public EbiDirectoryEntry lookupDirectoryEntry(EbiContext context,
                                              String path,
                                              String elType)
                                       throws EboUnrecoverableSystemException,
                                              EboSecurityException,
                                              EboItemExistenceException
Looks up a Directory Entry, given its path and Directory Entry element type.

Security constraints:
The user whose context is passed in must have the Read access to the entry, or the Read access to the Content Admin element, otherwise a security exception is thrown.

The behavior of this method is as follows, in terms of the 'type' parameter:

The behavior of this method is as follows, in terms of the 'path' parameter:

Example:

 EbiDocument doc = (EbiDocument)cmgr.lookupDirectoryEntry(
    context, "/myFolder1/myFolder2/myDoc1", EbiDocument.EL_DOCUMENT);
 
Parameters:
context - context
path - the path to the entry (forward slash-delimited, e.g. "/myFolder1/myFolder2/myDoc1"); the path is relative to the Root Folder or Root Category
Returns:
the directory entry
See Also:
EbiDirectoryEntry, EbiDirectory

validateDirectory

public EbiDirectory validateDirectory(EbiContext context,
                                      String path,
                                      String elType)
                               throws EboUnrecoverableSystemException,
                                      EboSecurityException,
                                      EboItemExistenceException
Checks to see if the specified Directory exists. If any of ancestors specified within the path do not exist, create them. If the Directory does not exist, create it.

Example:

 EbiDocFolder myFolder = cmgr.validateDirectory(
    context, "myFolder1/myFolder2", EbiDocFolder.EL_DOC_FOLDER);
 
Parameters:
context - context
path - the path to the Directory
elType - the Element type of the Directory
Returns:
the Directory

addDirectory

public EbiDirectory addDirectory(EbiContext context,
                                 EbiDirectory parent,
                                 String name,
                                 int type,
                                 String description,
                                 Acl acl)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Adds a Directory, given its parent and its name.
Parameters:
context - context
parent - the parent Directory
name - the name for the new Directory
type - Directory type for the new Directory
description - description for the new Directory
acl - Acl to set; if null, the Acl of the parent is inherited
Returns:
the new Directory
See Also:
EbiDirectory

getRootDirectory

public EbiDirectory getRootDirectory(EbiContext context,
                                     String elType)
                              throws EboUnrecoverableSystemException,
                                     EboSecurityException
Gets the Root Directory of the specified type.
Parameters:
context - context
elType - the Element type of the Root

removeDirectory

public boolean removeDirectory(EbiContext context,
                               String path,
                               String elType,
                               boolean force)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Removes the specified Directory
Parameters:
context - context
path - the path to the Directory
elType - the Element type of the Directory
force - if true, a recursive removal is done, otherwise, if it's determined that the directory is not empty, an exception is thrown

copyDirectoryEntry

public EbiDirectoryEntry copyDirectoryEntry(EbiContext context,
                                            EbiDirectoryEntry entryToCopy,
                                            EbiDirectoryEntry destEntry,
                                            boolean overwrite,
                                            int docParts)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
Copies a Directory Entry into the specified destination Entry.

The matrix of possible variations is as follows:
Entry to copy Destination entry Comments
instance of EbiDocument instance of EbiDocument destination is the new Parent Document
instance of EbiDocFolder instance of EbiDocFolder copy Folder into a Parent Folder
instance of EbiDocCategory instance of EbiDocCategory copy Category into a Parent Category

Parameters:
context - context
entryToCopy - the entry to copy
destEntry - the destination entry
overwrite - if true, overwrite any existing entry with this name; however if say a document is being copied and a folder with the same name exists, an exception is thrown
docParts - the document parts to copy, for document or folder copy (docParts is used to determine how to copy the documents that belong to the folder)

moveDirectoryEntry

public EbiDirectoryEntry moveDirectoryEntry(EbiContext context,
                                            EbiDirectoryEntry entryToMove,
                                            EbiDirectoryEntry destEntry,
                                            boolean overwrite,
                                            int docParts)
                                     throws EboUnrecoverableSystemException,
                                            EboSecurityException,
                                            EboItemExistenceException
Moves a Directory Entry into the specified destination Entry.

The matrix of possible variations is as follows:
Entry to copy Destination entry Comments
instance of EbiDocument instance of EbiDocument destination is the new Parent Document
instance of EbiDocFolder instance of EbiDocFolder move Folder into a Parent Folder
instance of EbiDocCategory instance of EbiDocCategory move Category into a Parent Category

Parameters:
context - context
entryToMove - the entry to move
destEntry - the destination entry
overwrite - if true, overwrite any existing entry with this name; however if say a document is being copied and a folder with the same name exists, an exception is thrown
docParts - the document parts to move, for document or folder move (docParts is used to determine how to move the documents that belong to the folder)

hasDirectoryEntryChildren

public boolean hasDirectoryEntryChildren(EbiDirectoryEntry entry)
                                  throws EboUnrecoverableSystemException
Tells whether the specified Directory Entry has any child Entries:
Parameters:
entry - the entry to check
Returns:
true if it has children, false if not

isDirectoryEntryChildOf

public boolean isDirectoryEntryChildOf(EbiDirectoryEntry child,
                                       EbiDirectoryEntry parent)
                                throws EboUnrecoverableSystemException
Tells whether the specified Directory Entry is a child of the other Directory Entry:
Parameters:
child - the Directory Entry to check
parent - potential parent Directory Entry
Returns:
true if 'parent' is a parent Directory Entry for the 'child', false otherwise

getDirectoryCount

public int getDirectoryCount(EbiContext context,
                             EbiDirectory dir,
                             boolean countSubdirs,
                             boolean countDocs,
                             boolean countAccessibleOnly)
                      throws EboUnrecoverableSystemException
Calculates the number of entries in the given directory.
Parameters:
context - context
dir - the directory
countSubdirs - if true, all subdirectories are counted
countDocs - if true, all docs are counted
countAccessibleOnly - if true, only the items accessible to the user whose context is passed in, are counted (in the out-of-the-box implementation, this security filtering is based on whether the user has the READ access to the items counted)
Returns:
the number of items counted
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getImporter

public EbiImporter getImporter()
                        throws EboUnrecoverableSystemException
Gets a CM Data Importer object.
Returns:
EbiImporter
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getExporter

public EbiExporter getExporter()
                        throws EboUnrecoverableSystemException
Gets a CM Data Exporter object.
Returns:
EbiExporter
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

validateOperation

public String validateOperation(EbiContext context,
                                String elID,
                                String elType,
                                int opCode)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Tells whether or not a specific operation is valid for the given element of a specific type.
Parameters:
context - context
elID - the element ID
elType - the type of the element
opCode - the operation code, see OP_XXXX.
Returns:
null if the operation is valid or a String describing the reason why the operation is not valid

getRelatedElements

public EbiRelatedElements getRelatedElements(EbiContext context,
                                             EbiFrameworkElement element,
                                             int relType,
                                             boolean checkAccess)
                                      throws EboUnrecoverableSystemException,
                                             EboSecurityException
Returns the list of elements that are related to the specified one.
Parameters:
context - the context
element - the element
relType - the relationship type, see EbiRelatedElements.REL_TYPE_XXXX
checkAccess - if true, only elements to which the used whose context is passed in has access, are returned

removeElementFully

public boolean removeElementFully(EbiContext context,
                                  EbiFrameworkElement element)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Removes the specified element fully, i.e. first attempts to remove any dependencies of this element, then the element itself.
Parameters:
context - the context
element - the element
Returns:
true if the element was successfully removed, false otherwise

Novell exteNd
Director 5.2 API