|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objects that implement this interface define the set of
parameters that are passed in to the
EbiContentManager.addDocument
method. The following are the
parameters that are mandatory for the successful creation of a new Document,
although certain defaults may be used (see below):
The following defaults are applied by the Content Management API if the values are not provided:
Other defaults are:
Example-1:
Example-2:EbiContentMgmtDelegate cmgr = com.sssw.cm.client.EboFactory.getDefaultContentMgmtDelegate(); EbiAddDocumentParams params = cmgr.createAddDocumentParams(); EbiDocType docType = cmgr.getDocumentTypeByName(context, "MovieReview"); params.setAuthor("jsmith"); params.setTitle("The Matrix"); params.setDocTypeID(docType.getDocTypeID()); params.setMimeType("text/xml"); params.setContent(byteArrayContent); params.setComment("Initial revision."); params.setPublishImmediately(true); cmgr.addDocument(context, params);
EbiContentMgmtDelegate contentMgr = com.sssw.cm.client.EboFactory.getDefaultContentMgmtDelegate(); EbiAddDocumentParams params = contentMgr.createAddDocumentParams(); String docFromXML = "C:\\tmp\\contentmgmt-document_4_0_sample.xml"; org.w3c.dom.Document docProps = EboXmlUtil.createDocument(new FileInputStream(docFromXML)); org.w3c.dom.Element elem = docProps.getDocumentElement(); params.fromXML(context, contentMgr, elem); EbiDocument document = contentMgr.addDocument(context, params);
EbiContentMgmtDelegate
Method Summary | |
void |
clear()
Clears out any information set into the object via the setter methods. |
void |
fromXML(EbiContext context,
EbiContentMgmtDelegate cmgr,
Node node)
Populates this object with values from an XML Node describing a CM Document per contentmgmt-document_4_0.dtd. |
void |
fromXML(EbiContext context,
EbiContentMgmtDelegate cmgr,
Node node,
EbiXmlDataOptions options)
Populates this object with values from an XML Node describing a CM Document. |
String |
getAbstract()
Gets the Document Abstract. |
Acl |
getAcl()
Gets the ACL set into the params object |
String |
getAuthor()
Gets the Author. |
String[] |
getCategoryIDs()
Gets the list of the Category IDs. |
boolean |
getCheckOut()
Gets the value of the 'check out' option. |
String |
getComment()
Gets the Comment parameter |
byte[] |
getContent()
Gets the Content, if any, that was set into the params object |
Timestamp |
getCreated()
Gets the Creation Date/Time |
String |
getDocID()
Gets the UUID of the Document. |
String |
getDocTypeID()
Gets the ID of the Document Type |
Timestamp |
getExpirationDate()
Gets the Expiration Date/Time. |
EbiDocExtnMeta |
getExtensionMetaData()
Gets the Extension Metadata Fields info, if set. |
String |
getFolderID()
Gets the ID of the Parent Folder |
EbiDocLayoutSet |
getLayoutSet()
Gets the Document Layout Set, if specified. |
String |
getLockedBy()
Gets the ID of the user to whom the newly added Document is to be checked out. |
String |
getMimeType()
Gets the MIME type of the Content, if any specified. |
String |
getName()
Gets the Name of the Document |
boolean |
getOverwrite()
Gets the 'overwrite' option. |
String |
getParentDocID()
Gets the ID of the Parent Document |
Timestamp |
getPublishDate()
Gets the Publish Date/Time. |
boolean |
getPublishImmediately()
Gets the value of the 'publish immediately' option. |
String |
getStatus()
Gets the Status from the params object. |
String |
getSubtitle()
Gets the Subtitle. |
String |
getTitle()
Gets the Title. |
Timestamp |
getUpdateTime()
Gets the Update Time. |
String |
getUpdateUser()
Gets the Update User. |
void |
populate(EbiContext context,
EbiDocument doc,
int docParts)
Populates this object with values from the specified Document. |
void |
setAbstract(String docAbstract)
Sets the Abstract. |
void |
setAcl(Acl acl)
Sets the Access Control List for the Document (optional). |
void |
setAuthor(String author)
Sets the Author. |
void |
setCategories(String[] categoryIDs)
Specifies the set of Categories, if any, to which the newly added Document will belong. |
void |
setCheckOut(boolean checkOut)
Sets the 'check out' option. |
void |
setComment(String comment)
Sets the Comment for the newly created Content, e.g. |
void |
setContent(byte[] content)
Specifies the Content of the Document (optional). |
void |
setCreated(Timestamp created)
Sets the Creation Date/Time |
void |
setDocID(String docID)
Sets the UUID for the Document. |
void |
setDocTypeID(String docTypeID)
Sets the Document Type ID. |
void |
setExpirationDate(Timestamp expirationDate)
Sets the Expiration Date, i.e. |
void |
setExtensionMetaData(EbiDocExtnMeta extnMetaData)
Sets the Extension Metadata Fields values for this Document. |
void |
setFolderID(String folderID)
Sets the Parent Folder ID. |
void |
setLayoutSet(EbiDocLayoutSet layoutSet)
Sets the Document Layout Set (optional). |
void |
setLockedBy(String lockedBy)
Sets the ID of the user to whom the newly added Document is to be checked out. |
void |
setMimeType(String mimeType)
Specifies the MIME type of the Document's contents. |
void |
setName(String name)
Sets the Document's name. |
void |
setOverwrite(boolean overwrite)
Sets the 'overwrite' option. |
void |
setParentDocID(String parentDocID)
Sets the Parent Document ID (optional). |
void |
setPublishDate(Timestamp publishDate)
Sets the Publish Date. |
void |
setPublishImmediately(boolean publishImmed)
Sets the 'publish immediately' option. |
void |
setStatus(String status)
Sets the Status (optional). |
void |
setSubtitle(String subtitle)
Sets the Subtitle. |
void |
setTitle(String title)
Sets the Title. |
void |
setUpdateTime(Timestamp updateTime)
Sets the update time for the newly added Document. |
void |
setUpdateUser(String userID)
Sets the update user for the newly added Document. |
Method Detail |
public void setDocID(String docID)
EbiAddDocumentParams
, a UUID is
generated for the new Document by the system.docID
- the UUID for the Documentpublic void setName(String name)
EbiAddDocumentParams
into
EbiContentManager.addDocument
name
- the name for the Document; must not contain
the '/' character due to the fact that it is used as the
separator in Directory Entry pathspublic void setDocTypeID(String docTypeID)
EbiAddDocumentParams
into
EbiContentManager.addDocument
docTypeID
- the Document Type IDpublic void setParentDocID(String parentDocID)
parentDocID
- the ID of the Parent Documentpublic void setUpdateTime(Timestamp updateTime)
updateTime
- the update time for the newly added Documentpublic void setUpdateUser(String userID)
userID
- the update user for the newly added Documentpublic void setFolderID(String folderID)
EbiAddDocumentParams
into
EbiContentManager.addDocument
folderID
- the Parent Folder IDpublic void setCategories(String[] categoryIDs)
categoryIDs
- the list of Category IDspublic void setAuthor(String author)
author
- the Authorpublic void setCreated(Timestamp created)
created
- the Creation Date/Timepublic void setTitle(String title)
title
- the Titlepublic void setSubtitle(String subtitle)
subtitle
- the Subtitlepublic void setAbstract(String docAbstract)
docAbstract
- the Abstractpublic void setPublishDate(Timestamp publishDate)
publishDate
- the Publish Date/Timepublic void setExpirationDate(Timestamp expirationDate)
expirationDate
- the Expiration Date/Timepublic void setLockedBy(String lockedBy)
lockedBy
- the user IDpublic void setExtensionMetaData(EbiDocExtnMeta extnMetaData)
extnMetaData
- the Extension Metadatapublic void setLayoutSet(EbiDocLayoutSet layoutSet)
layoutSet
- the Layout Setpublic void setStatus(String status)
status
- the Status of the Documentpublic void setMimeType(String mimeType)
mimeType
- the MIME type of the contentspublic void setContent(byte[] content)
content
- the Contentpublic void setComment(String comment)
comment
- the Commentpublic void setAcl(Acl acl)
acl
- the Access Control Listpublic void setPublishImmediately(boolean publishImmed)
publishImmed
- if true, the newly added Document is published
immediately, otherwise not publishedpublic void setCheckOut(boolean checkOut)
checkOut
- if true, check out the newly added Document to the user
whose context is passed in to the addDocument method, if false, don't
check outpublic void setOverwrite(boolean overwrite)
overwrite
- if true and a Document is found with the same name
as the one being added in the specified folder, then the existing
Document is overwritten with the new one; if false and already exists,
an exception is thrownpublic String getDocID()
public String getName()
public String getDocTypeID()
public String getParentDocID()
public String getFolderID()
public String[] getCategoryIDs()
public String getAuthor()
public Timestamp getCreated()
public String getTitle()
public String getSubtitle()
public String getAbstract()
public Timestamp getPublishDate()
public Timestamp getExpirationDate()
public String getLockedBy()
public EbiDocExtnMeta getExtensionMetaData()
public EbiDocLayoutSet getLayoutSet()
public String getStatus()
public Timestamp getUpdateTime()
public String getUpdateUser()
public String getMimeType()
public byte[] getContent()
public String getComment()
public Acl getAcl()
public boolean getPublishImmediately()
public boolean getCheckOut()
public boolean getOverwrite()
public void clear()
public void populate(EbiContext context, EbiDocument doc, int docParts) throws EboUnrecoverableSystemException, EboSecurityException, EboItemExistenceException
params.populate(context, doc, EbiDocument.DOC_PART_META | EbiDocument.DOC_PART_CONTENT);
context
- contextdoc
- the Document with valuesdocParts
- which parts to copy, use the EbiDocument.DOC_PART_xxxx
constantspublic void fromXML(EbiContext context, EbiContentMgmtDelegate cmgr, Node node) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextcmgr
- the Content Manager Delegatenode
- root-element node in the DOM tree for the XML document,
obtained by an earlier document.getDocumentElement() call.public void fromXML(EbiContext context, EbiContentMgmtDelegate cmgr, Node node, EbiXmlDataOptions options) throws EboUnrecoverableSystemException, EboSecurityException
context
- contextcmgr
- the Content Manager Delegatenode
- root-element node in the DOM tree for the XML document,
obtained by an earlier document.getDocumentElement() call.options
- options for extracting data from XML
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |