|
Clearspace API (2.0.15) 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. |
WSDocument |
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. |
WSDocument |
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. |
java.util.List<WSApprovalStatus> |
getApprovalStatusForDocument(long documentID)
Returns a collection of WSApprovalStatus 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. |
java.util.List<WSAttachment> |
getAttachmentsByDocumentID(java.lang.String documentID)
Acquire the attachments for a document by the document id. |
java.util.List<WSAttachment> |
getAttachmentsByInternalDocID(long internalDocID)
Acquire the attachments for a document by the internal document id. |
java.util.List<WSUser> |
getAuthors(long documentID)
Returns the userss who are allowed to edit the document. |
WSBinaryBody |
getBinaryDocumentContent(java.lang.String documentID)
Returns the content of the binary document. |
java.util.List<WSUser> |
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. |
java.util.List<WSUser> |
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. |
WSDocument |
getDocumentByDocumentID(java.lang.String documentID)
Returns a document from the community based on its document ID. |
WSDocument |
getDocumentByDocumentIDAndVersion(java.lang.String documentID,
int version)
Returns the revision of the document with the specified docID and version number. |
WSDocument |
getDocumentByInternalDocID(long internalDocID)
Returns the document with the specified docID. |
WSDocument |
getDocumentByInternalDocIDAndVersion(long internalDocID,
int version)
Returns the revision of document with the specified docID and version number. |
java.util.List<WSProperty> |
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. |
java.util.List<WSDocument> |
getDocumentsByCommunity(long communityID)
Returns all of the documents for the specified community. |
java.util.List<WSDocument> |
getDocumentsByCommunityAndFilter(long communityID,
WSDocumentResultFilter 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. |
java.util.List<WSDocument> |
getPopularDocuments()
Returns the top x documents across all communities according to ratings, document views and time passed since the document was created. |
java.util.List<WSDocument> |
getPopularDocumentsByCommunity(long communityID)
Returns the top x documents in the given community according to ratings, document views & time passed since the document was created. |
java.util.List<WSDocument> |
getPopularDocumentsByLanguage(java.util.List<java.lang.String> languages)
Returns the top x documents across all communities according to ratings, document views and time passed since the document was created in the languages specified. |
java.util.List<WSDocument> |
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. |
WSDocument |
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 enableComments)
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 enableTrackbacks)
Enables or disables the trackbacks feature system wide. |
void |
updateDocument(WSDocument document)
|
| Method Detail |
|---|
WSDocument createDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
throws DuplicateIDException,
DocumentObjectNotFoundException,
UserNotFoundException,
CommunityNotFoundException,
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
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.
DocumentObjectNotFoundException
DocumentAlreadyExistsException
WSDocument publishDocument(long communityID,
long userID,
long documentTypeID,
java.lang.String documentID,
java.lang.String title,
java.lang.String body)
throws DuplicateIDException,
DocumentObjectNotFoundException,
UserNotFoundException,
CommunityNotFoundException,
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
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.
DocumentObjectNotFoundException
DocumentAlreadyExistsException
void updateDocument(WSDocument document)
throws UserNotFoundException,
DocumentObjectNotFoundException,
DocumentAlreadyExistsException
UserNotFoundException
DocumentObjectNotFoundException
DocumentAlreadyExistsException
WSDocument 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,
DocumentObjectNotFoundException,
DuplicateIDException,
BinaryBodyException,
java.io.IOException,
CommunityNotFoundException,
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.
DocumentObjectNotFoundException
DuplicateIDException
BinaryBodyException
DocumentAlreadyExistsException
WSBinaryBody getBinaryDocumentContent(java.lang.String documentID)
throws DocumentObjectNotFoundException
documentID - The id of the document.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the document does not exist.
DocumentObjectNotFoundExceptionjava.util.List<WSDocument> getPopularDocuments()
java.util.List<WSDocument> 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
java.util.List<WSDocument> getDocumentsByCommunityAndFilter(long communityID,
WSDocumentResultFilter filter)
throws CommunityNotFoundException
communityID - The community to fetch documents forfilter - The filter to apply to the results
CommunityNotFoundExceptioncom.jivesoftware.community.action.RecentDocumentsAction
java.util.List<WSDocument> getDocumentsByCommunity(long communityID)
throws CommunityNotFoundException
communityID - The id of the community.
CommunityNotFoundException - Thrown if the specified community does not exist.java.util.List<WSDocument> getPopularDocumentsByLanguage(java.util.List<java.lang.String> languages)
languages - a list of ISO-639 language codes to restrict returned documents to.
java.util.List<WSDocument> 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,
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.
DocumentObjectNotFoundException
void deleteDocument(long documentID)
throws DocumentObjectNotFoundException
com.jivesoftware.community.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.
DocumentObjectNotFoundExceptionboolean isCommentsEnabled()
void setCommentsEnabled(boolean enableComments)
enableComments - true to enableComments the comments feature, false to disable
UnauthorizedException - if not a system administratorboolean isTrackbacksEnabled()
void setTrackbacksEnabled(boolean enableTrackbacks)
enableTrackbacks - true to enableTrackbacks the trackback feature, false to disable
UnauthorizedException - if not a system administrator
WSDocument getDocumentByInternalDocID(long internalDocID)
throws DocumentObjectNotFoundException
internalDocID - the long doc ID of the document
DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
WSDocument getDocumentByInternalDocIDAndVersion(long internalDocID,
int version)
throws DocumentObjectNotFoundException
internalDocID - the long doc ID of the documentversion - the version number of the document
DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
WSDocument getDocumentByDocumentID(java.lang.String documentID)
throws DocumentObjectNotFoundException
documentID - the document ID of the document to retrieve.
DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
WSDocument getDocumentByDocumentIDAndVersion(java.lang.String documentID,
int version)
throws DocumentObjectNotFoundException
documentID - the document ID of the document to retrieve.version - the version number of the document.
DocumentObjectNotFoundException - if no document with the specified ID can be found
UnauthorizedException - if the user doesn't have permissions to view the document.
java.util.List<WSApprovalStatus> getApprovalStatusForDocument(long documentID)
throws DocumentObjectNotFoundException
WSApprovalStatus objects. The WSApprovalStatus objects contain show which
user has approved the Document and which hasn't.
documentID - Thrown if the specified document does not exist.
WSApprovalStatus documents.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not
exist.
DocumentObjectNotFoundExceptionWSApprovalStatus
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.
java.util.List<WSUser> 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.
java.util.List<WSUser> getDocumentApproversOnCommunity(long communityID)
throws CommunityNotFoundException
communityID - The id of the community.
CommunityNotFoundException - Thrown if the specified community does not exist.
java.util.List<WSUser> getAuthors(long documentID)
throws DocumentObjectNotFoundException
documentID - Thrown if the specified document does not exist.
com.jivesoftware.community.DocumentObjectNotFoundException - If the specified document does not exist.
DocumentObjectNotFoundException
void addAuthor(long documentID,
long userID)
throws 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.
DocumentObjectNotFoundException
void removeAuthor(long documentID,
long userID)
throws UserNotFoundException,
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.
DocumentObjectNotFoundException
java.util.List<WSProperty> getDocumentProperties(long documentID)
throws DocumentObjectNotFoundException
documentID - The ID of the document to retrieve properties for.
com.jivesoftware.community.DocumentObjectNotFoundException - Thrown if the specified document does not
exist.
DocumentObjectNotFoundException
java.lang.String getDocumentProperty(java.lang.String name,
long documentID)
throws 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.
DocumentObjectNotFoundException
void setDocumentProperty(java.lang.String name,
java.lang.String value,
long documentID)
throws 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.
DocumentObjectNotFoundException
void deleteDocumentProperty(java.lang.String name,
long documentID)
throws 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.
DocumentObjectNotFoundException
java.util.List<WSAttachment> getAttachmentsByDocumentID(java.lang.String documentID)
throws DocumentObjectNotFoundException
documentID - The id of the document.
DocumentObjectNotFoundException - If the document specified does not exist.
java.util.List<WSAttachment> getAttachmentsByInternalDocID(long internalDocID)
throws com.jivesoftware.community.DocumentObjectNotFoundException
internalDocID - The internal id of the document.
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 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.
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 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.
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 DocumentObjectNotFoundException
documentID - The id of the document.
DocumentObjectNotFoundException - Thrown if the specified document does not exist.
int getAttachmentCountByInternalDocID(long internalDocID)
throws DocumentObjectNotFoundException
internalDocID - The id of the document.
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 DocumentObjectNotFoundException,
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.
DocumentObjectNotFoundException - Thrown if the specified document does not exist.
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 DocumentObjectNotFoundException,
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.
DocumentObjectNotFoundException - Thrown if the specified document does not exist.
ImageException - Thrown if there is a problem adding the image.
int getImageCountByDocumentID(java.lang.String documentID)
throws DocumentObjectNotFoundException
documentID - The id of the document.
DocumentObjectNotFoundException - Thrown if the specified document does not exist.
int getImageCountByInternalDocID(long internalDocID)
throws DocumentObjectNotFoundException
internalDocID - The id of the document.
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 | |||||||||