|
Clearspace API (1.10.16) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.webservices.JiveObject
com.jivesoftware.community.webservices.Document
public class Document
A Document object encapsulates a document in the Clearspace system. Each document can belong to one or more communities and consists of document fields, attachments, images, comments, ratings, relationships and properties. The main content of a document is held within the document body(text or binary) and document fields.
The body of a Document object can either be textual or binary but not both. Having the body of a document be a binary object such as a pdf can be useful in a lot of situations especially if the document was created as part of an import process.
Not all aspects of a document is versioned. The only changes that will trigger a new version of a document to be created are changes to the follow: author, language, title, body (text or binary), document fields, attachments or images.
To get an instance of this class use the
DocumentManager.getDocument(String) method.
| Field Summary | |
|---|---|
static int |
COMMENTS_CLOSED
Comment status for documents that may have allowed comments in the past but presently do not accept comments. |
static int |
COMMENTS_NONE
Comment status for documents that do not accept comments. |
static int |
COMMENTS_OPEN
Comment status for documents that do accept comments. |
| Fields inherited from class com.jivesoftware.community.webservices.JiveObject |
|---|
id, objectType |
| Constructor Summary | |
|---|---|
Document()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
int |
getAttachmentCount()
|
int |
getAuthorCount()
Returns the count of authors which have been added to this document. |
java.lang.String |
getBody()
Returns the textual body of the document. |
int |
getCommentStatus()
Returns the comment status of this document. |
long |
getCommunityID()
|
java.util.Date |
getCreationDate()
A convenience method which returns the date the document was originally created. |
java.lang.String |
getDocumentID()
Returns the document ID corresponding to the document. |
long |
getDocumentTypeID()
Return the type of the document. |
java.util.Date |
getExpirationDate()
Returns the date that the document is set to expire on. |
int |
getImageCount()
Returns the number of images the document has. |
java.lang.String |
getLanguage()
Return the ISO-639 code of the language associated with the document, or null if the document has no language specified (thus implying that it uses the global default language). |
java.util.Date |
getModificationDate()
A convenience method which returns the date the document was last modified as determined by the version with a DocumentState.PUBLISHED state, or if no version has that state
the modification date of the current instance of the document. |
java.lang.String |
getSubject()
Returns the title of the document. |
java.lang.String |
getUnfilteredBody()
Returns the textual body of the document, bypassing any active filters. |
java.lang.String |
getUnfilteredSubject()
Returns the document title, bypassing any active filters. |
long |
getUserID()
Returns the user that authored the document. |
int |
getVersion()
|
int |
getViewCount()
|
int |
hashCode()
|
boolean |
isAnonymous()
|
boolean |
isApprovalEnabled()
|
boolean |
isTextBody()
Returns true if the body of the document is text, false if it's binary. |
boolean |
isTrackbacksEnabled()
|
void |
setAnonymous(boolean anonymous)
|
void |
setApprovalEnabled(boolean approvalEnabled)
|
void |
setAttachmentCount(int attachmentCount)
|
void |
setAuthorCount(int authorCount)
|
void |
setBody(java.lang.String body)
|
void |
setCommentStatus(int commentStatus)
|
void |
setCommunityID(long communityID)
|
void |
setCreationDate(java.util.Date creationDate)
|
void |
setDocumentID(java.lang.String documentID)
Sets the document ID corresponding to the document. |
void |
setDocumentTypeID(long documentTypeID)
|
void |
setExpirationDate(java.util.Date expirationDate)
Sets the date the document should expire on. |
void |
setImageCount(int imageCount)
|
void |
setLanguage(java.lang.String language)
Sets the language of the document. |
void |
setModificationDate(java.util.Date modificationDate)
|
void |
setSubject(java.lang.String subject)
Sets the title of the document. |
void |
setTextBody(boolean textBody)
|
void |
setTrackbacksEnabled(boolean trackbacksEnabled)
|
void |
setUnfilteredBody(java.lang.String unfilteredBody)
|
void |
setUnfilteredSubject(java.lang.String unfilteredSubject)
|
void |
setUserID(long userID)
Returns the user that authored the document. |
void |
setVersion(int version)
|
void |
setViewCount(int viewCount)
|
java.lang.String |
toString()
|
| Methods inherited from class com.jivesoftware.community.webservices.JiveObject |
|---|
getID, getObjectType, setID, setObjectType |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int COMMENTS_NONE
public static final int COMMENTS_OPEN
public static final int COMMENTS_CLOSED
| Constructor Detail |
|---|
public Document()
| Method Detail |
|---|
public boolean isAnonymous()
public void setAnonymous(boolean anonymous)
public java.lang.String getDocumentID()
A document ID is a way to reference a document using a company specific naming scheme such as ASE-2004-CE. Document ID's must be unique within the system.
public void setDocumentID(java.lang.String documentID)
A document ID is a way to reference a document using a company specific naming scheme such as ASE-2004-CE. Document ID's must be unique within the system and are required - if no document ID is provided the system will generate one.
NOTE: It is not recommended to change the document ID for a document since this will likely break bookmarked URL's
documentID - the document ID to associate with the document.public int getVersion()
public void setVersion(int version)
public long getCommunityID()
public void setCommunityID(long communityID)
public long getDocumentTypeID()
public void setDocumentTypeID(long documentTypeID)
public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
language - the IS0-639 language codepublic long getUserID()
public void setUserID(long userID)
userID - the id of the user to change the ownership of the document to.
UnauthorizedException - if the user does not have permission to modify the document.public int getAuthorCount()
public void setAuthorCount(int authorCount)
public java.util.Date getCreationDate()
DocumentVersion.getCreationDate() instead.
public void setCreationDate(java.util.Date creationDate)
public java.util.Date getExpirationDate()
public void setExpirationDate(java.util.Date expirationDate)
expirationDate - the date the document should expire on.public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject - the title of the document.public java.lang.String getUnfilteredSubject()
Unfiltered content is necessary for a few reasons. One is when saving document content to another persistence mechanism such as an XML format.
public void setUnfilteredSubject(java.lang.String unfilteredSubject)
public boolean isTextBody()
public void setTextBody(boolean textBody)
public java.lang.String getBody()
public void setBody(java.lang.String body)
public java.lang.String getUnfilteredBody()
Unfiltered content is necessary for a few reasons. One is when saving document content to another persistence mechanism such as an XML format.
public void setUnfilteredBody(java.lang.String unfilteredBody)
public int getAttachmentCount()
public void setAttachmentCount(int attachmentCount)
public int getImageCount()
public int getViewCount()
public void setImageCount(int imageCount)
public int getCommentStatus()
NONE -- no comments allowed
OPEN -- comments are permitted
CLOSED -- comments were permitted but are not allowed now
OPEN.
public void setCommentStatus(int commentStatus)
public boolean isTrackbacksEnabled()
public void setTrackbacksEnabled(boolean trackbacksEnabled)
public boolean isApprovalEnabled()
public void setApprovalEnabled(boolean approvalEnabled)
public java.util.Date getModificationDate()
DocumentState.PUBLISHED state, or if no version has that state
the modification date of the current instance of the document.When a document is first created, the date returned by this method is identical to the creation date.
public void setModificationDate(java.util.Date modificationDate)
public void setViewCount(int viewCount)
public boolean equals(java.lang.Object o)
equals in class JiveObjectpublic int hashCode()
hashCode in class JiveObjectpublic java.lang.String toString()
toString in class JiveObject
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||