| org.outerj.daisy.repository.Version
All known Subclasses: org.outerj.daisy.repository.commonimpl.VersionAccessWrapper, org.outerj.daisy.repository.commonimpl.VersionImpl,
Version | public interface Version extends VersionedData(Code) | | A version of a
Document .
This object provides access to the all versioned information of a document,
for a specific version of the document. Versions cannot be modified (except
their state, see below),
they are read-only. See
Document.save for when a version is created.
A version can have a state of either 'publish' or 'draft'. This state
can be changed at any time.
|
Method Summary | |
String | getChangeComment() Returns the change comment for this version (can be null). | ChangeType | getChangeType() Returns the change type for this version (never null). | Date | getCreated() Returns the date when this version was created. | long | getCreator() Returns the id of the user that created this version. | long | getId() The id of the version, which is a sequence number, the first version
being 1, then 2, and so on. | Date | getLastModified() Get the time at which the state of this version was last changed. | long | getLastModifier() Get the id of the user that last changed the state of this version. | VersionDocument | getShallowXml() Get an XML document containing information about this version, but without
the actual versioned content, thus no fields, parts, links etc. | VersionState | getState() Returns the current state of this version. | VersionKey | getSyncedWith() Returns a VersionKey that identifies the version that this version was synced to. | long | getTotalSizeOfParts() Get the sum of the size of the parts in this version. | VersionDocument | getXml() Get an XML document describing the version. | void | save() Saves changes made to the metadata of this version (versionState, syncedWith, changeType and changeComment). | void | setChangeComment(String changeComment) Changes the change comment for this version.
This method does not have immediate effect. | void | setChangeType(ChangeType changeType) Changes the change type for this version.
This method does not have immediate effect. | void | setState(VersionState state) Changes the state of this version. | void | setSyncedWith(long languageId, long versionId) Changes the 'synced with' field for this version. | void | setSyncedWith(VersionKey syncedWith) Sets the 'synced with' pointer by specifying a VersionKey object.
Only the language ID and version ID fields of the VersionKey object
are significant. |
getChangeComment | String getChangeComment()(Code) | | Returns the change comment for this version (can be null).
|
getChangeType | ChangeType getChangeType()(Code) | | Returns the change type for this version (never null).
|
getCreated | Date getCreated()(Code) | | Returns the date when this version was created.
|
getId | long getId()(Code) | | The id of the version, which is a sequence number, the first version
being 1, then 2, and so on.
|
getLastModified | Date getLastModified()(Code) | | Get the time at which the state of this version was last changed.
|
getLastModifier | long getLastModifier()(Code) | | Get the id of the user that last changed the state of this version.
|
getShallowXml | VersionDocument getShallowXml()(Code) | | Get an XML document containing information about this version, but without
the actual versioned content, thus no fields, parts, links etc. This is
useful when retrieving an overview of all versions of a document.
|
getState | VersionState getState()(Code) | | Returns the current state of this version. This is the state as it
was when this version object was loaded, it may have changed in the
meantime.
|
getSyncedWith | VersionKey getSyncedWith()(Code) | | Returns a VersionKey that identifies the version that this version was synced to.
Returns null if not set.
|
getTotalSizeOfParts | long getTotalSizeOfParts()(Code) | | Get the sum of the size of the parts in this version.
|
save | void save() throws RepositoryException(Code) | | Saves changes made to the metadata of this version (versionState, syncedWith, changeType and changeComment).
|
setChangeComment | void setChangeComment(String changeComment) throws RepositoryException(Code) | | Changes the change comment for this version.
This method does not have immediate effect. You need to call version.save() to make the change permanent.
Parameters: changeComment - the comment text, can be null to clear the change comment |
setChangeType | void setChangeType(ChangeType changeType) throws RepositoryException(Code) | | Changes the change type for this version.
This method does not have immediate effect. You need to call version.save() to make the change permanent.
The change type indicates if the version contains major or minor changes.
When using translation management, the change type is used to indicate that
a version contains changes which render translations invalid. So if a user
makes changes to a version, even though these might seem minor, but which
should be replicated in translations, than the change type should be set
to major (when using translation management, otherwise you can assign
your own meaning to this field).
since: daisy 2.2 |
setState | void setState(VersionState state)(Code) | | Changes the state of this version.
Sinced daisy 2.2, this method no longer has immediate effect, you need to call version.save() to make the change permanent.
|
setSyncedWith | void setSyncedWith(long languageId, long versionId) throws RepositoryException(Code) | | Changes the 'synced with' field for this version. The purpose of this field is for
translation management, it indicates that the data in this version is translated
content which is up to date with a certain version of some other (reference) language.
This method does not have immediate effect. You need to call version.save() to make the change permanent.
To clear the 'synced with' field, specify -1 for languageId and versionId.
throws: IllegalArgumentException - if exactly one of languageId and versionId is -1 or versionId < 0 throws: RepositoryException - if the languageId!=-1 and the language does not exist since: daisy 2.2 |
setSyncedWith | void setSyncedWith(VersionKey syncedWith) throws RepositoryException(Code) | | Sets the 'synced with' pointer by specifying a VersionKey object.
Only the language ID and version ID fields of the VersionKey object
are significant. The syncedWith argument can be null.
|
|
|