|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
The methods getParts()
, getFields()
and
getLinks()
can throw a RepositoryException because that information
may sometimes be loaded lazily (depending on the implementation).
A version can have a state of either 'publish' or 'draft'. This state can be changed at any time.
Method Summary | |
java.util.Date |
getCreated()
Returns the date when this version was created. |
long |
getCreator()
Returns the id of the user that created this version. |
java.lang.String |
getDocumentName()
Returns the name of the document as it was on the time this version was created. |
Field |
getField(long fieldTypeId)
Get a field by id. |
Fields |
getFields()
Returns the fields contained in this version. |
Fields |
getFieldsInOrder()
Returns the fields contained in this version, in the order as they are defined in the document type of the document. |
long |
getId()
The id of the version, which is a sequence number, the first version being 1, then 2, and so on. |
Links |
getLinks()
Get the links. |
Part |
getPart(long typeId)
Get a part by id. |
Part |
getPart(java.lang.String typeName)
Get a part by name. |
Parts |
getParts()
Returns the parts contained in this version. |
Parts |
getPartsInOrder()
Returns the parts contained in this version, in the order as they are defined in the document type of the document. |
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. |
java.util.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. |
boolean |
hasField(long fieldTypeId)
Checks if this version has a certain field. |
boolean |
hasPart(long typeId)
Checks if this version has a certain part. |
void |
setState(VersionState state)
Changes the state of this version. |
Method Detail |
public long getId()
public java.util.Date getCreated()
public long getCreator()
UserManager
.
public java.lang.String getDocumentName()
public Parts getParts() throws RepositoryException
RepositoryException
public Parts getPartsInOrder() throws RepositoryException
RepositoryException
public Part getPart(long typeId)
Throws a PartNotFoundException if this version has no part with
the specified id. Use hasPart(long)
to check if this version
has the wanted part.
public boolean hasPart(long typeId)
public Part getPart(java.lang.String typeName) throws RepositoryException
Throws a PartNotFoundException if this version has not part with the specified name.
RepositoryException
public Fields getFields() throws RepositoryException
RepositoryException
public Fields getFieldsInOrder() throws RepositoryException
RepositoryException
public Field getField(long fieldTypeId) throws FieldNotFoundException
Throws a FieldNotFoundException if this version has no field with
the specified id. Use hasField(long)
to check if this version
has the wanted field.
FieldNotFoundException
public boolean hasField(long fieldTypeId)
public Links getLinks() throws RepositoryException
RepositoryException
public org.outerx.daisy.x10.VersionDocument getShallowXml()
public org.outerx.daisy.x10.VersionDocument getXml() throws RepositoryException
RepositoryException
public void setState(VersionState state) throws RepositoryException
This method has immediate effect, it is not needed to call document.save() after calling this method.
RepositoryException
public VersionState getState()
public long getStateLastModifier()
public java.util.Date getStateLastModified()
public long getTotalSizeOfParts()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |