Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api.versioning
Interface VersioningService
public interface VersioningServiceThe Versioning Service gives access to the version related tasks of WCM
Obtain an instance of the service through Workspace.getVersioningService()
- Since:
- 8.0
Method Summary Document restore(Version version, RestoreOption... options)
Restore an existing item to a previous version.
Method Detail restore
Document restore(Version version, RestoreOption... options) throws com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException, com.ibm.workplace.wcm.api.exceptions.AuthorizationException, RestoreFailedException
Restore an existing item to a previous version. the item must exist.
Currently the only supported option is: RestoreStateOptionBy default if the item is workflowed and its first stage is a draft it will be restored as a draft. Otherwise it will be restored as published. If you want to specify preference to Restore as published use RestoreStateOption.asPublished()
Editor Access is required to restore an item
NOTE: You do not need to save the returned item, the restoration process will persist the newly restored item
- Parameters:
- version - the version to restore the item to , a version can be obtained through the item's VersionCatalog which is obtained by Document.getVersionCatalog()
- options - a list of options for the restore Operation. See RestoreOption for more information.
- Returns:
- the Restored Document, this document would have already been persisted into the WCM repository
- Throws:
- com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException - if the item to restore cannot be retrieved
- com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user of the workspace does not have the required access to restore the item.
- RestoreFailedException - if the Restoration process failed
- Since:
- 8.0
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD