|
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 VersionManager
Manages document versions.
| Method Summary | |
|---|---|
DocumentVersion |
cloneDocumentVersion(int versionID)
Creates a new document version based on an existing document version. |
void |
deleteDocumentVersion(int versionID)
Delete a document version. |
DocumentVersion |
getDeletedDocumentVersion()
Convenience method which returns the deleted document version. |
DocumentVersion |
getDocumentVersion(int versionID)
Returns a specific document version for the document. |
int |
getDocumentVersionCount()
Returns the count of versions the document has. |
List<DocumentVersion> |
getDocumentVersions()
Returns a list of DocumentVersion objects for the document. |
DocumentVersion |
getNewestDocumentVersion()
Convenience method which returns the newest document version as determined by version number. |
DocumentVersion |
getPublishedDocumentVersion()
Convenience method which returns the published document version. |
boolean |
isVersionViewable(int versionID,
User viewer)
Returns true if the supplied User can view the version indicated by the supplied version
number. |
DocumentVersion |
restoreDocumentVersion(int versionID,
long versionAuthor)
Restores a document version by creating a copy of the version to restore as the newest document version and returning that document version. |
| Method Detail |
|---|
int getDocumentVersionCount()
List<DocumentVersion> getDocumentVersions()
DocumentVersion objects for the document. Versions will be returned
from highest version to lowest version which normally will correspond to newest version to
oldest version.
DocumentVersion getDocumentVersion(int versionID)
throws DocumentObjectNotFoundException
versionID - the version ID to return the document version for
DocumentObjectNotFoundException - if no version corresponding to the provided ID can be foundDocumentVersion getNewestDocumentVersion()
DocumentVersion getPublishedDocumentVersion()
DocumentVersion getDeletedDocumentVersion()
DocumentVersion restoreDocumentVersion(int versionID,
long versionAuthor)
throws DocumentObjectNotFoundException,
DocumentAlreadyExistsException,
UnauthorizedException
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.
versionID - the versionID of the document to restoreversionAuthor - the user id of the author of the newly created version.
DocumentObjectNotFoundException - if no version corresponding to the provided ID can be found
DocumentAlreadyExistsException - if the subject of the document is not unique in the community
UnauthorizedException - if the user does not have permission to modify the document.
DocumentVersion cloneDocumentVersion(int versionID)
throws DocumentObjectNotFoundException,
UnauthorizedException
DocumentState.INCOMPLETE.
versionID - the versionID of the document version to clone
DocumentObjectNotFoundException - if no version corresponding to the provided ID can be found
UnauthorizedException - if the user does not have permission to modify the document.
void deleteDocumentVersion(int versionID)
throws DocumentObjectNotFoundException,
UnauthorizedException
versionID - the versionID of the document version to delete
DocumentObjectNotFoundException - if no version corresponding to the provided ID can be found
UnauthorizedException - if the user does not have permission to modify the document.
boolean isVersionViewable(int versionID,
User viewer)
throws DocumentObjectNotFoundException
User can view the version indicated by the supplied version
number. This method takes into account document state and collaboration settings in determining
whether or not a version is viewable. It does not take permissions into account.
versionID - the versionId to test.viewer - the potential version viewer.
User can view the version indicated by the supplied version
number
DocumentObjectNotFoundException - if no version corresponding to the provided ID can be found
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||