Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiDocument

All Superinterfaces:
Cloneable, Comparable, EbiCmElement, EbiDirectoryEntry, EbiElement, EbiFrameworkElement, EbiSecurableElement, Serializable
All Known Subinterfaces:
EbiQueryResult

public interface EbiDocument
extends EbiDirectoryEntry, Serializable

Defines the notion of a Document.
A Document is comprised of the following constituents:

The mandatory pieces of metadata information on a Document are:

The optional pieces of metadata are:

See Also:
EbiAddDocumentParams, EbiContentMgmtDelegate, EbiDocContent, EbiDocCategory, EbiDocFolder, EbiDocExtnMeta, EbiDocLink

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 getLayout method This is useful for asking for the default layout right away.
static int COMPARE_PLATFORMS
          The mask for "compare platforms".
static int DOC_PART_ALL
          Constant that signifies that the operation is to utilize all of the document's parts
static int DOC_PART_CATEGORY_REFS
          Constant that signifies that the operation is to utilize the list of categories to which the given document belongs
static int DOC_PART_CHILDREN
          Constant that signifies that the operation is to utilize the child documents (immediate descendants) of the document
static int DOC_PART_CHILDREN_RECURSIVE
          Constant that signifies that the operation is to utilize the child documents as well as all of their descendants, recursively
static int DOC_PART_CONTENT
          Constant that signifies that the operation is to utilize the content of the document
static int DOC_PART_EXTN_META
          Constant that signifies that the operation is to utilize the extension metadata of the document
static int DOC_PART_LAYOUT_SET
          Constant that signifies that the operation is to utilize the layout set of the document
static int DOC_PART_LINKS
          Constant that signifies that the operation is to utilize the links for which the given document is a link-parent
static int DOC_PART_META
          Constant that signifies that the operation is to utilize the metadata of the document
static int DOC_PART_SECURITY
          Constant that signifies that the operation is to utilize the security settings on the document
static int DOC_PART_VERSIONS
          Constant that signifies that the operation is to utilize the versions of the document
static int DOC_PUBSTATUS_NOT_PUBLISHED
          Constant for the "not yet published" status for a Document.
static int DOC_PUBSTATUS_PUBLISHED
          Constant for the "published" status for a Document.
static int DOC_PUBSTATUS_UNKNOWN
          Constant for the publish status for the case when the Content Manager is unable to determine the publish status for some reason.
static int DOC_PUBSTATUS_UNPUBLISHED
          Constant for the "unpublished" status for a Document.
static String EL_DOCUMENT
          The Document element type.
static int OP_RET_FAILED_HAS_CHILDREN
          Return code for condition when an operation fails because the specified item has child items that belong to it
static int OP_RET_FAILED_NOT_A_CHILD
          Return code for condition when an operation fails because the specified item is not a child of the container on which the operation is executed.
static int OP_RET_SUCCESS
          Return code for successful completion of an operation.
static String PROTECT
          The 'protect' permission type.
static String PUBLISH
          The 'publish' permission type.
static String READ
          The 'read' permission type.
static String WRITE
          The 'write' permission type.
 
Fields inherited from interface com.sssw.cm.api.EbiDirectoryEntry
OP_ADD_LEAF_NODE
 
Fields inherited from interface com.sssw.cm.api.EbiCmElement
OP_COPY, OP_MOVE, OP_REMOVE, OP_UPDATE
 
Method Summary
 EbiDocument addChildDocument(EbiContext context, EbiAddDocumentParams params)
          Adds a child document to this document.
 int checkin(EbiContext context, EbiDocContent content, String comment, boolean keepCheckedOut)
          Checks in this Document.
 boolean checkout(EbiContext context)
          Checks out this Document.
 EbiDocument copy(EbiContext context, EbiDocFolder destFolder, boolean overwrite, int docParts)
          Copies this document to the specified folder.
 Collection findSimilar(EbiContext context, boolean checkAccess)
          Finds all the documents that are similar to this one, in the Repository that this document resides.
 String getAbstract()
          Gets the Document's abstract (summary)
 Collection getAllVersions(EbiContext context, boolean getBytes)
          Enumerate all the existing versions of a specific Document.
 String getAuthor()
          Gets the name of the Document's author.
 Collection getCategoryReferences(EbiContext context, boolean checkAccess, boolean IDsOnly)
          Gets the list of Categories to which this Document belongs.
 EbiDocContent getContent(EbiContext context, boolean getBytes)
          Gets the published content for the document, if any.
 Timestamp getDateCreated()
          Gets the date/time of the Document's creation
 String getDocTypeID()
          Gets the ID of the Document Type to which this Document belongs.
 String getDocTypeName()
          Gets the name of the Document Type to which this Document belongs.
 EbiDocType getDocumentType(EbiContext context)
          Gets the document type that this document belongs to
 String getEncoding()
          Gets the ENCODING of published content.
 Timestamp getExpirationDate()
          Gets the expiration date/time of the Document.
 EbiDocExtnMeta getExtnMeta(EbiContext context)
          Gets the Extension Meta for the Document.
 EbiDocExtnMetaInfo getExtnMetaInfo(EbiContext context, EbiDocField field)
          Gets an Extension Meta Info for the specified Field.
 Collection getFieldValues(EbiContext context, EbiDocField field)
          Gets the Extension Metadata Field values for the specified Field on this Document.
 EbiDocFolder getFolder(EbiContext context)
          Gets the folder that this Document belongs to.
 String getFolderID()
          Gets the ID of the Folder to which this Document belongs.
 String getID()
          Gets the ID of the Document.
 EbiDocVersion getLatestVersion(EbiContext context, boolean getBytes)
          Gets the latest Version of a Document whose ID is supplied.
 EbiDocVersionDescriptor getLayout(EbiContext context, int mode, boolean getDefaultIfNotFound)
          Gets the Layout for this Document.
 EbiDocLayoutSet getLayoutSet(EbiContext context)
          Gets the Layout Set for this Document.
 EbiDocLink getLink(EbiContext context, EbiDocument linkDoc, boolean isLinkParent)
          Gets the specified Document Link.
 Collection getLinkChildren(EbiContext context, boolean checkAccess)
          Gets the list of Documents to which this Document is linked as a Link-Parent.
 Collection getLinkParents(EbiContext context, boolean checkAccess)
          Gets the list of Documents to which this Document is linked as a Link-Child.
 Collection getLinks(EbiContext context, boolean isLinkParent)
          Gets the list of Document Links that this Document is a part of.
 String getLockedBy()
          Gets the name of the user that currently has the Document checked out.
 String getMimeType()
          Gets the MIME type of published content.
 String getParentDocID()
          Gets the ID of the parent Document, if any.
 EbiDocument getParentDocument(EbiContext context)
          Gets the parent document, if any.
 Timestamp getPublishDate()
          Gets the publish date/time of the Document.
 int getPublishStatus()
          Gets the publish status of the Document.
 int getSize()
          Gets the size of published content.
 String getStatus()
          Gets the status of the Document.
 String getSubtitle()
          Gets the subtitle of the Document
 String getTitle()
          Gets the title of the Document
 Timestamp getUpdateTime()
          Gets the update time (last modified) for the Document.
 EbiDocVersion getVersion(EbiContext context, int versionID, boolean getBytes)
          Gets a specific Version of a Document whose ID is supplied.
 boolean isInCategory(EbiContext context, EbiDocCategory category)
          Checks to see if the Document belongs to the specified Category.
 EbiDocLink linkTo(EbiContext context, EbiDocument linkDoc, boolean isLinkParent, int versionidChild, byte[] extnMeta)
          Links this Document to the specified other Document.
 EbiDocument move(EbiContext context, EbiDocFolder destFolder, boolean overwrite, int docParts)
          Moves this document to the specified folder.
 EbiDocument move(EbiContext context, EbiDocument newParentDoc)
          Moves this document to be the child of the new, specified parent document
 void orphanChildren(EbiContext context)
          Removes associations of this Document with any of its Child Documents.
 void publishVersion(EbiContext context, int versionID, boolean force, boolean overwrite)
          Publishes a specific Version of this Document.
 int removeChildDocument(EbiContext context, String childDocID, boolean recursive)
          Removes the child Document whose ID is specified.
 boolean removeLayoutSet(EbiContext context)
          Removes the Layout Set for this Document.
 boolean removeLink(EbiContext context, EbiDocument linkDoc, boolean isLinkParent)
          Removes the specified Link.
 void rollback(EbiContext context, int rollbackVersionID, boolean publish)
          Rolls document content from the latest version back to the specified one.
 void setAbstract(String docAbstract)
          Sets the abstract for this Document.
 void setAllFieldValues(EbiContext context, EbiDocField[] fields, Object[][] values)
          Sets all the Extension Metadata Field values for this Document.
 void setAuthor(String author)
          Sets the author of the Document.
 void setDateCreated(Timestamp dateCreated)
          Sets the creation date/time for the Document.
 void setDocTypeID(String docTypeID)
          Sets the Document Type ID.
 void setExpirationDate(Timestamp expirationDate)
          Sets the expiration date/time.
 void setExtnMeta(EbiContext context, EbiDocExtnMeta meta)
          Sets the Extension Meta for the Document.
 void setExtnMetaInfo(EbiContext context, EbiDocExtnMetaInfo emi)
          Sets an Extension Meta Info for the Document.
 void setFieldValues(EbiContext context, EbiDocField field, Object[] values)
          Sets Field values for the specified Field on this Document.
 void setFolderID(String folderID)
          Sets the folder ID for this Document.
 void setLockedBy(String userID)
          Sets the "locked by" value for the Document.
 void setParentDocID(String parentDocID)
          Sets the ID of the parent Document.
 void setPublishDate(Timestamp publishDate)
          Sets the publish date/time.
 void setPublishStatus(int status)
          Sets the publish status for the Document.
 void setStatus(String status)
          Sets the status of the Document.
 void setSubtitle(String subtitle)
          Sets the subtitle of the Document.
 void setTitle(String title)
          Sets the title of the Document.
 void setUpdateTime(Timestamp updateTime)
          Sets the update time (last modified) for the Document.
 boolean uncheckout(EbiContext context)
          Unchecks out the specified Document: releases the lock on the Document set by the user whose context is passed in.
 void unlinkAll(EbiContext context, boolean isLinkParent, boolean doCheckOuts)
          Removes any links that this Document is involved in.
 boolean unlock(EbiContext context)
          Releases or "picks" the lock set on the Document with the specified ID.
 boolean unpublish(EbiContext context)
          Unpublishes the document, i.e.
 void update(EbiContext context, boolean keepCheckedOut)
          Updates the document (save all the changes that have been set so far via the setter methods).
 void updateLayoutSet(EbiContext context, EbiDocLayoutSet layoutSet)
          Updates the Layout Set for this Document.
 boolean updateLink(EbiContext context, EbiDocLink link)
          Updates the specified Link.
 
Methods implemented from interface com.sssw.cm.api.EbiDirectoryEntry
exists, getChildren, getContentManager, getKey, getName, getParentDirectory, getRepositoryID, getURL, getURLDontThrow, hasChildren, hasNameChanged, isChildOf, isDescendantOf, isDescendantOf, isDirectory, isInDefaultRepository, isInSystemRepository, remove, removeChildren, setID, setID, setLastModified, setName, setRepositoryID, update
 
Methods implemented from interface com.sssw.fw.api.EbiSecurableElement
getAcl, getObjectID, isUserAuthorized, removeAcl, setAcl
 
Methods implemented from interface com.sssw.cm.api.EbiCmElement
fromXML, toXML, validateOperation
 
Methods implemented from interface java.lang.Comparable
compareTo
 
Methods implemented from interface com.sssw.fw.api.EbiFrameworkElement
getElementUUID, getLastModified, getLastModifiedBy, isEqualTo, isReadOnly, resetReadOnly, setLastModified, setLastModifiedBy, setReadOnly
 

Field Detail

EL_DOCUMENT

public static final String EL_DOCUMENT
The Document element type.

READ

public static final String READ
The 'read' permission type. Specifies who can read the metadata of the document (name, title, publish date, etc.), the extension metadata (the field values), the contents of the document, and the content versions.

WRITE

public static final String WRITE
The 'write' permission type. Specifies who can modify the metadata of the document (name, title, publish date, etc.), the extension metadata (the field values), and create new versions of the content.

PROTECT

public static final String PROTECT
The 'protect' permission type. Specifies who can set an ACL on the document.

PUBLISH

public static final String PUBLISH
The 'publish' permission type. Specifies who can publish the document.

DOC_PART_ALL

public static final int DOC_PART_ALL
Constant that signifies that the operation is to utilize all of the document's parts

DOC_PART_META

public static final int DOC_PART_META
Constant that signifies that the operation is to utilize the metadata of the document

DOC_PART_CONTENT

public static final int DOC_PART_CONTENT
Constant that signifies that the operation is to utilize the content of the document

DOC_PART_LAYOUT_SET

public static final int DOC_PART_LAYOUT_SET
Constant that signifies that the operation is to utilize the layout set of the document

DOC_PART_SECURITY

public static final int DOC_PART_SECURITY
Constant that signifies that the operation is to utilize the security settings on the document

DOC_PART_VERSIONS

public static final int DOC_PART_VERSIONS
Constant that signifies that the operation is to utilize the versions of the document

DOC_PART_EXTN_META

public static final int DOC_PART_EXTN_META
Constant that signifies that the operation is to utilize the extension metadata of the document

DOC_PART_CHILDREN

public static final int DOC_PART_CHILDREN
Constant that signifies that the operation is to utilize the child documents (immediate descendants) of the document

DOC_PART_CHILDREN_RECURSIVE

public static final int DOC_PART_CHILDREN_RECURSIVE
Constant that signifies that the operation is to utilize the child documents as well as all of their descendants, recursively

DOC_PART_LINKS

public static final int DOC_PART_LINKS
Constant that signifies that the operation is to utilize the links for which the given document is a link-parent

DOC_PART_CATEGORY_REFS

public static final int DOC_PART_CATEGORY_REFS
Constant that signifies that the operation is to utilize the list of categories to which the given document belongs

DOC_PUBSTATUS_UNKNOWN

public static final int DOC_PUBSTATUS_UNKNOWN
Constant for the publish status for the case when the Content Manager is unable to determine the publish status for some reason.

DOC_PUBSTATUS_NOT_PUBLISHED

public static final int DOC_PUBSTATUS_NOT_PUBLISHED
Constant for the "not yet published" status for a Document. This status value implies that the Document has not been published yet.

DOC_PUBSTATUS_PUBLISHED

public static final int DOC_PUBSTATUS_PUBLISHED
Constant for the "published" status for a Document. This status value implies that the Document has been published.

DOC_PUBSTATUS_UNPUBLISHED

public static final int DOC_PUBSTATUS_UNPUBLISHED
Constant for the "unpublished" status for a Document. This status value implies that the Document has been unpublished.

COMPARE_NONE

public static final int COMPARE_NONE
The mode for "do not compare user agents" for the getLayout method This is useful for asking for the default layout right away.

COMPARE_ALL

public static final int COMPARE_ALL
The mode for "compare all the properties of user agents": browser names, browser versions (major and minor), and platforms. Use for the getLayout method.

COMPARE_NAMES

public static final int COMPARE_NAMES
The mask for "compare browser names". Use for the getLayout method.

COMPARE_MAJOR_VERS

public static final int COMPARE_MAJOR_VERS
The mask for "compare major versions". Use for the getLayout method.

COMPARE_MINOR_VERS

public static final int COMPARE_MINOR_VERS
The mask for "compare minor versions". Use for the getLayout method.

COMPARE_PLATFORMS

public static final int COMPARE_PLATFORMS
The mask for "compare platforms". Use for the getLayout method.

OP_RET_SUCCESS

public static final int OP_RET_SUCCESS
Return code for successful completion of an operation.

OP_RET_FAILED_NOT_A_CHILD

public static final int OP_RET_FAILED_NOT_A_CHILD
Return code for condition when an operation fails because the specified item is not a child of the container on which the operation is executed.

OP_RET_FAILED_HAS_CHILDREN

public static final int OP_RET_FAILED_HAS_CHILDREN
Return code for condition when an operation fails because the specified item has child items that belong to it
Method Detail

getID

public String getID()
Gets the ID of the Document. The ID uniquely identifies the Document.
Specified by:
getID in interface EbiDirectoryEntry
Returns:
the ID

getDocTypeID

public String getDocTypeID()
Gets the ID of the Document Type to which this Document belongs.
Returns:
the Document Type ID

getDocTypeName

public String getDocTypeName()
Gets the name of the Document Type to which this Document belongs.
Returns:
the name of the Document Type

getAuthor

public String getAuthor()
Gets the name of the Document's author.
Returns:
the author's name

getTitle

public String getTitle()
Gets the title of the Document
Returns:
the title

getSubtitle

public String getSubtitle()
Gets the subtitle of the Document
Returns:
the subtitle

getAbstract

public String getAbstract()
Gets the Document's abstract (summary)
Returns:
the abstract

getDateCreated

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

getPublishDate

public Timestamp getPublishDate()
Gets the publish date/time of the Document. The value of null implies that the Document is to be published as soon as possible.
Returns:
the publish date/time for the Document

getExpirationDate

public Timestamp getExpirationDate()
Gets the expiration date/time of the Document. The value of null implies that the Document is never to expire.
Returns:
the expiration date/time

getLockedBy

public String getLockedBy()
Gets the name of the user that currently has the Document checked out. The value of null implies that the Document is not currently checked out to anyone.
Returns:
the name of the user that currently has the Document checked out

getStatus

public String getStatus()
Gets the status of the Document. The status values are defined by and specific to the application.
Returns:
the current status

getParentDocID

public String getParentDocID()
Gets the ID of the parent Document, if any. The value of -1 implies that the Document has currently no assigned parent.
Returns:
the parent Document ID

getFolderID

public String getFolderID()
Gets the ID of the Folder to which this Document belongs.
Returns:
the Folder ID

getPublishStatus

public int getPublishStatus()
Gets the publish status of the Document.
Returns:
the value of the status
See Also:
"the DOC_PUBSTATUS_* constants"

getUpdateTime

public Timestamp getUpdateTime()
Gets the update time (last modified) for the Document.
Returns:
the update time (last modified) for the Document

setAuthor

public void setAuthor(String author)
Sets the author of the Document. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
author - the new author

setTitle

public void setTitle(String title)
Sets the title of the Document. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
title - the new title

setSubtitle

public void setSubtitle(String subtitle)
Sets the subtitle of the Document. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
subtitle - the new subtitle

setAbstract

public void setAbstract(String docAbstract)
Sets the abstract for this Document. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
docAbstract - the new abstract

setPublishDate

public void setPublishDate(Timestamp publishDate)
Sets the publish date/time. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
publishDate - the publish date/time

setExpirationDate

public void setExpirationDate(Timestamp expirationDate)
Sets the expiration date/time. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
expirationDate - the expiration date/time

setStatus

public void setStatus(String status)
Sets the status of the Document. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
status - the new status

setParentDocID

public void setParentDocID(String parentDocID)
Sets the ID of the parent Document. The value must specify a valid Document ID, or null for "no parent". The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
parentDocID - the new parent Document ID

setFolderID

public void setFolderID(String folderID)
Sets the folder ID for this Document. This moves the Document to a different folder. The supplied value must specify a valid Folder. The EbiContentManager.updateDocument method needs to be called for this change to take effect.
Parameters:
folderID - the new Folder ID

setDocTypeID

public void setDocTypeID(String docTypeID)
Sets the Document Type ID. Cannot be used once document is created.
Parameters:
docTypeID -  

setDateCreated

public void setDateCreated(Timestamp dateCreated)
Sets the creation date/time for the Document. Cannot be used once document is created.
Parameters:
dateCreated -  

setLockedBy

public void setLockedBy(String userID)
Sets the "locked by" value for the Document. The 'locked by' field should be set via the checkoutDocument method on the Content Manager.
Parameters:
userID -  

setPublishStatus

public void setPublishStatus(int status)
Sets the publish status for the Document. Usage not recommended, since the Content Manager handles the 'publish status' field itself, as the document is published or expired.
Parameters:
status - the publush status
See Also:
"the DOC_PUBSTATUS_* constants"

setUpdateTime

public void setUpdateTime(Timestamp updateTime)
Sets the update time (last modified) for the Document.
Parameters:
updateTime - the update time (last modified) for the Document

getDocumentType

public EbiDocType getDocumentType(EbiContext context)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Gets the document type that this document belongs to
Parameters:
context - the context
Returns:
the document type

getFolder

public EbiDocFolder getFolder(EbiContext context)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Gets the folder that this Document belongs to.
Parameters:
context - context
Returns:
the folder
See Also:
EbiDocFolder

addChildDocument

public EbiDocument addChildDocument(EbiContext context,
                                    EbiAddDocumentParams params)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Adds a child document to this document.
Parameters:
context - context
params - parameters for the new child document
Returns:
the newly created document
See Also:
EbiAddDocumentParams

removeChildDocument

public int removeChildDocument(EbiContext context,
                               String childDocID,
                               boolean recursive)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Removes the child Document whose ID is specified.
Parameters:
context - context
childDocID - the ID of the child to remove
recursive - if true, the child and all its descendants are removed, if false, the child is only removed if it has no descendants
Returns:
one of the OP_xxxx return codes

getContent

public EbiDocContent getContent(EbiContext context,
                                boolean getBytes)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException,
                                EboItemExistenceException
Gets the published content for the document, if any.
Parameters:
context - context
getBytes - whether to retrieve the actual content bytes into the returned EbiDocContent
Returns:
the document content object for the published content, or null if there's no content currently published for this document

getSize

public int getSize()
Gets the size of published content.
Returns:
the size of the published content, if any; 0 if no content is currently published

getMimeType

public String getMimeType()
Gets the MIME type of published content.
Returns:
the MIME type of the published content, if any; null if no content is currently published

getEncoding

public String getEncoding()
Gets the ENCODING of published content.
Returns:
the ENCODING of the published content, if any; null if no content is currently published

getParentDocument

public EbiDocument getParentDocument(EbiContext context)
                              throws EboUnrecoverableSystemException,
                                     EboSecurityException
Gets the parent document, if any.
Parameters:
context -  
Returns:
the parent document, or null if there isn't one

move

public EbiDocument move(EbiContext context,
                        EbiDocFolder destFolder,
                        boolean overwrite,
                        int docParts)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Moves this document to the specified folder.
Parameters:
context - context
destFolder - the destination folder
overwrite - if true and there is a document with the same name in the destination folder, overwrite it with the one being moved, otherwise do nothing
Returns:
the new document
See Also:
EbiDocFolder

copy

public EbiDocument copy(EbiContext context,
                        EbiDocFolder destFolder,
                        boolean overwrite,
                        int docParts)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Copies this document to the specified folder.
Parameters:
context - context
destFolder - the destination folder
overwrite - if true and there is a document with the same name in the destination folder, overwrite it with the one being copied, otherwise do nothing
docParts - which part of the document are to be copied (see the DOC_PART_XXXX constants)
Returns:
the new document

move

public EbiDocument move(EbiContext context,
                        EbiDocument newParentDoc)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Moves this document to be the child of the new, specified parent document
Parameters:
context - context
newParentDoc - the new parent document
Returns:
the new, moved document

update

public void update(EbiContext context,
                   boolean keepCheckedOut)
            throws EboUnrecoverableSystemException,
                   EboSecurityException,
                   EboItemExistenceException
Updates the document (save all the changes that have been set so far via the setter methods). Optionally, keep the document still checked out.
Parameters:
context - context
keepCheckedOut - if true, the document will still be checked out otherwise it'll no longer be locked by the user

getExtnMetaInfo

public EbiDocExtnMetaInfo getExtnMetaInfo(EbiContext context,
                                          EbiDocField field)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          EboItemExistenceException
Gets an Extension Meta Info for the specified Field.
Parameters:
context - context
field - Field
Returns:
the Extension Meta Info or null if not found
See Also:
EbiDocExtnMetaInfo

setExtnMetaInfo

public void setExtnMetaInfo(EbiContext context,
                            EbiDocExtnMetaInfo emi)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException,
                            EboItemExistenceException
Sets an Extension Meta Info for the Document.
Parameters:
context - context
emi - the Extension Meta Info to set
See Also:
EbiDocExtnMetaInfo

getExtnMeta

public EbiDocExtnMeta getExtnMeta(EbiContext context)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Gets the Extension Meta for the Document.
Parameters:
context - context
Returns:
the Extension Meta for the Document
See Also:
EbiDocExtnMeta

setExtnMeta

public void setExtnMeta(EbiContext context,
                        EbiDocExtnMeta meta)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Sets the Extension Meta for the Document.
Parameters:
context - context
meta - the Extension Meta for the Document
See Also:
EbiDocExtnMeta

getFieldValues

public Collection getFieldValues(EbiContext context,
                                 EbiDocField field)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Gets the Extension Metadata Field values for the specified Field on this Document. This is a slightly simplified version of the getExtnMetaInfo method.
Parameters:
context - context
field - the Field
Returns:
a Collection of Field values whose Java type corresponds to the Field Value Type per the passed in EbiDocField
See Also:
EbiDocField

setFieldValues

public void setFieldValues(EbiContext context,
                           EbiDocField field,
                           Object[] values)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Sets Field values for the specified Field on this Document. This is a slightly simplified version of the 'setExtnMetaInfo' method.
Parameters:
context - context
field - the Field whose values are to be set
values - the Field values

setAllFieldValues

public void setAllFieldValues(EbiContext context,
                              EbiDocField[] fields,
                              Object[][] values)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException,
                              EboItemExistenceException
Sets all the Extension Metadata Field values for this Document. This is a slightly simplified version of the setExtnMeta method.
Parameters:
context -  
fields - the list of fields to set
values - the Field values; each row in the matrix corresponds to an entry in the fields array, these are the values of that specific Field
See Also:
EbiDocField

getLayoutSet

public EbiDocLayoutSet getLayoutSet(EbiContext context)
                             throws EboUnrecoverableSystemException,
                                    EboSecurityException,
                                    EboItemExistenceException
Gets the Layout Set for this Document.
Parameters:
context - context
Returns:
this Document's Layout Set, or none if none had been set

updateLayoutSet

public void updateLayoutSet(EbiContext context,
                            EbiDocLayoutSet layoutSet)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException,
                            EboItemExistenceException
Updates the Layout Set for this Document.
Parameters:
context - context
layoutSet - the updated Layout Set for this Document

removeLayoutSet

public boolean removeLayoutSet(EbiContext context)
                        throws EboUnrecoverableSystemException,
                               EboSecurityException,
                               EboItemExistenceException
Removes the Layout Set for this Document.
Parameters:
context - context
Returns:
true if the Layout Set has been successfully removed, false if none was found

getLayout

public EbiDocVersionDescriptor getLayout(EbiContext context,
                                         int mode,
                                         boolean getDefaultIfNotFound)
                                  throws EboUnrecoverableSystemException,
                                         EboSecurityException,
                                         EboItemExistenceException
Gets the Layout for this Document.
Parameters:
context - context
mode - the search mode specifying how to compare User Agent strings associated with various Layout Documents against the User Agent contained in the supplied context, see the COMPARE_* constants
getDefaultIfNotFound - if true, attempt to locate the default Document Layout in case we don't find a specific Layout that would match the Client
Returns:
the descriptor { Document ID, Document Version ID } pointing to the Document Layout, or null if not found
See Also:
EbiContentManager.getDocumentLayout(com.sssw.fw.api.EbiContext, java.lang.String, int, boolean), EbiDocVersionDescriptor

checkout

public boolean checkout(EbiContext context)
                 throws EboUnrecoverableSystemException,
                        EboSecurityException,
                        EboItemExistenceException
Checks out this Document.
Parameters:
context - context
Returns:
true if the Document was successfully checked out to the user whose context is passed in; false if it is already checked out to this user

checkin

public int checkin(EbiContext context,
                   EbiDocContent content,
                   String comment,
                   boolean keepCheckedOut)
            throws EboUnrecoverableSystemException,
                   EboSecurityException,
                   EboItemExistenceException
Checks in this Document.
Parameters:
context - context
content - the new content
comment - comment to go with the check-in
keepCheckedOut - if true, the Document will continue to be checked out to the user whose context is passed in, otherwise it'll be unlocked and available for checkouts
Returns:
the Version ID of the new Version of the Document

uncheckout

public boolean uncheckout(EbiContext context)
                   throws EboUnrecoverableSystemException,
                          EboSecurityException,
                          EboItemExistenceException
Unchecks out the specified Document: releases the lock on the Document set by the user whose context is passed in.
Parameters:
context - context
Returns:
true if the Document was successfully unchecked out, false if it was not checked out to the user whose context is passed in

unlock

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

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

Parameters:
context - context
Returns:
true if the Document was successfully unlocked, false if it was not locked

getVersion

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

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

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

getLatestVersion

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

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

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

getAllVersions

public Collection getAllVersions(EbiContext context,
                                 boolean getBytes)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Enumerate all the existing versions of a specific Document.

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

Parameters:
context - context
getBytes - whether to put the actual content into the returned EbiDocContent's
Returns:
a Collection of EbiDocVersion's representing Versions of the Document; the returned Versions are sorted by the Version ID in descending order, so the latest version, if there are any versions, is the first in the list
See Also:
EbiDocVersion

rollback

public void rollback(EbiContext context,
                     int rollbackVersionID,
                     boolean publish)
              throws EboUnrecoverableSystemException,
                     EboSecurityException,
                     EboItemExistenceException
Rolls document content from the latest version back to the specified one.
Parameters:
context - context
rollbackVersionID - the version number to roll back to
publish - if true, the version that the content is rolled back to is published
See Also:
EbiContentMgmtDelegate.rollbackDocumentContent(com.sssw.fw.api.EbiContext, java.lang.String, int, boolean)

publishVersion

public void publishVersion(EbiContext context,
                           int versionID,
                           boolean force,
                           boolean overwrite)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Publishes a specific Version of this Document.
Parameters:
context - context
versionID - the ID of the Version that is to be published
force - whether to force an immediate publish regardless of the publish date set on the Document
overwrite - if set to true, any published Content that already exists for the Document is overwritten with the specified Version; if set to false, the method will throw an exception if it detects that there is already a published Version
See Also:
EbiDocVersion

unpublish

public boolean unpublish(EbiContext context)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException,
                         EboItemExistenceException
Unpublishes the document, i.e. removes the currently published content and marks the document's publish status to be "unpublished"
Parameters:
context - context
Returns:
true if the document was successfully unpublished, false if no published content was found for it

linkTo

public EbiDocLink linkTo(EbiContext context,
                         EbiDocument linkDoc,
                         boolean isLinkParent,
                         int versionidChild,
                         byte[] extnMeta)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException,
                         EboItemExistenceException
Links this Document to the specified other Document.
Parameters:
context - context
linkDoc - the Document to link to
isLinkParent - if true, this Document is to be the Link-Child, otherwise it is to be the Link-Parent
versionidChild - Version ID to use for the Link-Child
extnMeta - Extension Metadata for the Link
Returns:
the Link object representing the new link
See Also:
EbiDocLink

getLink

public EbiDocLink getLink(EbiContext context,
                          EbiDocument linkDoc,
                          boolean isLinkParent)
                   throws EboUnrecoverableSystemException,
                          EboSecurityException
Gets the specified Document Link.
Parameters:
context - context
linkDoc - the Document that this Document is linked with
isLinkParent - if true, then this Document is assumed to be the Link-Parent, otherwise it is assumed to be the Link-Child
Returns:
the Link or null if not found
See Also:
EbiDocLink

removeLink

public boolean removeLink(EbiContext context,
                          EbiDocument linkDoc,
                          boolean isLinkParent)
                   throws EboUnrecoverableSystemException,
                          EboSecurityException,
                          EboItemExistenceException
Removes the specified Link.
Parameters:
context - context
linkDoc - the Document that this Document is linked to
isLinkParent - if true, then this Document is assumed to be the Link-Parent, otherwise it is assumed to be the Link-Child
Returns:
true if the Link is successfully removed, false if it's not found

updateLink

public boolean updateLink(EbiContext context,
                          EbiDocLink link)
                   throws EboUnrecoverableSystemException,
                          EboSecurityException,
                          EboItemExistenceException
Updates the specified Link. Note: the Link is only updated if this Document is actually a part of it, i.e. if it is either the Link-Parent or the Link-Child Document
Parameters:
context - context
link - the Link to update
Returns:
true if the link was successfully updated, false if this Document is neither the Link-Parent or the Link-Child for this Link

getLinkParents

public Collection getLinkParents(EbiContext context,
                                 boolean checkAccess)
                          throws EboUnrecoverableSystemException,
                                 EboSecurityException,
                                 EboItemExistenceException
Gets the list of Documents to which this Document is linked as a Link-Child.
Parameters:
context - context
checkAccess - if true, filter out the Documents in the resulting Collection that the user whose context is passed in has no access, otherwise return all the Link-Parent Documents
Returns:
a Collection of Link-Parent Document elements (EbiDocument's)

getLinkChildren

public Collection getLinkChildren(EbiContext context,
                                  boolean checkAccess)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException,
                                  EboItemExistenceException
Gets the list of Documents to which this Document is linked as a Link-Parent.
Parameters:
context - context
checkAccess - if true, filter out the Documents in the resulting Collection that the user whose context is passed in has no access, otherwise return all the Link-Child Documents
Returns:
a Collection of Link-Child Document elements (EbiDocument's)
See Also:
EbiDocLink

getLinks

public Collection getLinks(EbiContext context,
                           boolean isLinkParent)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException
Gets the list of Document Links that this Document is a part of.
Parameters:
context - context
isLinkParent - if true, then this Document is assumed to be the Link-Parent, otherwise it is assumed to be the Link-Child
Returns:
a Collection of EbiLink's
See Also:
EbiDocLink

getCategoryReferences

public Collection getCategoryReferences(EbiContext context,
                                        boolean checkAccess,
                                        boolean IDsOnly)
                                 throws EboUnrecoverableSystemException,
                                        EboSecurityException,
                                        EboItemExistenceException
Gets the list of Categories to which this Document belongs.
Parameters:
context - context
checkAccess - if true, filter out the Categories in the resulting Collection that the user whose context is passed in has no access, otherwise return all the Categories
IDsOnly - if true, a Collection of category IDs (String's) is returned, otherwise a Collection of EbiDocCategory's
Returns:
the list of Categories to which this Document belongs as a Collection of String IDs (if IDsOnly is true) or EbiDocCategory's (if IDsOnly is false)
See Also:
EbiDocCategory

isInCategory

public boolean isInCategory(EbiContext context,
                            EbiDocCategory category)
                     throws EboUnrecoverableSystemException,
                            EboSecurityException
Checks to see if the Document belongs to the specified Category.
Parameters:
context - context
category - Category
Returns:
true if the Document belongs to the specified Category, false otherwise
See Also:
EbiDocCategory

orphanChildren

public void orphanChildren(EbiContext context)
                    throws EboUnrecoverableSystemException,
                           EboSecurityException,
                           EboItemExistenceException
Removes associations of this Document with any of its Child Documents.
Parameters:
context - context

unlinkAll

public void unlinkAll(EbiContext context,
                      boolean isLinkParent,
                      boolean doCheckOuts)
               throws EboUnrecoverableSystemException,
                      EboSecurityException,
                      EboItemExistenceException
Removes any links that this Document is involved in.
Parameters:
context - context
isLinkParent - if true, treat this Document as a Link-Parent, otherwise as Link-Child, in other words, if true, remove all the links where this Document acts as a Link-Parent, otherwise all the links where it acts as a Link-Child
doCheckOuts - if true, the method will do all the proper checkouts of the Document itself and Link-Parents or Link-Children, and will release all the locks after the operation is done

findSimilar

public Collection findSimilar(EbiContext context,
                              boolean checkAccess)
                       throws EboUnrecoverableSystemException,
                              EboSecurityException
Finds all the documents that are similar to this one, in the Repository that this document resides.
Parameters:
context - context
checkAccess - if true, perform the security filtering of query results
Returns:
a Collection of com.sssw.cm.api.EbiQueryResult's
See Also:
EbiQueryResult

Novell exteNd
Director 5.2 API