|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the Content Manager Delegate interface.
The Content Manager provides the following capabilities:
com.sssw.search.api
for details on using the Search Service
for CM searches);
com.sssw.fw.api.EbiSecurableElement
).
To obtain an instance of Content Manager Delegate:
// Get the default Content Manager Delegate EbiContentMgmtDelegate defaultCmgr = com.sssw.cm.client.EboFactory.getDefaultContentMgmtDelegate(); // Get the Content Manager Delegate for the Repository named "myRepository" EbiContentMgmtDelegate cmgr = com.sssw.cm.client.EboFactory.getContentMgmtDelegateByName("myRepository");
Field Summary | |
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". |
Fields inherited from interface com.sssw.fw.api.EbiDelegate |
SERVICE_LOCAL,
SERVICE_REMOTE |
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. EbiContentMgmtDelegate.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. |
EbiDataFetcherDelegate |
getDataFetcher()
Gets the Data Fetcher object for this Content Manager. |
String |
getDataSource()
Gets the name of the data source that this CM 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. EbiContentMgmtDelegate.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 delegate 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.api.EbiDelegate |
getName |
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.EbiStateChangeProducer |
addStateChangeListener,
addStateChangeListener,
addVetoableStateChangeListener,
addVetoableStateChangeListener,
fireStateChange,
fireVetoableStateChange,
getListeners,
getScpDescription,
getScpLog,
getVetoableListeners,
hasListeners,
hasVetoableListeners,
removeStateChangeListener,
removeVetoableStateChangeListener,
setScpDescription,
setScpLog |
Field Detail |
public static final int COMPARE_NONE
getDocumentLayout
method. This is useful for asking for the
default Layout right away.EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
public static final int COMPARE_ALL
getDocumentLayout
method.EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
public static final int COMPARE_NAMES
EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
public static final int COMPARE_MAJOR_VERS
EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
public static final int COMPARE_MINOR_VERS
EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
public static final int COMPARE_PLATFORMS
EbiContentMgmtDelegate.getDocumentLayout(EbiContext, String, int, boolean)
Method Detail |
public void setRepositoryID(String repositoryID) throws EboUnrecoverableSystemException
repositoryID
- the ID of the repositorypublic String getRepositoryID() throws EboUnrecoverableSystemException
public boolean isSystemContentManager() throws EboUnrecoverableSystemException
public boolean isDefaultContentManager() throws EboUnrecoverableSystemException
public String getDataSource() throws EboUnrecoverableSystemException
public EbiDocType addDocumentType(EbiContext context, String name, String description, String[] fieldIDs, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextname
- the name of the new Document Type; must be uniquedescription
- the description of the Document Type (optional)fieldIDs
- the IDs of Fields that every Document of
this type will haveacl
- the Access Control List for the new Document Type;
null value is allowedEboFactory
,
EbiContentMgmtDelegate.getDocumentFieldByName(EbiContext, String)
,
EbiContentMgmtDelegate.getDocumentFieldByID(EbiContext, String)
public EbiDocType addDocumentType(EbiContext context, String name, String description, String[] fieldIDs, byte[] extnMeta, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextname
- the name of the new Document Typedescription
- the description of the Document Type (optional)fieldIDs
- the IDs of fields that every Document of
this type will haveextnMeta
- Extension Metadataacl
- the Access Control List for the new Document Type;
null value is allowedpublic void addDocumentType(EbiContext context, EbiDocType type, String[] fieldIDs, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contexttype
- the new TypefieldIDs
- the IDs of Fields that every Document of
this Type will haveacl
- the Access Control List for the new Document Type;
null value is allowedpublic Collection getDocumentTypes(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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();
context
- contextpublic Collection getFilteredDocumentTypes(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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();
context
- contextpublic EbiDocType getDocumentTypeByName(EbiContext context, String docTypeName) throws EboUnrecoverableSystemException, EboSecurityException
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");
context
- contextdocTypeName
- Document type's namepublic EbiDocType getDocumentTypeByID(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException
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());
context
- contextdocTypeID
- Document type's IDpublic boolean removeDocumentType(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextdocTypeID
- the Document Type IDpublic void updateDocumentType(EbiContext context, EbiDocType docType) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextdocType
- the updated Document Typepublic EbiAddDocumentParams createAddDocumentParams()
EbiAddDocumentParams
objectEbiAddDocumentParams
public EbiDocument addDocument(EbiContext context, EbiAddDocumentParams params) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Notes:
Security constraints:
Unless the user whose context is passed in, has the Write access to
the Content Admin element, the following constraints apply:
// 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);
context
- contextparams
- the parameters defining the new Documentpublic EbiDocument getDocument(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextdocID
- the ID of the Documentpublic Collection getDocumentsByType(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextdocTypeID
- the Document Type's IDpublic Collection getFilteredDocumentsByType(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Security constraints:
Iterator iterDocs = cmgr.getFilteredDocumentsByType(context, docTypeID).iterator(); while (iterDocs.hasNext()) EbiDocument doc = (EbiDocument)iterDocs.next();
context
- contextdocTypeID
- the Document Type IDpublic boolean removeContentData(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
EbiContentMgmtDelegate.unpublishDocumentContent(EbiContext, String)
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.
context
- contextdocID
- the ID of the Document whose content is to be removedpublic boolean unpublishDocumentContent(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextdocID
- the ID of the Documentpublic void updateDocument(EbiContext context, EbiDocument document) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextdocument
- the Documentpublic void updateDocument(EbiContext context, EbiDocument document, boolean keepCheckedOut) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextdocument
- the DocumentkeepCheckedOut
- 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' changespublic boolean removeDocument(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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:
context
- contextdocID
- the ID of the Document to be removedpublic Collection getChildDocuments(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Note: this method does not perform any security filtering of returned results. Use getFilteredChildDocuments if you want the API to perform the security filtering.
context
- contextdocID
- the ID of the Document to list Children forpublic Collection getFilteredChildDocuments(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document to list Children forpublic EbiDocument moveDocument(EbiContext context, EbiDocument doc, EbiDocument newParentDoc) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextdoc
- the Document to movenewParentDoc
- the new Parent Documentpublic EbiDocument moveDocument(EbiContext context, EbiDocument doc, EbiDocFolder destFolder, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Example:
EbiDocument movedDoc = cmgr.moveDocument( context, doc, destFolder, true, EbiDocument.DOC_PART_META | EbiDocument.DOC_PART_CONTENT);
context
- contextdoc
- the Document to movedestFolder
- the new Parent Folder (destination)overwrite
- if true, overwrite any Document with the same name in
the destination FolderdocParts
- which parts to move, see EbiDocument.DOC_PART_XXXXpublic EbiDocument copyDocument(EbiContext context, EbiDocument doc, EbiDocument newParentDoc) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextdoc
- the Document to movenewParentDoc
- the new Parent Documentpublic EbiDocument copyDocument(EbiContext context, EbiDocument doc, EbiDocFolder destFolder, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
EbiDocument copiedDoc = cmgr.copyDocument( context, doc, destFolder, true, EbiDocument.DOC_PART_META | EbiDocument.DOC_PART_CONTENT);
context
- contextdoc
- the Document to copydestFolder
- the destination Folderoverwrite
- if true, overwrite any Document with the same name in
the destination FolderdocParts
- which parts to move, see EbiDocument.DOC_PART_XXXXpublic EbiDocField addDocumentField(EbiContext context, String fieldName, String valueType, byte[] extnMeta, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextfieldName
- the name of the new Field; must be uniquevalueType
- the description of the Field's value typeextnMeta
- Extension Metadataacl
- the Access Control List for the new FieldEbiDocField
public void addDocumentField(EbiContext context, EbiDocField field, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextfield
- the Field to addacl
- the Access Control List for the new FieldEbiDocField
public boolean removeDocumentField(EbiContext context, String fieldID) throws EboUnrecoverableSystemException, EboSecurityException
Security constraints:
The user whose context is passed in must have the Write access to
the Content Admin element.
Notes:
context
- contextfieldID
- the ID of the Field to be removedEbiDocField
public void updateDocumentField(EbiContext context, EbiDocField field) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Security constraints:
The user whose context is passed in must have the Write access to
the Document Field or to the Content Admin element.
context
- contextfield
- the Field with updated informationEbiDocField
public Collection getDocumentFields(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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();
context
- contextEbiDocField
public Collection getFilteredDocumentFields(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextEbiDocField
public EbiDocField getDocumentFieldByName(EbiContext context, String fieldName) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextfieldName
- the name of the FieldEbiDocField
public EbiDocField getDocumentFieldByID(EbiContext context, String fieldID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextfieldID
- the ID of the FieldEbiDocField
public Collection getDocumentFields(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentFields if you want the API to perform the security filtering.
context
- contextdocTypeID
- the ID of the Document TypeEbiDocField
public Collection getFilteredDocumentFields(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocTypeID
- the ID of the Document TypeEbiDocField
public Collection getDocumentTypesWithField(EbiContext context, String fieldID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextfieldID
- the ID of the FieldEbiDocField
,
EbiDocType
public Collection getFilteredDocumentTypesWithField(EbiContext context, String fieldID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextfieldID
- the ID of the fieldEbiDocField
,
EbiDocType
public void addFieldToDocumentType(EbiContext context, String fieldID, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextfieldID
- the ID of the Field to add to the TypedocTypeID
- the ID of the Document Type to which the Field
is to be addedpublic boolean removeFieldFromDocumentType(EbiContext context, String fieldID, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextfieldID
- the ID of the Field to removedocTypeID
- the ID of the Document Type from which the
Field is removedpublic boolean removeFieldFromDocumentType(EbiContext context, String fieldID, String docTypeID, boolean removeFieldValues) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextfieldID
- the ID of the Field to removedocTypeID
- the ID of the Document Type from which the
Field is removedremoveFieldValues
- if true, any values that had been set on
existing Documents (of the specified Type) for this field, are removedpublic EbiDocExtnMetaInfo createExtnMetaInfo(EbiDocField field)
EbiDocExtnMeta.setExtnMetaInfo
.field
- the extension fieldEbiDocExtnMetaInfo
,
EbiDocExtnMeta
,
EbiDocField
public EbiDocExtnMeta createExtnMeta()
addDocument
and updateDocumentExtnMeta
methods.EbiDocExtnMetaInfo
,
EbiDocExtnMeta
,
EbiDocField
public EbiDocExtnMetaInfo getDocumentExtnMetaInfo(EbiContext context, String docID, String extnFieldID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the Document IDextnFieldID
- the ID of the Extension Metadata Fieldpublic void updateDocumentExtnMetaInfo(EbiContext context, String docID, EbiDocExtnMetaInfo extnMetaInfo) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the DocumentextnMetaInfo
- the descriptor of the Extension Metadata Fieldpublic EbiDocExtnMeta getDocumentExtnMeta(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the DocumentEbiDocExtnMeta
for the Documentpublic void updateDocumentExtnMeta(EbiContext context, String docID, EbiDocExtnMeta meta) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the Document IDmeta
- the Extension Metadata defining the Field name / Field values
mappings for the specified Documentpublic Collection getDocumentLayoutStyles(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Note: this method does not perform any security filtering of returned results. Use getFilteredDocumentTypesWithField if you want the API to perform the security filtering.
context
- contextdocTypeID
- the ID of the Document Type for which the
associated Layout Styles are to be enumeratedpublic Collection getFilteredDocumentLayoutStyles(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocTypeID
- the ID of the Document Type for which the
associated Layout Styles are to be enumeratedpublic EbiDocLayoutStyle addDocumentLayoutStyle(EbiContext context, String docTypeID, String styleName, String description, boolean isDefault, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocTypeID
- the ID of the Document Type for which this Style
is being createdstyleName
- the name of the style; must be unique within the
set of styles defined on the Document Typedescription
- the description of the new StyleisDefault
- 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 defaultacl
- the access control list for the new Layout Style; the
value of null is allowedpublic void addDocumentLayoutStyle(EbiContext context, EbiDocLayoutStyle style, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextstyle
- the Style to addacl
- the Access Control List for the new Layout Style; the
value of null is allowedpublic EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context, String layoutStyleID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextlayoutStyleID
- the ID of the Layout Style whose metadata
is requestedpublic EbiDocLayoutStyle getDocumentLayoutStyle(EbiContext context, String docTypeID, String styleName) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextdocTypeID
- Document Type IDstyleName
- Layout Style nameEbiDocType
,
EbiDocLayoutStyle
public boolean removeDocumentLayoutStyle(EbiContext context, String layoutStyleID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextlayoutStyleID
- the ID of the Layout Style that is to
be removedEbiDocLayoutStyle
public void updateDocumentLayoutStyle(EbiContext context, EbiDocLayoutStyle layoutStyle) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextlayoutStyle
- the Layout Style object (with updates)public EbiDocLayoutStyle getDefaultDocumentLayoutStyle(EbiContext context, String docTypeID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocTypeID
- the ID of the Document Type for which the default
Layout Style is to be foundEbiDocType
,
EbiDocLayoutStyle
public EbiLayoutDocDescriptor addLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID, String userAgent) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextlayoutStyleID
- the ID of the Layout StylelayoutDocID
- the ID of the Layout DocumentuserAgent
- 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 Stylepublic boolean removeLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextlayoutStyleID
- the ID of the Layout StylelayoutDocID
- the ID of the Layout DocumentEbiDocLayoutStyle
,
EbiLayoutDocDescriptor
public void updateLayoutDocumentDescriptor(EbiContext context, EbiLayoutDocDescriptor desc, String newUserAgent) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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)");
context
- contextdesc
- the Descriptor to updatenewUserAgent
- the new value for the User Agentpublic EbiLayoutDocDescriptor getLayoutDocumentDescriptor(EbiContext context, String layoutStyleID, String layoutDocID, String userAgent) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextlayoutStyleID
- the ID of a Layout StylelayoutDocID
- the ID of a Layout DocumentuserAgent
- the User Agentpublic Collection getLayoutDocumentDescriptors(EbiContext context, String layoutStyleID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextlayoutStyleID
- the ID of the Layout Stylepublic EbiDocLayoutSet createDocLayoutSet(EbiContext context, String layoutStyleID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
addDocument
or
updateDocumentLayoutSet
.layoutStyleID
- the ID of the Document Layout Stylepublic EbiDocVersionDescriptor createDocVersionDescriptor(EbiContext context, String docID, int versionID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
EbiDocLayoutSet.setLayoutDescriptor(EbiDocVersionDescriptor)
.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 usedEbiDocVersionDescriptor
public EbiDocLayoutSet getDocumentLayoutSet(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document for which this Set is being createdEbiDocLayoutSet
public void updateDocumentLayoutSet(EbiContext context, EbiDocLayoutSet layoutSet) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextlayoutSet
- the updated Layout Setpublic boolean removeDocumentLayoutSet(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the DocumentEbiDocLayoutSet
public EbiDocVersionDescriptor getDocumentLayout(EbiContext context, String docID, int mode, boolean getDefaultIfNotFound) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
1. If there is a Document Layout Set 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.
context
- contextdocID
- the ID of the Document whose Layout is to be foundmode
- the search mode specifying how to compare User Agent strings
associated with various Layout Documents against the User Agent contained
in the supplied contextgetDefaultIfNotFound
- if true, attempt to locate the default Document
Layout in case we don't find a specific Layout that would match the ClientEbiDocVersionDescriptor
public EbiDocVersion getDocumentContentVersion(EbiContext context, String docID, int versionID, boolean getBytes) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the DocumentversionID
- the ID of the Version to getgetBytes
- whether to include the actual Document Content
into the returned EbiDocVersionEbiDocVersion
public EbiDocVersion getLatestDocumentContentVersion(EbiContext context, String docID, boolean getBytes) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the DocumentgetBytes
- whether to include the actual Document Content
into the returned EbiDocVersionEbiDocVersion
public Collection getDocumentContentVersions(EbiContext context, String docID, boolean getBytes) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextdocID
- the ID of the DocumentgetBytes
- whether to put the actual content into the
returned EbiDocContent'sEbiDocVersion
public void publishDocumentContentVersion(EbiContext context, String docID, int versionID, boolean force, boolean overwrite) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document whose Version is to be publishedversionID
- the Version ID of the Document that is to be publishedforce
- 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 VersionEbiDocument
,
EbiDocVersion
public void rollbackDocumentContent(EbiContext context, String docID, int rollbackVersionID, boolean publish) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document whose Content Version is being
rolled backrollbackVersionID
- the version number to roll back topublish
- if true, the version that the content is rolled back
to is publishedEbiDocVersion
public boolean checkoutDocument(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
EbiContentMgmtDelegate.checkoutDocument(EbiContext, String, boolean)
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);
context
- contextdocID
- the ID of the Document to be checked outEbiContentMgmtDelegate.checkinDocument(EbiContext, String, String, byte[], String, boolean)
,
EbiContentMgmtDelegate.uncheckoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.unlockDocument(EbiContext, String)
public EbiDocument checkoutDocument(EbiContext context, String docPath, boolean isDocID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextdocPath
- the ID or URI of the Document to be checked outisDocID
- this value is true if ID of the Document is passed,
false if the URI of the Document is passedEbiContentMgmtDelegate.checkinDocument(EbiContext, String, String, byte[], String, boolean)
,
EbiContentMgmtDelegate.uncheckoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.unlockDocument(EbiContext, String)
public int checkinDocument(EbiContext context, String docID, String mimeType, byte[] data, String comment, boolean keepCheckedOut) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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); }
context
- contextdocID
- the ID of the Document for which a new Version is checked inmimeType
- the MIME type of the new Versiondata
- the new content datacomment
- the comment from the user doing the check-inkeepCheckedOut
- 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' changesEbiContentMgmtDelegate.checkoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.uncheckoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.unlockDocument(EbiContext, String)
public boolean uncheckoutDocument(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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());
context
- contextdocID
- the ID of the Document to be unchecked out.EbiContentMgmtDelegate.checkinDocument(EbiContext, String, String, byte[], String, boolean)
,
EbiContentMgmtDelegate.checkoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.unlockDocument(EbiContext, String)
public boolean unlockDocument(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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 ...
context
- contextdocID
- the ID of the DocumentEbiContentMgmtDelegate.checkinDocument(EbiContext, String, String, byte[], String, boolean)
,
EbiContentMgmtDelegate.checkoutDocument(EbiContext, String)
,
EbiContentMgmtDelegate.uncheckoutDocument(EbiContext, String)
public EbiDocLink addDocumentLink(EbiContext context, String docidParent, String docidChild, int versionidChild) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidParent
- the ID of the Link Parent DocumentdocidChild
- the ID of the Link Child DocumentversionidChild
- 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 usedEbiDocLink
public EbiDocLink addDocumentLink(EbiContext context, String docidParent, String docidChild, int versionidChild, byte[] extnMeta) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidParent
- the ID of the Link Parent DocumentdocidChild
- the ID of the Link Child DocumentversionidChild
- 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 usedextnMeta
- Extension Metadata, if any, for the LinkEbiDocLink
public EbiDocLink getDocumentLink(EbiContext context, String docidParent, String docidChild) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextdocidParent
- the ID of the Link Parent DocumentdocidChild
- the ID of the Link Child DocumentEbiDocLink
public boolean removeDocumentLink(EbiContext context, String docidParent, String docidChild) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidParent
- the ID of the link parent DocumentdocidChild
- the ID of the link child DocumentEbiDocLink
public void updateDocumentLink(EbiContext context, String docidParent, String docidChild, int newVersionIdChild) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidParent
- the ID of the Link Parent DocumentdocidChild
- the ID of the Link Child DocumentnewVersionIdChild
- 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 usedEbiDocLink
public void updateDocumentLink(EbiContext context, EbiDocLink link) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextlink
- the updated Link informationEbiDocLink
public Collection getLinkParentDocuments(EbiContext context, String docidChild) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Note: this method does not perform any security filtering of
returned results. Use getFilteredLinkParentDocuments
if you
want the API to perform the security filtering.
context
- contextdocidChild
- the ID of the Link Child DocumentEbiDocument
,
EbiDocLink
public Collection getFilteredLinkParentDocuments(EbiContext context, String docidChild) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidChild
- the ID of the Link Child DocumentEbiDocument
,
EbiDocLink
public Collection getLinkChildDocuments(EbiContext context, String docidParent) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Note: this method does not perform any security filtering of
returned results. Use getFilteredLinkChildDocuments
if you
want the API to perform the security filtering.
context
- contextdocidParent
- the ID of the Link Parent DocumentEbiDocument
,
EbiDocLink
public Collection getFilteredLinkChildDocuments(EbiContext context, String docidParent) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocidParent
- the ID of the Link Parent DocumentEbiDocument
,
EbiDocLink
public Collection getLinks(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextEbiDocument
,
EbiDocLink
public Collection getLinks(EbiContext context, String docID, boolean isLinkParent) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextdocID
- the ID of the DocumentisLinkParent
- if true, the Document is assumed to be a
Link-Parent, if false, it's assumed to be a Link-ChildEbiDocument
,
EbiDocLink
public EbiQuery createQuery(String queryType)
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 |
EbiFtsDocMetaDataQuery
and
EbiFtsDocContentQuery
are deprecated,
use the following instead:
com.sssw.search.api.EbiQuery query = com.sssw.search.factory.EboFactory.getQuery();
queryType
- the query typeEbiDocQuery
,
EbiQuery
,
"the findElements
methods"public Collection findElements(EbiContext context, EbiQuery query) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextquery
- the query objectpublic Collection runQuery(EbiContext context, EbiQuery query, boolean checkAccess) throws EboUnrecoverableSystemException, EboSecurityException
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)); }
context
- contextquery
- the Search API query objectcheckAccess
- 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 performedpublic Collection findElementsFiltered(EbiContext context, EbiQuery query) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextquery
- the query objectpublic String findElements(EbiContext context, EbiQuery query, boolean rowwise) throws EboUnrecoverableSystemException, EboSecurityException
context
- the contextquery
- the query objectrowwise
- whether to return the results as rows of data
or as columns of dataEbiDocQuery
public String findElementsFiltered(EbiContext context, EbiQuery query, boolean rowwise) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- the contextquery
- the query objectrowwise
- whether to return the results as rows of data
or as columns of dataEbiDocQuery
public Document findElementsDOM(EbiContext context, EbiQuery query, boolean rowwise) throws EboUnrecoverableSystemException, EboSecurityException
context
- the contextquery
- the query objectrowwise
- whether to return the results as rows of data
or as columns of dataEbiDocQuery
public Document findElementsFilteredDOM(EbiContext context, EbiQuery query, boolean rowwise) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- the contextquery
- the query objectrowwise
- whether to return the results as rows of data
or as columns of dataEbiDocQuery
public EbiDocQueryConverter getQueryConverter()
public EbiQueryEngineDelegate getQueryEngine() throws EboUnrecoverableSystemException
EbiQueryEngineDelegate
public String getQueryEngineRepository() throws EboUnrecoverableSystemException
public EbiDataFetcherDelegate getDataFetcher() throws EboUnrecoverableSystemException
EbiDataFetcherDelegate
public void setAcl(EbiContext context, EbiSecurableElement el, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextel
- securable elementacl
- the Access Control List specifying permissions for
the elementEbiSecurableElement
public Acl getAcl(EbiContext context, EbiSecurableElement el) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextel
- securable elementEbiSecurableElement
public boolean removeAcl(EbiContext context, EbiSecurableElement el) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextel
- securable elementEbiSecurableElement
public boolean isAuthorized(EbiContext context, EbiSecurableElement el, String accessRight) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextel
- securable elementaccessRight
- the access right to checkEbiSecurableElement
public EbiContentAdmin getAdminElement(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextEbiContentAdmin
public boolean hasAdminAccess(EbiContext context, String accessRight) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextaccessRight
- the access right to checkpublic boolean hasAccess(EbiContext context, EbiSecurableElement el, String accessRight) throws EboUnrecoverableSystemException, EboSecurityException
context
- contexel
- the element to check access toaccessRight
- the access right to checkEbiSecurableElement
public Collection getAllAccessible(EbiContext context, Collection elements, String elementType, String right, String adminRight) throws EboUnrecoverableSystemException, EboSecurityException
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
context
- contextelements
- elements to be filteredelementType
- the type of elementsright
- the access right to checkadminRight
- the admin right to checkpublic EbiDocFolder addFolder(EbiContext context, EbiDocFolder parent, String name, int type, String description, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextparent
- the Parent Folder under which the new one is to be createdname
- the name of the new Foldertype
- 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 valuedescription
- the description for the new Folderacl
- the Access Control List for the new Folder; if the value
is null, the ACL of the Parent Folder is appliedEbiDocFolder
public void addFolder(EbiContext context, EbiDocFolder parent, EbiDocFolder child, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextparent
- the Parent Folder under which the new one is to be createdchild
- the Folder to addacl
- the Access Control List for the new Folder; if the value
is null, the ACL of the Parent Folder is appliedEbiDocFolder
public EbiDocFolder getFolder(EbiContext context, EbiDocFolder parent, String name) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextparent
- the parent foldername
- the name of the folder to look upEbiDocFolder
public EbiDocFolder getFolder(EbiContext context, String folderID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextfolderID
- the ID of the Folder to look upEbiDocFolder
public boolean removeFolder(EbiContext context, String folderID, boolean force) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextfolderID
- the ID of the Folder to removeforce
- 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.public void updateFolder(EbiContext context, EbiDocFolder folder) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextfolder
- the Folder object containing the updated metadata
for the folderEbiDocFolder
public EbiDocFolder getRootFolder(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextEbiDocFolder
public EbiDocFolder copyFolder(EbiContext context, EbiDocFolder sourceFolder, EbiDocFolder destFolder, boolean copyFolderSecurity, boolean copySubfolders, boolean copyDocuments, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextsourceFolder
- the Folder to copydestFolder
- the destination FoldercopyFolderSecurity
- if true, copy the Folder's ACLcopySubfolders
- if true, do a recursive copycopyDocuments
- if true, copy the documentsoverwrite
- if true, overwrite any already existing entriesdocParts
- which parts of Documents to copy, if copyDocuments is
trueEbiDocFolder
public EbiDocFolder moveFolder(EbiContext context, EbiDocFolder sourceFolder, EbiDocFolder destFolder, boolean withFolderSecurity, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextsourceFolder
- the Folder to movedestFolder
- the destination FolderwithFolderSecurity
- if true, preserve Folder's ACLoverwrite
- if true, overwrite any already existing entriesdocParts
- which parts of Documents to preserveEbiDocFolder
public EbiDocCategory addCategory(EbiContext context, EbiDocCategory parent, String name, int type, String description, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextparent
- the parent category under which the new one is to be createdname
- the name of the new Categorytype
- 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 valuedescription
- the description for the new Categoryacl
- the access control list for the new Category; if the value
is null, the ACL of the Parent Category is appliedEbiDocCategory
public void addCategory(EbiContext context, EbiDocCategory parent, EbiDocCategory child, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextparent
- the parent categorychild
- the child category to addacl
- the ACL to set on the childEbiDocCategory
public EbiDocCategory getCategory(EbiContext context, EbiDocCategory parent, String name) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextparent
- the Parent Categoryname
- the name of the Category to look upEbiDocCategory
public EbiDocCategory getCategory(EbiContext context, String categoryID) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextcategoryID
- the ID of the Category to look upEbiDocCategory
public boolean removeCategory(EbiContext context, String categoryID, boolean force) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextcategoryID
- the ID of the category to removeforce
- 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.EbiDocCategory
public void updateCategory(EbiContext context, EbiDocCategory category) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextcategory
- the Category object containing the updated metadata
for the CategoryEbiDocCategory
public EbiDocCategory getRootCategory(EbiContext context) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextEbiDocCategory
public void addDocumentCategoryReference(EbiContext context, String docID, String categoryID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document that is to be added to a CategorycategoryID
- the ID of the Category to which the Document is to be
addedpublic boolean removeDocumentCategoryReference(EbiContext context, String docID, String categoryID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Document that is to be removed from the
specified CategorycategoryID
- the ID of the Category from which the specified
Document is to be removedpublic Collection getDocumentCategoryReferences(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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();
context
- contextdocID
- the ID of the documentpublic Collection getFilteredDocumentCategoryReferences(EbiContext context, String docID) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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.
context
- contextdocID
- the ID of the Documentpublic EbiDocCategory copyCategory(EbiContext context, EbiDocCategory sourceCategory, EbiDocCategory destCategory, boolean copyCategorySecurity, boolean copySubcategories, boolean assignDocuments, boolean overwrite) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextsourceCategory
- the category to copydestCategory
- the destination categorycopyCategorySecurity
- if true, copy category securitycopySubcategories
- if true, do a recursive copyassignDocuments
- assign documents into respective categoriesoverwrite
- overwrite any existing directory entriespublic EbiDocCategory moveCategory(EbiContext context, EbiDocCategory sourceCategory, EbiDocCategory destCategory, boolean withCategorySecurity, boolean overwrite) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextsourceCategory
- the Category to movedestCategory
- the destination CategorywithCategorySecurity
- copy the Category securityoverwrite
- whether to overwrite any existing directory entriespublic EbiDirectoryEntry getEntry(EbiContext context, EbiDirectory parent, String name) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextparent
- the Parent Directoryname
- the name of the entry to look upEbiDirectoryEntry
representing the found entry;
null if not foundEbiDirectoryEntry
,
EbiDirectory
public Collection getDirectoryList(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments) throws EboUnrecoverableSystemException, EboSecurityException
EbiDirectory
is a superinterface of both
EbiDocFolder
and EbiDocCategory
;
getFilteredDirectoryList
if you want
the API to perform the security filtering.
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; ... } }
context
- contextdir
- the DirectorygetSubdirectories
- whether to get the list of Directories
that are child directories under the specified onegetDocuments
- whether to get the list of Documents that
are located in the specified Directorypublic Collection getFilteredDirectoryList(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments) throws EboUnrecoverableSystemException, EboSecurityException
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
context
- contextdir
- the directorygetSubdirectories
- whether to get the list of directories
that are child directories under the specified onegetDocuments
- whether to get the list of documents that
are located in the specified directoryEbiContentMgmtDelegate.getDirectoryList(EbiContext, EbiDirectory, boolean, boolean)
public EbiDirectoryContents getDirectoryContents(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments) throws EboUnrecoverableSystemException, EboSecurityException
EbiDirectory
is a superinterface
of both EbiDocFolder
and EbiDocCategory
.
Notes:
context
- contextdir
- the directorygetSubdirectories
- whether to get the list of directories
that are child directories under the specified onegetDocuments
- whether to get the list of documents that
are located in the specified directorypublic EbiDirectoryContents getFilteredDirectoryContents(EbiContext context, EbiDirectory dir, boolean getSubdirectories, boolean getDocuments) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextdir
- the DirectorygetSubdirectories
- whether to get the list of Directories
that are Child Directories under the specified onegetDocuments
- whether to get the list of Documents that
are located in the specified Directorypublic EbiDirectoryEntry lookupDirectoryEntry(EbiContext context, EbiDirectory parent, String path) throws EboUnrecoverableSystemException, EboSecurityException
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.
context
- contextpath
- the path to the entry (forward slash-delimited, e.g.
"/myFolder1/myFolder2/myDoc1"); the path is relative to the parentpublic EbiDirectoryEntry lookupDirectoryEntry(EbiContext context, String path, String elType) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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);
context
- contextpath
- the path to the entry (forward slash-delimited, e.g.
"/myFolder1/myFolder2/myDoc1"); the path is relative to the Root
Folder or Root CategoryEbiDirectoryEntry
,
EbiDirectory
public EbiDirectory validateDirectory(EbiContext context, String path, String elType) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
Example:
EbiDocFolder myFolder = cmgr.validateDirectory( context, "myFolder1/myFolder2", EbiDocFolder.EL_DOC_FOLDER);
context
- contextpath
- the path to the DirectoryelType
- the Element type of the Directorypublic EbiDirectory addDirectory(EbiContext context, EbiDirectory parent, String name, int type, String description, Acl acl) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextparent
- the parent Directoryname
- the name for the new Directorytype
- Directory type for the new Directorydescription
- description for the new Directoryacl
- Acl to set; if null, the Acl of the parent is inheritedEbiDirectory
public EbiDirectory getRootDirectory(EbiContext context, String elType) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextelType
- the Element type of the Rootpublic boolean removeDirectory(EbiContext context, String path, String elType, boolean force) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextpath
- the path to the DirectoryelType
- the Element type of the Directoryforce
- if true, a recursive removal is done, otherwise, if it's
determined that the directory is not empty, an exception is thrownpublic EbiDirectoryEntry copyDirectoryEntry(EbiContext context, EbiDirectoryEntry entryToCopy, EbiDirectoryEntry destEntry, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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 |
context
- contextentryToCopy
- the entry to copydestEntry
- the destination entryoverwrite
- 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 throwndocParts
- 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)public EbiDirectoryEntry moveDirectoryEntry(EbiContext context, EbiDirectoryEntry entryToMove, EbiDirectoryEntry destEntry, boolean overwrite, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
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 |
context
- contextentryToMove
- the entry to movedestEntry
- the destination entryoverwrite
- 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 throwndocParts
- 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)public boolean hasDirectoryEntryChildren(EbiDirectoryEntry entry) throws EboUnrecoverableSystemException
entry
- the entry to checkpublic boolean isDirectoryEntryChildOf(EbiDirectoryEntry child, EbiDirectoryEntry parent) throws EboUnrecoverableSystemException
child
- the Directory Entry to checkparent
- potential parent Directory Entrypublic EbiImporter getImporter() throws EboUnrecoverableSystemException
public EbiExporter getExporter() throws EboUnrecoverableSystemException
public String validateOperation(EbiContext context, String elID, String elType, int opCode) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
context
- contextelID
- the element IDelType
- the type of the elementopCode
- the operation code, see OP_XXXX.public EbiRelatedElements getRelatedElements(EbiContext context, EbiFrameworkElement element, int relType, boolean checkAccess) throws EboUnrecoverableSystemException, EboSecurityException
context
- the contextelement
- the elementrelType
- 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 returnedpublic boolean removeElementFully(EbiContext context, EbiFrameworkElement element) throws EboUnrecoverableSystemException, EboSecurityException
context
- the contextelement
- the elementpublic int getDirectoryCount(EbiContext context, EbiDirectory dir, boolean countSubdirs, boolean countDocs, boolean countAccessibleOnly) throws EboUnrecoverableSystemException
context
- contextdir
- the directorycountSubdirs
- if true, all subdirectories are countedcountDocs
- if true, all docs are countedcountAccessibleOnly
- 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)
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |