|
Daisy Open Source CMS | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DocumentType
Describes a type of document in the repository.
Instances are retrieved from RepositorySchema.
A document type has some general properties like a name (which must
be unique), and a locale-sensitive label and description. Next to these,
a document type is associated with a number of FieldTypes
and PartTypes.
The part types and field types belonging to a document type are ordered collections: the order in which you add them matters. To reorder them, first remove them all and re-add them.
A document type object can be read-only, in which case all state-modifying methods (i.e. all setters and the save method) will throw a RuntimeException. Whether a document type object is read-only or not depends on where you retrieved it from. The purpose of read-only document type objects is for caching, i.e. the same object can be used by multiple users who only which to consult the document type information, but not modify it.
The equals method for DocumentType is supported, two document types are equal if all their defining data is equal, with exception of the ID.
| Method Summary | |
|---|---|
FieldTypeUse |
addFieldType(FieldType type,
boolean required)
The suplied field type should already exist in the repository, i.e. |
PartTypeUse |
addPartType(PartType partType,
boolean required)
Adds a new association with a part type to this document type. |
void |
clearFieldTypeUses()
|
void |
clearPartTypeUses()
Removes all associations with part types. |
org.outerx.daisy.x10.DocumentTypeDocument |
getExtendedXml()
Same as getXml() but includes the full XML description of the associated
part types and field types in the generated XML. |
FieldTypeUse |
getFieldTypeUse(long id)
Gets a 'field type use' by field type ID. |
FieldTypeUse |
getFieldTypeUse(String fieldTypeName)
Gets a 'field type use' by field type name. |
FieldTypeUse[] |
getFieldTypeUses()
|
long |
getId()
|
Date |
getLastModified()
When was this document type last changed (persistently). |
long |
getLastModifier()
Who (which user) last changed this document type (persistently). |
String |
getName()
|
PartTypeUse |
getPartTypeUse(long id)
Gets a 'part type use' by part type ID. |
PartTypeUse |
getPartTypeUse(String partTypeName)
Gets a 'part type use' by part type name. |
PartTypeUse[] |
getPartTypeUses()
Returns the part types contained by this document type. |
long |
getUpdateCount()
|
org.outerx.daisy.x10.DocumentTypeDocument |
getXml()
|
boolean |
hasFieldType(long id)
|
boolean |
hasPartType(long id)
Checks if this document type contains the part type with the given ID. |
boolean |
isDeprecated()
|
void |
save()
|
void |
setAllFromXml(org.outerx.daisy.x10.DocumentTypeDocument.DocumentType documentTypeXml)
|
void |
setDeprecated(boolean deprecated)
|
void |
setName(String name)
|
| Methods inherited from interface org.outerj.daisy.repository.schema.LabelEnabled |
|---|
clearLabels, getLabel, getLabelExact, getLabelLocales, setLabel |
| Methods inherited from interface org.outerj.daisy.repository.schema.DescriptionEnabled |
|---|
clearDescriptions, getDescription, getDescriptionExact, getDescriptionLocales, setDescription |
| Method Detail |
|---|
long getId()
PartTypeUse[] getPartTypeUses()
PartTypeUse addPartType(PartType partType,
boolean required)
The supplied part type should already exist in the repository, i.e. it should have an id != -1.
The same part type can be added only once.
A part type is always added to the end, after the already existing part types.
IllegalArgumentException - if the part type's id is -1, or if
it is already contained by this document type.void clearPartTypeUses()
boolean hasPartType(long id)
PartTypeUse getPartTypeUse(long id)
id - ID of the part type.
PartTypeUse getPartTypeUse(String partTypeName)
FieldTypeUse[] getFieldTypeUses()
boolean hasFieldType(long id)
FieldTypeUse getFieldTypeUse(long id)
id - ID of the field type.
FieldTypeUse getFieldTypeUse(String fieldTypeName)
FieldTypeUse addFieldType(FieldType type,
boolean required)
A field type is always added to the end, after the already existing field types.
The same field type can only be added once.
void clearFieldTypeUses()
String getName()
void setName(String name)
boolean isDeprecated()
void setDeprecated(boolean deprecated)
Date getLastModified()
long getLastModifier()
org.outerx.daisy.x10.DocumentTypeDocument getXml()
org.outerx.daisy.x10.DocumentTypeDocument getExtendedXml()
getXml() but includes the full XML description of the associated
part types and field types in the generated XML.
void setAllFromXml(org.outerx.daisy.x10.DocumentTypeDocument.DocumentType documentTypeXml)
void save()
throws RepositoryException
RepositoryExceptionlong getUpdateCount()
|
Daisy Open Source CMS | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||