|
Clearspace API (1.10.14) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DocumentService
This service provides methods to load and manipulate documents, comments.
| Method Summary | |
|---|---|
void |
addAttachmentToDocumentByDocumentID(java.lang.String documentID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Add a new attachment to the document with the specified id. |
void |
addAttachmentToDocumentByInternalDocID(long internalDocID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Add a new attachment to the document with the specified internal id. |
void |
addAuthor(long documentID,
long userID)
Adds the user with the supplied id as an author of this document of the specified document. |
void |
addDocumentApproverOnCommunity(long communityID,
long userID)
Add the user as a document approver for this entire community. |
void |
addDocumentApproverOnDocument(long documentID,
long userID)
Adds a user as a document approver for this document. |
void |
addImageToDocumentByDocumentID(java.lang.String documentID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Add a new image to the document with the specified id. |
void |
addImageToDocumentByInternalDocID(long internalDocID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
Add a new image to the document with the specified internal id. |
Document |
createBinaryDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String filename,
java.lang.String contentType,
byte[] data)
Creates a new binary document. |
Document |
createDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
Create a new document. |
void |
deleteDocument(long documentID)
Deletes a document. |
void |
deleteDocumentProperty(java.lang.String name,
long documentID)
Delete a property with the given name from the document with the given ID. |
ApprovalStatus[] |
getApprovalStatusForDocument(long documentID)
Returns a collection of ApprovalStatus objects. |
int |
getAttachmentCountByDocumentID(java.lang.String documentID)
Returns the number of attachments on the document with the specified id. |
int |
getAttachmentCountByInternalDocID(long internalDocID)
Returns the number of attachments on the document with the specified internal id. |
Attachment[] |
getAttachmentsByDocumentID(java.lang.String documentID)
Acquire the attachments for a document by the document id. |
Attachment[] |
getAttachmentsByInternalDocID(long internalDocID)
Acquire the attachments for a document by the internal document id. |
User[] |
getAuthors(long documentID)
Returns the userss who are allowed to edit the document. |
BinaryBody |
getBinaryDocumentContent(java.lang.String documentID)
Returns the content of the binary document. |
User[] |
getDocumentApproversOnCommunity(long communityID)
Returns all of the users that must approve new documents before they reach a PUBLISHED state when it is in a PENDING_APPROVAL state. |
User[] |
getDocumentApproversOnDocument(long documentID)
Returns all of the users that must approve new documents before they reach a PUBLISHED state when it is in a PENDING_APPROVAL state. |
Document |
getDocumentByDocumentID(java.lang.String documentID)
Returns a document from the community based on its document ID. |
Document |
getDocumentByDocumentIDAndVersion(java.lang.String documentID,
int version)
Returns the revision of the document with the specified docID and version number. |
Document |
getDocumentByInternalDocID(long internalDocID)
Returns the document with the specified docID. |
Document |
getDocumentByInternalDocIDAndVersion(long internalDocID,
int version)
Returns the revision of document with the specified docID and version number. |
Property[] |
getDocumentProperties(long documentID)
Returns all tbe extended properties for the message with the specified ID. |
java.lang.String |
getDocumentProperty(java.lang.String name,
long documentID)
Returns a specific extended property for the document with the specified property name and document ID. |
Document[] |
getDocumentsByCommunity(long communityID)
Returns all of the documents for the specified community. |
Document[] |
getDocumentsByCommunityAndFilter(long communityID,
DocumentResultFilter filter)
Returns all of the documents in the given community after the specified filter has been applied. |
int |
getImageCountByDocumentID(java.lang.String documentID)
Returns the number of images on the document with the specified id. |
int |
getImageCountByInternalDocID(long internalDocID)
Returns the number of images on the document with the specified internal id. |
Document[] |
getPopularDocuments()
Returns the top x documents across all communities according to ratings, document views & time passed since the document was created. |
Document[] |
getPopularDocumentsByCommunity(long communityID)
Returns the top x documents in the given community according to ratings, document views & time passed since the document was created. |
Document[] |
getPopularDocumentsByLanguage(java.lang.String[] languages)
Returns the top x documents across all communities according to ratings, document views & time passed since the document was created in the languages specified. |
long |
getUploadedDocBodyId(long internalDocID)
Returns the bodyID of the uploaded document |
java.lang.String |
getUploadedDocName(long internalDocID)
Returns the name of the uploaded document |
Document[] |
getUserApprovalDocuments(long userID)
Returns a list of documents that a user needs to approve. |
boolean |
isCommentsEnabled()
Returns true if the comments feature is turned on. |
boolean |
isTrackbacksEnabled()
Returns true if the trackbacks feature is turned on. |
void |
moveDocument(long documentID,
long communityID)
Moves a document from it's current community to another. |
Document |
publishBinaryDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String filename,
java.lang.String contentType,
byte[] data)
Publish a new binary document. |
Document |
publishDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
Publish a new document. |
void |
removeAuthor(long documentID,
long userID)
Removes the user with the supplied id as an author of this document. |
void |
setCommentsEnabled(boolean enable)
Enables or disables the comments feature system wide. |
void |
setDocumentProperty(java.lang.String name,
java.lang.String value,
long documentID)
Set an extended for the property with the given document id. |
void |
setTrackbacksEnabled(boolean enable)
Enables or disables the trackbacks feature system wide. |
void |
updateDocument(Document document)
|
| Method Detail |
|---|
Document createDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
throws com.jivesoftware.community.DuplicateIDException,
com.jivesoftware.community.DocumentObjectNotFoundException,
UserNotFoundException,
CommunityNotFoundException,
com.jivesoftware.community.DocumentAlreadyExistsException,
RejectedException
communityID - The id of the community to create the document.userID - The id of the author of the new documentdocumentTypeID - the id of the document type of the new documentdocumentID - the document ID of the new documenttitle - the title of the new documentbody - the body of the new document @return the new document
com.jivesoftware.community.DuplicateIDException - if the documentID provided is the same as an already existing
document
UserNotFoundException - If the id of the specified user does not
exist.
com.jivesoftware.community.DocumentObjectNotFoundException - If the id of the specified
document does not exist.
CommunityNotFoundException - Thrown if the specified community
does not exist.
com.jivesoftware.community.DocumentAlreadyExistsException - Thrown if the document with that documentID already already exists.
RejectedException - Thrown if the document can not
be added for some unknown reason.
Document publishDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
throws com.jivesoftware.community.DuplicateIDException,
com.jivesoftware.community.DocumentObjectNotFoundException,
UserNotFoundException,
CommunityNotFoundException,
com.jivesoftware.community.DocumentAlreadyExistsException,
RejectedException
communityID - The id of the community to create the document.userID - The id of the author of the new documentdocumentTypeID - the id of the document type of the new documentdocumentID - the document ID of the new documenttitle - the title of the new documentbody - the body of the new document @return the new document
com.jivesoftware.community.DuplicateIDException - if the documentID provided is the same as an already existing
document
UserNotFoundException - If the id of the specified user does not
exist.
com.jivesoftware.community.DocumentObjectNotFoundException - If the id of the specified
document does not exist.
CommunityNotFoundException - Thrown if the specified community
does not exist.
com.jivesoftware.community.DocumentAlreadyExistsException - Thrown if the document with that documentID already already exists.
RejectedException - Thrown if the document can not
be added for some unknown reason.
void updateDocument(Document document)
throws UserNotFoundException,
com.jivesoftware.community.DocumentObjectNotFoundException,
com.jivesoftware.community.DocumentAlreadyExistsException,
com.jivesoftware.community.InvalidLanguageException
UserNotFoundException
com.jivesoftware.community.DocumentObjectNotFoundException
com.jivesoftware.community.DocumentAlreadyExistsException
com.jivesoftware.community.InvalidLanguageException
Document createBinaryDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String filename,
java.lang.String contentType,
byte[] data)
throws UserNotFoundException,
com.jivesoftware.community.DocumentObjectNotFoundException,
com.jivesoftware.community.DuplicateIDException,
com.jivesoftware.community.BinaryBodyException,
java.io.IOException,
CommunityNotFoundException,
com.jivesoftware.community.DocumentAlreadyExistsException,
RejectedException
communityID - The id of the community to create the document in.userID - The id of the author of the new documentdocumentTypeID - the id of the document type of the new documentdocumentID - the document ID of the new documenttitle - The title of the documentfilename - The name of the file.contentType - The file's mime content type.data - @throws java.io.IOException Thrown if there is problems reading the datasouce
com.jivesoftware.community.DuplicateIDException - Thrown if the document id already
exists.
UserNotFoundException - Thrown if the user is not found.
com.jivesoftware.community.BinaryBodyException - thrown if the document does not have a
binary body.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the document
type does not exist.
CommunityNotFoundException - Thrown if the specified community
does not exist.
com.jivesoftware.community.DocumentAlreadyExistsException - Thrown if the document with that documentID already already exists.
RejectedException - Thrown if the document can not
be added for some unknown reason.
java.io.IOException - Thrown if their are issues reading the binary document.
Document publishBinaryDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String filename,
java.lang.String contentType,
byte[] data)
throws UserNotFoundException,
com.jivesoftware.community.DocumentObjectNotFoundException,
com.jivesoftware.community.DuplicateIDException,
com.jivesoftware.community.BinaryBodyException,
java.io.IOException,
CommunityNotFoundException,
com.jivesoftware.community.DocumentAlreadyExistsException,
RejectedException
communityID - The id of the community to create the document in.userID - The id of the author of the new documentdocumentTypeID - the id of the document type of the new documentdocumentID - the document ID of the new documenttitle - The title of the documentfilename - The name of the file.contentType - The file's mime content type.data - @throws java.io.IOException Thrown if there is problems reading the datasouce
com.jivesoftware.community.DuplicateIDException - Thrown if the document id already
exists.
UserNotFoundException - Thrown if the user is not found.
com.jivesoftware.community.BinaryBodyException - thrown if the document does not have a
binary body.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the document
type does not exist.
CommunityNotFoundException - Thrown if the specified community
does not exist.
com.jivesoftware.community.DocumentAlreadyExistsException - Thrown if the document with that documentID already already exists.
RejectedException - Thrown if the document can not
be added for some unknown reason.
java.io.IOException - Thrown if their are issues reading the binary document.
BinaryBody getBinaryDocumentContent(java.lang.String documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the document
does not exist.Document[] getPopularDocuments()
Top x of ((document views) * (document mean rating+2)) * 1/(1 + number of days since creation date)
The number of documents to return is determined by the property "popularDocuments.number", defaulting to 5 if the property is not specified. Popular documents are only calculated once every 15 minutes.
Document[] getPopularDocumentsByCommunity(long communityID)
throws CommunityNotFoundException
Top x of ((document views) * (document mean rating+2)) * 1/(1 + number of days since creation date)
The number of documents to return is determined by the property "popularDocuments.number", defaulting to 5 if the property is not specified. Popular documents are only calculated once every 15 minutes.
communityID - The community to fetch documents for
CommunityNotFoundException
Document[] getDocumentsByCommunityAndFilter(long communityID,
DocumentResultFilter filter)
throws CommunityNotFoundException
communityID - The community to fetch documents forfilter - The filter to apply to the results
CommunityNotFoundExceptioncom.jivesoftware.community.action.RecentDocumentsAction
Document[] getDocumentsByCommunity(long communityID)
throws CommunityNotFoundException
communityID - The id of the community.
CommunityNotFoundException - Thrown if the specified community does not exist.Document[] getPopularDocumentsByLanguage(java.lang.String[] languages)
languages - a list of ISO-639 language codes to restrict returned documents to.
Document[] getUserApprovalDocuments(long userID)
throws UserNotFoundException
userID - The user to acquire the documents for.
UserNotFoundException - Thrown if the id of the user specified is
not found.
void moveDocument(long documentID,
long communityID)
throws UnauthorizedException,
com.jivesoftware.community.DocumentObjectNotFoundException,
CommunityNotFoundException
documentID - the id of the document to move.communityID - the id of the community to move the document to.
UnauthorizedException - if user does not have administrator
permissions for the document's current community.
CommunityNotFoundException - Thrown if the specified
community does not exist.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.
void deleteDocument(long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
Document.getVersionManager()
documentID - the id of the document to delete.
UnauthorizedException - if user does not have administrator permissions for the
community.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.boolean isCommentsEnabled()
void setCommentsEnabled(boolean enable)
enable - true to enable the comments feature, false to disable
UnauthorizedException - if not a system administratorboolean isTrackbacksEnabled()
void setTrackbacksEnabled(boolean enable)
enable - true to enable the trackback feature, false to disable
UnauthorizedException - if not a system administrator
Document getDocumentByInternalDocID(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - the long doc ID of the document
com.jivesoftware.community.DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
Document getDocumentByInternalDocIDAndVersion(long internalDocID,
int version)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - the long doc ID of the documentversion - the version number of the document
com.jivesoftware.community.DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
Document getDocumentByDocumentID(java.lang.String documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - the document ID of the document to retrieve.
com.jivesoftware.community.DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
Document getDocumentByDocumentIDAndVersion(java.lang.String documentID,
int version)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - the document ID of the document to retrieve.version - the version number of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
ApprovalStatus[] getApprovalStatusForDocument(long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
ApprovalStatus objects. The ApprovalStatus objects
contain show which user has approved the Document and which hasn't.
documentID - Thrown if the specified document does not exist.
ApprovalStatus documents.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.ApprovalStatus
void addDocumentApproverOnDocument(long documentID,
long userID)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
UserNotFoundException
documentID - The id of the document.userID - The user to add as a document approver
UserNotFoundException - Throws an exception if the user does not
exist.
com.jivesoftware.community.DocumentObjectNotFoundException - Throws an exception if the
document specified does not exist.
void addDocumentApproverOnCommunity(long communityID,
long userID)
throws CommunityNotFoundException,
UserNotFoundException
communityID - The id of the community.userID - The id of the user to add as a document approver.
CommunityNotFoundException - Thrown if the specified
community does not exist.
UserNotFoundException - Thrown if the specified user does not
exist.
User[] getDocumentApproversOnDocument(long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the id of the
document does not exist.
User[] getDocumentApproversOnCommunity(long communityID)
throws CommunityNotFoundException
communityID - The id of the community.
CommunityNotFoundException - Thrown if the specified
community does not exist.
User[] getAuthors(long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - Thrown if the specified document does not exist.
com.jivesoftware.community.DocumentObjectNotFoundException - If the specified document
does not exist.
void addAuthor(long documentID,
long userID)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
UserNotFoundException
userID - the id of the user to add as an author.documentID - the document to add a user too.
UserNotFoundException - Thrown if the specified user does not
exist.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.
void removeAuthor(long documentID,
long userID)
throws UserNotFoundException,
com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document to remove the user as an author from.userID - The id of the user to remove as a document author.
UserNotFoundException - Thrown if the user with the specified id
does not exist.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the document
with the specified id does not exist.
Property[] getDocumentProperties(long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The ID of the document to retrieve properties for.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.
java.lang.String getDocumentProperty(java.lang.String name,
long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
name - The name of the property.documentID - The ID of the document to retrieve the property for.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
document does not exist.
void setDocumentProperty(java.lang.String name,
java.lang.String value,
long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
name - The name of the property.value - The value of the property.documentID - The ID of the document to set an extended property for.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
message does not exist.
void deleteDocumentProperty(java.lang.String name,
long documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
name - The name of the property to delete.documentID - The ID of the message to delete the property from.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified
message does not exist.
Attachment[] getAttachmentsByDocumentID(java.lang.String documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - If the document specified does not exist.
Attachment[] getAttachmentsByInternalDocID(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The internal id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - If the document specified does not exist.
void addAttachmentToDocumentByDocumentID(java.lang.String documentID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
AttachmentException
documentID - The id of the document.name - The name of the file that is being added as an attachment.contentType - The mime type of the file.source - The file content.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
AttachmentException - Thrown if there is a problem adding the attachment.
void addAttachmentToDocumentByInternalDocID(long internalDocID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
AttachmentException
internalDocID - The id of the document.name - The name of the file that is being added as an attachment.contentType - The mime type of the file.source - The file content.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
AttachmentException - Thrown if there is a problem adding the attachment.
int getAttachmentCountByDocumentID(java.lang.String documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
int getAttachmentCountByInternalDocID(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
void addImageToDocumentByDocumentID(java.lang.String documentID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
com.jivesoftware.community.ImageException
documentID - The id of the document.name - The name of the image that is being added.contentType - The mime type of the image.source - The image content.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
com.jivesoftware.community.ImageException - Thrown if there is a problem adding the image.
void addImageToDocumentByInternalDocID(long internalDocID,
java.lang.String name,
java.lang.String contentType,
byte[] source)
throws com.jivesoftware.community.DocumentObjectNotFoundException,
com.jivesoftware.community.ImageException
internalDocID - The internal id of the document.name - The name of the image that is being added.contentType - The mime type of the image.source - The image content.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
com.jivesoftware.community.ImageException - Thrown if there is a problem adding the image.
int getImageCountByDocumentID(java.lang.String documentID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
int getImageCountByInternalDocID(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
java.lang.String getUploadedDocName(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
long getUploadedDocBodyId(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not exist.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||