|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DocumentVersion
Information about a document's version is stored and retrieved using this interface. Document versions consist of a version number unique to a document but not unique in the system, the author of the version, it's creation and last modification date and comments on the version.
| Method Summary | |
|---|---|
VersionComment |
createVersionComment(User author,
String comment)
Creates a new version comment. |
User |
getAuthor()
Returns the user that authored the document version. |
Date |
getCreationDate()
Returns the date the document version was created. |
Document |
getDocument()
Returns the Document object corresponding to this version. |
DocumentState |
getDocumentState()
Retrieve the document state for the version. |
Date |
getModificationDate()
Returns the date the document version was last modified. |
int |
getVersionCommentCount()
Returns the number of comments made on the document version. |
Iterable<VersionComment> |
getVersionComments()
Returns an iterator of VersionComment objects for all the comments made on the document version. |
int |
getVersionNumber()
Returns the version number of the version of the document. |
boolean |
isMinorVersion()
Returns true if the revision this instance represents is a minor version. |
void |
setAuthor(User author)
Returns the user that authored the document version. |
void |
setCreationDate(Date creationDate)
Sets the creation date of the document version. |
void |
setDocumentState(DocumentState state)
Sets the document state for the version. |
void |
setModificationDate(Date modificationDate)
Sets the date the document was last modified. |
| Method Detail |
|---|
int getVersionNumber()
Document getDocument()
User getAuthor()
void setAuthor(User author)
throws UnauthorizedException
author - the user to change the ownership of the document version to.
UnauthorizedException - if the user does not have permission to modify the document.Date getCreationDate()
void setCreationDate(Date creationDate)
throws UnauthorizedException
creationDate - the date the document version was created.
UnauthorizedException - if the user does not have administrator permissions.Date getModificationDate()
void setModificationDate(Date modificationDate)
throws UnauthorizedException
modificationDate - the date the document was modified.
UnauthorizedException - if the user does not have administrator permissions.DocumentState getDocumentState()
void setDocumentState(DocumentState state)
throws UnauthorizedException,
DocumentAlreadyExistsException
DocumentState.PUBLISHED
will cause any other version of the document in that state to be altered to have a state of
DocumentState.ARCHIVED.
Setting a document state of DocumentState.PUBLISHED may cause a
DocumentAlreadyExistsException to be thrown if the subject of the document is not
unique among the published documents in the community the document is contained within.
state - the new state of the document.
UnauthorizedException - if the user does not have permission to modify the document.
DocumentAlreadyExistsException - if the subject of the document is not unique in the communityint getVersionCommentCount()
Iterable<VersionComment> getVersionComments()
VersionComment createVersionComment(User author,
String comment)
throws UnauthorizedException
author - the comment authorcomment - the comment string.
UnauthorizedException - if not authorized to create comments.boolean isMinorVersion()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||