Daisy Open Source CMS

org.outerj.daisy.repository
Interface VersionedData

All Known Subinterfaces:
Document, Version

public interface VersionedData

Read-access to the versioned data of a Daisy document.

Implemented by both Document and Version.


Method Summary
 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 field type id.
 Field getField(String fieldTypeName)
          Gets a field by field type name.
 Fields getFields()
          Returns the fields, in unspecified order.
 Fields getFieldsInOrder()
          Returns the fields, in the order as they are defined in the document type of the document.
 Links getLinks()
          Get the out-of-line links.
 Part getPart(long typeId)
          Get a part by id.
 Part getPart(String typeName)
          Get a part by name.
 Parts getParts()
          Returns the parts, in unspecified order.
 Parts getPartsInOrder()
          Returns the parts, in the order as they are defined in the document type of the document.
 boolean hasField(long fieldTypeId)
          Checks if the specified field is available.
 boolean hasField(String fieldTypeName)
          Checks if the specified field is available.
 boolean hasPart(long typeId)
          Checks if the specified part is available.
 boolean hasPart(String typeName)
          Checks if the specified part is available.
 

Method Detail

getDocumentName

String getDocumentName()
Returns the name of the document as it was on the time this version was created.


getParts

Parts getParts()
Returns the parts, in unspecified order.


getPartsInOrder

Parts getPartsInOrder()
Returns the parts, in the order as they are defined in the document type of the document. Any parts that are not present in the current document type are returned in no specific order, but after the ordered parts.


getPart

Part getPart(long typeId)
Get a part by id.

Throws:
PartNotFoundException - when the part is not available. Use hasPart(long) to check it is available.

hasPart

boolean hasPart(long typeId)
Checks if the specified part is available.


hasPart

boolean hasPart(String typeName)
Checks if the specified part is available.


getPart

Part getPart(String typeName)
Get a part by name.

Throws:
PartNotFoundException - when the part is not available. Use hasPart(String) to check it is available.

getFields

Fields getFields()
Returns the fields, in unspecified order.


getFieldsInOrder

Fields getFieldsInOrder()
Returns the fields, in the order as they are defined in the document type of the document. Any fields that are not present in the current document type are returned in no specific order, but after the ordered fields.


getField

Field getField(long fieldTypeId)
               throws FieldNotFoundException
Get a field by field type id.

Throws:
FieldNotFoundException - when the field is not available. Use hasField(long) to check if it is available.

getField

Field getField(String fieldTypeName)
               throws FieldNotFoundException
Gets a field by field type name. Throws a FieldNotFoundException if there is no such field in the document, use hasField(String) to check if the document has the field.

This is a variant-level method.

Throws:
FieldNotFoundException - when the field is not available. Use hasField(String) to check if it is available.

hasField

boolean hasField(long fieldTypeId)
Checks if the specified field is available.


hasField

boolean hasField(String fieldTypeName)
Checks if the specified field is available.


getLinks

Links getLinks()
Get the out-of-line links.


Daisy Open Source CMS