|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describes a type of document in the repository.
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 DocumentType is associated with a number of FieldType
s
and PartType
s.
The PartTypes and FieldTypes belonging to a DocumentType are ordered collections: the order in which you add them matters. To reorder them, first remove them all and re-add them.
A DocumentType 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 DocumentType object is read-only or not depends on where you retrieved it from. The purpose of read-only DocumentType objects is for caching, i.e. the same object can be used by multiple users who only which to consult the DocumentType information, but not modify it.
Method Summary | |
void |
addFieldType(FieldType type,
boolean required)
The suplied FieldType should already exist in the repository, i.e. |
void |
addPartType(PartType partType,
boolean required)
Adds a new PartType to this DocumentType. |
void |
clearFieldTypeUses()
|
void |
clearPartTypeUses()
Removes all PartTypes. |
java.lang.String |
getDescription(java.util.Locale locale)
|
java.lang.String |
getDescriptionExact(java.util.Locale locale)
|
org.outerx.daisy.x10.DocumentTypeDocument |
getExtendedXml()
Same as getXml() but includes the XML description of the used
Part Types and Field Types in the generated XML. |
FieldTypeUse |
getFieldTypeUse(long id)
|
FieldTypeUse[] |
getFieldTypeUses()
|
long |
getId()
|
java.lang.String |
getLabel(java.util.Locale locale)
Gets the label in the given locale, using the usual locale fallback mechanisms if not found in the exactly specified locale, and finally returning the documenttype's name if no label is available. |
java.lang.String |
getLabelExact(java.util.Locale locale)
|
java.util.Date |
getLastModified()
When was this DocumentType last changed (persistently). |
long |
getLastModifier()
Who (which user) last changed this DocumentType (persistently). |
java.lang.String |
getName()
|
PartTypeUse |
getPartTypeUse(long id)
|
PartTypeUse[] |
getPartTypeUses()
Returns the PartTypes contained by this DocumentType. |
long |
getUpdateCount()
|
org.outerx.daisy.x10.DocumentTypeDocument |
getXml()
|
boolean |
hasFieldType(long id)
|
boolean |
hasPartType(long id)
Checks if this DocumentType contains the PartType with the given ID. |
boolean |
isDeprecated()
|
void |
save()
|
void |
setAllFromXml(org.outerx.daisy.x10.DocumentTypeDocument.DocumentType documentTypeXml)
|
void |
setDeprecated(boolean deprecated)
|
void |
setDescription(java.util.Locale locale,
java.lang.String description)
|
void |
setLabel(java.util.Locale locale,
java.lang.String label)
|
void |
setName(java.lang.String name)
|
Method Detail |
public long getId()
public PartTypeUse[] getPartTypeUses()
public void addPartType(PartType partType, boolean required)
The supplied PartType should already exist in the repository, i.e. it should have an id != -1.
The same PartType can be added only once.
A PartType is always added to the end, after the already existing PartTypes.
java.lang.IllegalArgumentException
- if the partType's id is -1, or if
it is already contained by this DocumentType.public void clearPartTypeUses()
public boolean hasPartType(long id)
public PartTypeUse getPartTypeUse(long id)
public FieldTypeUse[] getFieldTypeUses()
public boolean hasFieldType(long id)
public FieldTypeUse getFieldTypeUse(long id)
public void addFieldType(FieldType type, boolean required)
A FieldType is always added to the end, after the already existing FieldTypes.
The same PartType can only be added once.
public void clearFieldTypeUses()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription(java.util.Locale locale)
public java.lang.String getDescriptionExact(java.util.Locale locale)
public void setDescription(java.util.Locale locale, java.lang.String description)
public void setLabel(java.util.Locale locale, java.lang.String label)
public java.lang.String getLabel(java.util.Locale locale)
public java.lang.String getLabelExact(java.util.Locale locale)
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public java.util.Date getLastModified()
public long getLastModifier()
public org.outerx.daisy.x10.DocumentTypeDocument getXml()
public org.outerx.daisy.x10.DocumentTypeDocument getExtendedXml()
getXml()
but includes the XML description of the used
Part Types and Field Types in the generated XML.
public void setAllFromXml(org.outerx.daisy.x10.DocumentTypeDocument.DocumentType documentTypeXml)
public void save() throws RepositoryException
RepositoryException
public long getUpdateCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |