A Document encapsulates a document in the 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 are versioned. The only changes that will trigger a new version of
a document to be created are changes to the following: author, language, title, body (text or
binary), document fields, attachments or images.
Type Template
<...>
<ID>xs:long</ID>
<objectType>xs:int</objectType>
<anonymous>xs:boolean</anonymous>
<approvalEnabled>xs:boolean</approvalEnabled>
<attachmentCount>xs:int</attachmentCount>
<authorCount>xs:int</authorCount>
<body>xs:string</body>
<commentStatus>xs:int</commentStatus>
<containerID>xs:long</containerID>
<containerType>xs:int</containerType>
<creationDate>xs:dateTime</creationDate>
<documentID>xs:string</documentID>
<documentState>xs:string</documentState>
<documentTypeID>xs:long</documentTypeID>
<documentVersion>
<!-- Contents of DocumentVersion -->
<documentVersion>
<expirationDate>xs:dateTime</expirationDate>
<imageCount>xs:int</imageCount>
<language>xs:string</language>
<modificationDate>xs:dateTime</modificationDate>
<!-- List of ... -->
<properties>
<!-- Contents of Property -->
<properties>
<subject>xs:string</subject>
<textBody>xs:boolean</textBody>
<trackbacksEnabled>xs:boolean</trackbacksEnabled>
<unfilteredSubject>xs:string</unfilteredSubject>
<userID>xs:long</userID>
<viewCount>xs:int</viewCount>
<...>Note: Element descriptions are split into information that's
relevant when you're creating an instance of this type and information
relevant when you're receiving an instance of it. Occasionally these
will differ.
Elements
| Element |
Description |
| anonymous
|
- Setting
- Getting
|
| approvalEnabled
|
- Setting
- Sets approval enabled or disabled.
- Getting
- Returns true if approval is enabled; false if it's not.
|
| attachmentCount
|
- Setting
- Sets the number of attachments on the document.
- Getting
- Returns the number of attachments on the document.
|
| authorCount
|
- Setting
- Sets the number of authors who have been added to this document. Pass 0 to specify
that anyone with appropriate permissions can edit it.
- Getting
- Returns the number of authors who have been added to this document. If 0, anyone with
the appropriate permissions can edit the document.
|
| body
|
- Setting
- Sets the textual body of the document.
- Getting
|
| commentStatus
|
- Setting
-
Sets the document's comment status.
-
1 (COMMENTS_NONE)
-- no comments allowed
-
2 (COMMENTS_OPEN)
-- comments are permitted
-
3 (COMMENTS_CLOSED)
-- comments were permitted but are not allowed now
Defaults to
2 (COMMENTS_OPEN)
.
- Getting
-
Returns the comment status of this document. The status may be any one of the following:
-
1 (COMMENTS_NONE)
-- no comments allowed
-
2 (COMMENTS_OPEN)
-- comments are permitted
-
3 (COMMENTS_CLOSED)
-- comments were permitted but are not allowed now
Defaults to
2 (COMMENTS_OPEN)
.
|
| containerID
|
- Setting
- Sets the ID for this document's container.
- Getting
- Returns the ID of this document's container.
|
| containerType
|
- Setting
- Sets the type for this document's container.
- Getting
- Returns the type for the container of this document.
|
| creationDate
|
- Setting
- Sets the date the document was created.
- Getting
-
Returns the date the document was originally created. For the creation date of a particular version
of a document, use
instead.
|
| documentID
|
- Setting
- Sets the document's ID. A document ID is a way to reference a document using a
company specific naming scheme such as ASE-2004-CE. Document IDs 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 a document's; this will likely break bookmarked URLs.
- Getting
- Returns the document's ID. A document ID is a way to reference a document using a company-specific naming scheme
such as ASE-2004-CE. Document IDs must be unique within the system.
|
| documentState
|
- Setting
-
Sets the state of the document. If no document state was specified when the document was
created, the default document state of
PENDING_APPROVAL
will be
assigned.
Possible state values include:
-
PENDING_APPROVAL
-
INCOMPLETE
-
REJECTED
-
PUBLISHED
-
ARCHIVED
-
DELETED
-
EXPIRED
- Getting
-
Returns the document's state. Possible state values include:
-
PENDING_APPROVAL
-
INCOMPLETE
-
REJECTED
-
PUBLISHED
-
ARCHIVED
-
DELETED
-
EXPIRED
|
| documentTypeID
|
- Setting
- Sets this document's type ID. If no document type is specified when a document is
created the default document type ID is assigned.
- Getting
- Returns this document's type ID. If no document type is specified when a document is
created the default document type ID is assigned.
|
| documentVersion
|
- Setting
- Sets a document version instance corresponding to the current document instance.
- Getting
- Returns a version instance corresponding to the current document.
|
| expirationDate
|
- Setting
- Sets the date on which the document should expire. By default the date is not set.
- Getting
- Returns the date on which the document is set to expire. This method will return null
if the expiry date is not set.
|
| ID
|
- Setting
- Set the unique id of this object.
- Getting
|
| imageCount
|
- Setting
- Sets the number of images in the document.
- Getting
- Returns the number of images the document has.
|
| language
|
- Setting
- Sets the ISO-639 code of the language associated with the document; null if no language was specified when the
document was created, implying that the global default language should be used.
- Getting
- Returns the ISO-639 code of the language associated with the document; null if the document
has no language specified (thus implying that it uses the global default language).
|
| modificationDate
|
- Setting
-
Sets the date the document was last modified. The date applies to the version
with a state of
PUBLISHED
;
if there is no version with that state, use the modification date of the document's
current instance.
When a document is first created, this date should be is identical to the
creation date.
- Getting
-
Returns the date the document was last modified as determined by
the version with a state of
PUBLISHED
;
if no version has that state, returns 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.
|
| objectType
|
- Setting
- Sets the object type of the jive object.
- Getting
|
| properties
|
- Setting
- Sets the list of extended properties for the document. Each document can have an
arbitrary number of extended properties. This allows for enhanced functionality that is not
part of the base interface. The list is alterable if caller is authorized to modify the
document. Null keys and values are not allowed.
- Getting
- Returns a list of the extended properties for the document. Each document can have an
arbitrary number of extended properties. This allows for enhanced functionality that is not
part of the base interface. The list is alterable if caller is authorized to modify the
document. Null keys and values are not allowed.
|
| subject
|
- Setting
- Sets the document's title.
- Getting
|
| textBody
|
- Setting
- Sets whether the document's body is text.
- Getting
- Returns true if the body of the document is text; false if it's binary.
|
| trackbacksEnabled
|
- Setting
- Sets trackbacks enabled or disabled.
- Getting
- Returns true if trackbacks are enabled.
|
| unfilteredSubject
|
- Setting
- Sets the document title, bypassing any active filters. Because filters often provide
security, this method should be used with caution. In particular, you should avoid showing
unfiltered data in an environment where embedded HTML might be interpreted.
Unfiltered content is necessary for a few reasons. One is when saving document content to
another persistence mechanism such as an XML format.
- Getting
- Returns the document title, bypassing any active filters. Because filters often provide
security, this method should be used with caution. In particular, you should avoid showing
unfiltered data in an environment where embedded HTML might be interpreted.
Unfiltered content is necessary for a few reasons. One is when saving document content to
another persistence mechanism such as an XML format.
|
| userID
|
- Setting
- Sets the user who authored the document.
- Getting
- Returns the user who authored the document; null if the document was created anonymously.
|
| viewCount
|
- Setting
- Sets the number of times this document has been viewed. -1 indicates
the number of views is unknown or that the feature is disabled.
- Getting
- Returns the number of times this document has been viewed. -1 indicates
the number of views is unknown or that the feature is disabled.
|