...
All property definitions in the schema need the specification of the required
attribute. Its boolean value decides if the corresponding property is mandatory (true
) or optional (false
) for an object. However, the value of the required
attribute can be overwritten by a propertyReference
in object type definitions or secondary object type definitions.
Property Definition
In an import management system, documents might be imported with less properties than they will have lateron in their lifecycle. A freshly imported object for example does not necessarily have an editor. Later in the document lifecycle, this information may be required. By overwriting the required
attribute of the property editor
, it is possible to use the same property throughout the entire lifecycle.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<propertyStringDefinition> <id>editor</id> <propertyType>string</propertyType> <cardinality>single</cardinality> <required>true</required> </propertyStringDefinition> <typeDocumentDefinition> <id>imported1</id> <baseId>system:document</baseId> <propertyReference required="false">editor</propertyReference> <contentStreamAllowed>allowed</contentStreamAllowed> </typeDocumentDefinition> |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<propertyStringDefinition> <id>editor</id> <propertyType>string</propertyType> <cardinality>single</cardinality> <required>true</required> </propertyStringDefinition> <typeDocumentDefinition> <id>imported3</id> <baseId>system:document</baseId> <propertyReference required="false">editor</propertyReference> <contentStreamAllowed>allowed</contentStreamAllowed> <secondaryObjectTypeId static="false">noeditor</secondaryObjectTypeId> <secondaryObjectTypeId static="false">witheditor</secondaryObjectTypeId> </typeDocumentDefinition> <typeSecondaryDefinition> <id>noeditor</id> <baseId>system:secondary</baseId> <propertyReference required="false">editor</propertyReference> </typeSecondaryDefinition> <typeSecondaryDefinition> <id>witheditor</id> <baseId>system:secondary</baseId> <propertyReference>editor</propertyReference> </typeSecondaryDefinition> |
...