Secondary Object Type Example: system:rmDestructionRetention
The system provided object type system:rmDestructionRetention is an example for a secondary object-type. The attributes of this type and how to use it are explained below.
Table of Contents
Definition
Attribute | Value |
---|---|
id | system:rmDestructionRetention |
localNamespace | urn:optimal-systems.de:dmscloud:system |
baseId | system:secondary |
PropertyReference | system:rmExpirationDate |
PropertyReference | system:rmStartOfRetention |
PropertyReference | system:rmDestructionDate |
Definition of Property References
id | propertyType | cardinality | required | description |
---|---|---|---|---|
| datetime | single | false | specifies time (datetime), when retention period expires |
system:rmStartOfRetention | datetime | single | false | specifies time (datetime), when retention starts |
system:rmDestructionDate | datetime | single | false | specifies time (datetime), when content may be deleted |
These properties are added by the secondary object type system:rmDestructionRetention.
Usage
The following example shows how this secondary object type is used in a document-type definition:
... <typeDocumentDefinition> <id>document</id> <description>a document with retention</description> <baseId>system:document</baseId> <propertyReference>name</propertyReference> <propertyReference>date</propertyReference> <contentStreamAllowed>required</contentStreamAllowed> <secondaryObjectTypeId>system:rmDestructionRetention</secondaryObjectTypeId> </typeDocumentDefinition> ...
The document-type document
references the secondary object-type system:rmDestructionRetention via its ID. Multiple secondary object-type references have to be listed directly below each other. The secondary object-type system:rmDestructionRetention is a system type and is therefore always available. The following example shows the structure of this type.
... <typeSecondaryDefinition> <id>system:rmDestructionRetention</id> <localNamespace>urn:optimal-systems.de:dmscloud:system</localNamespace> <description>decribes the base secondary type</description> <baseId>system:secondary</baseId> <propertyReference>system:rmExpirationDate</propertyReference> <propertyReference>system:rmStartOfRetention</propertyReference> <propertyReference>system:rmDestructionDate</propertyReference> </typeSecondaryDefinition> ...
All properties of the secondary object type are then available in the relevant object type.
The following example shows the resulting meta data section how it is used when importing or requesting an object.
{ "objects": [{ "properties": { "system:objectTypeId": { "value": "document" }, "name": { "value": "Präsentation" }, "system:rmStartOfRetention": { "value": "2018-07-20T11:52:00.000Z" }, "system:rmExpirationDate": { "value": "2028-12-28T11:52:00.000Z" }, "system:rmDestructionDate": { "value": "2028-12-28T11:52:00.000Z" } }, ... // the content section is missing here }] }
Deletion Restrictions
An object with retention can only be deleted when the retention period has expired and the destruction date has been reached. If the property system:rmDestructionDate is not set, an object can be deleted as soon as the retention period has expired.