|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Version
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. |
boolean |
hasPart(java.lang.String typeName)
Checks if this version has a certain part. |
void |
setState(VersionState state)
Changes the state of this version. |
Method Detail |
---|
long getId()
java.util.Date getCreated()
long getCreator()
UserManager
.
java.lang.String getDocumentName()
Parts getParts() throws RepositoryException
RepositoryException
Parts getPartsInOrder() throws RepositoryException
RepositoryException
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.
boolean hasPart(long typeId)
boolean hasPart(java.lang.String typeName)
Part getPart(java.lang.String typeName) throws RepositoryException
Throws a PartNotFoundException if this version has not part with the specified name.
RepositoryException
Fields getFields() throws RepositoryException
RepositoryException
Fields getFieldsInOrder() throws RepositoryException
RepositoryException
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
boolean hasField(long fieldTypeId)
Links getLinks() throws RepositoryException
RepositoryException
org.outerx.daisy.x10.VersionDocument getShallowXml()
org.outerx.daisy.x10.VersionDocument getXml() throws RepositoryException
RepositoryException
void setState(VersionState state) throws RepositoryException
This method has immediate effect, it is not needed to call document.save() after calling this method.
RepositoryException
VersionState getState()
long getStateLastModifier()
java.util.Date getStateLastModified()
long getTotalSizeOfParts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |