Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api.versioning
Class RestoreStateOptionjava.lang.Objectcom.ibm.workplace.wcm.api.versioning.RestoreStateOption
- All Implemented Interfaces:
- RestoreOption
public final class RestoreStateOption- extends java.lang.Object
- implements RestoreOption
This is one of the RestoreOption to be used in conjuction with VersioningService.restore(Version, RestoreOption...)
This Option only applies to Items that are workflowed. Non-Workflowed items are always restored as published.
Note: only one of these options can be specified for a single restore operation. For example the following code does not make sense and will throw an IllegalArgumentException versioningService.restore(myVersion, RestoreStateOption.asPublished(), RestoreStateOption.asDraft());
- Since:
- 8.0
Nested Class Summary static class RestoreStateOption.State
State to restore as
Method Summary static RestoreStateOption asDraft()
Specify to restore the item as draft.static RestoreStateOption asDraftInProject(DocumentId projectId)
Specify to restore the item as a draft in the given project.static RestoreStateOption asPublished()
Specify to restore the item in published state.java.lang.String toString()
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Method Detail asPublished
public static RestoreStateOption asPublished()
- Specify to restore the item in published state. This option is ignored for non-workflowed items. If the item does not have a publish stage in its workflow the restore will fail.
- Returns:
- RestoreStateOption to specifiy restore as published
asDraft
public static RestoreStateOption asDraft()
- Specify to restore the item as draft. If the item to restore does not have a draft stage the restore will fail.
- Returns:
- RestoreStateOption to specify restore as draft
asDraftInProject
public static RestoreStateOption asDraftInProject(DocumentId projectId)
- Specify to restore the item as a draft in the given project. If the item does not have a draft stage the restore will fail. Also if the projectId is invalid or the project is not in a state to that allows adding of items then the restore will fail.
- Parameters:
- projectId - the Id of the project to restore the item into.
- Returns:
- RestoreStateOption to specifiy restore as draft in the given project
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
- See Also:
- Object.toString()
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD