Daisy Open Source CMS

org.outerj.daisy.repository
Interface Version

All Superinterfaces:
VersionedData

public interface Version
extends VersionedData

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
 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.
 org.outerx.daisy.x10.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.
 Date getStateLastModified()
          Get the time at which the state of this version was last changed.
 long getStateLastModifier()
          Get the id of the user that last changed the state of this version.
 long getTotalSizeOfParts()
          Get the sum of the size of the parts in this version.
 org.outerx.daisy.x10.VersionDocument getXml()
          Get an XML document describing the version.
 void setState(VersionState state)
          Changes the state of this version.
 
Methods inherited from interface org.outerj.daisy.repository.VersionedData
getDocumentName, getField, getField, getFields, getFieldsInOrder, getLinks, getPart, getPart, getParts, getPartsInOrder, hasField, hasField, hasPart, hasPart
 

Method Detail

getId

long getId()
The id of the version, which is a sequence number, the first version being 1, then 2, and so on.


getCreated

Date getCreated()
Returns the date when this version was created.


getCreator

long getCreator()
Returns the id of the user that created this version. You can retrieve full information on the user via the UserManager.


getShallowXml

org.outerx.daisy.x10.VersionDocument getShallowXml()
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.


getXml

org.outerx.daisy.x10.VersionDocument getXml()
                                            throws RepositoryException
Get an XML document describing the version.

Throws:
RepositoryException

setState

void setState(VersionState state)
              throws RepositoryException
Changes the state of this version.

This method has immediate effect, it is not needed to call document.save() after calling this method.

Throws:
RepositoryException

getState

VersionState getState()
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.


getStateLastModifier

long getStateLastModifier()
Get the id of the user that last changed the state of this version.


getStateLastModified

Date getStateLastModified()
Get the time at which the state of this version was last changed.


getTotalSizeOfParts

long getTotalSizeOfParts()
Get the sum of the size of the parts in this version.


Daisy Open Source CMS