Content versions
Describes the various states a content version can have.
Version statusÂ
A content item that supports different statuses implements IVersionable
. The interface contains a property Status
 that specifies the current status of the content version. A content version can have one of the following different statuses:
NotCreated
– The version has not been saved yet.CheckedOut
– The currently edited versionAwaitingApproval
– The editor is done and has marked the version as ready for approvalRejected
– The version did not pass the approvalCheckedIn
– The version is approved and ready for publishingDelayedPublish
– The version is automatically published at a future date and timePublished
– The version is publishedPreviouslyPublished
– The version was published but is now replaced with a different version
Status transitions
A state transition can programmatically be specified by parameter SaveAction
 in the call to IContentRepository.Save
. Below are the different SaveAction
that can be specified for state transitions and the outcome of the transition. The transition is applied to the current version unless the status is published or previously published, in which case a new version is created.
Default
orNone
– Saves a version maintaining the current status unless a new version is created. In this case, the version is created in a checked-out state. (Default has replaced None in CMS 10)Publish
– Publishes a version.Schedule
– Schedule a version for automatic publishing at a later date. (Since CMS 10)CheckOut
– Checks out a version to indicate it is being worked on. (Since CMS 10)CheckIn
– Checks in a version indicating that it is ready to be publishedRequestApproval
– Saves a version to a state indicating that it is ready to be approvedReject
– Rejects a version. This is normally done during an approval review.Save
– Save action which outcome will depend on the current status. Will, in some cases, maintain the status and, in other cases check out the current version.
The state transition in the SaveAction
can be combined with some option flags to specify how the Save operation should be performed. The flags are:
ForceNewVersion
– Specifies that the content saved should be created as a new version.ForceCurrentVersion
– Specifies that the save should update the existing version.SkipValidation
– Specifies that the content should be saved without performing the usual validation.SkipSetCommonDraft
– Specifies that the version should not be set as common draft (the version used by default in the CMS edit user interface)DelayedPublish
– Used in combination withSaveAction.CheckIn
to specify that the version should be automatically published at a future date and time. (Deprecated in CMS 10)
Locked content versions
A version can be locked for updates or transitions by implementing interface IContentLockEvaluator
. Versions currently in state AwaitingApproval
and where an approval definition is specified for the version are locked for updates by default. Updates can be forced by specifying SaveAction.SkipValidation
. An IContentLockEvaluator
 implementation should be registered in the IOC container to be consumed by Optimizely Content Management System (CMS). See also Content approvals.
Updated 5 months ago