<nodeType hasOrderableChildNodes="false" isMixin="true" name="publication:authoring" primaryItemName="">
<propertyDefinitions>
<propertyDefinition autoCreated="false" mandatory="false" multiple="false" name="publication:lastUser" onParentVersion="IGNORE" protected="false" requiredType="String">
<valueConstraints/>
</propertyDefinition>
<propertyDefinition autoCreated="false" mandatory="false" multiple="false" name="publication:lifecycle" onParentVersion="IGNORE" protected="false" requiredType="String">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
</nodeType>
When adding the content in a lifecycle, set the
publication:lifecycle_ property with the corresponding lifecycle.
A content can be in one lifecycle only.
Each time you change from one state to another, set the user who changed the state in
publication:lastUser
.
Querying based on publication status:
By adding this mixin to contents, you can access contents by simple queries based on the current user profile. For example:
All your draft contents:
query: select * from
nt:base
where publication:currentState
"draft" and publication:lastUser
="benjamin".
All the contents you have to approve.
call:
PublicationManager.getLifecycles('benjamin','approved')
=> returns lifecycles where you can go to the 'approved' state.
query: select * from
nt:base
where
publication:currentState="pending"
and
publication:lifecycle="lifecycle1"
orpublication:lifecycle="lifecycle3"
.
All the content that will be published tomorrow.
query: select * from
nt:base
where
publication:currentState="staged"
and publication:startPublishedDate
="xxxx".