Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api.versioning
Interface VersioningService

    public interface VersioningService

The 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 DocumentRetrievalException,
                            AuthorizationException,
                            RestoreFailedException

  Restore an existing item to a previous version. the item must exist.

  Currently the only supported option is: `RestoreStateOption`

  By 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:
    `DocumentRetrievalException` - if the item to restore cannot be retrieved
    `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

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD