public interface IVersionPolicy extends IBizPolicy
Modifier and Type | Method and Description |
---|---|
IThingID |
addToVersion(IContext context,
IThingID itemId)
Adds an item into the versioning.
|
void |
checkIn(IContext context,
IThingID itemId,
Object dataToBeCheckedIn,
String sComment,
String encoding)
Checks an item in.
|
void |
checkOut(IContext context,
IThingID itemId)
Checks a versioned item out.
|
IListView<IView> |
listVersions(IContext context,
IThingID itemID)
List the versions for a given versioned item
|
void |
setCurrentVersion(IContext context,
IThingID itemId,
String sVersionId)
Updates an item by grabbing a version pointed by the specified version id.
|
void |
undoCheckOut(IContext context,
IThingID itemId)
Unchecks out a versioned item.
|
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
IThingID addToVersion(IContext context, IThingID itemId) throws BizException
context
- The current IContext
.itemId
- The item IThingID
is to be versioned.IThingID
of the item once it becomes versioned.BizException
- if any error occurs while adding the item into the versioningIContext
void checkOut(IContext context, IThingID itemId) throws BizException
context
- The current IContext
.itemId
- The item IThingID
is to be checked out.BizException
- if any error occurs while checking in the itemIContext
void undoCheckOut(IContext context, IThingID itemId) throws BizException
context
- The current IContext
.itemId
- The item IThingID
is to be unchecked out.BizException
- if any error occurs while unchecking out the itemIContext
void checkIn(IContext context, IThingID itemId, Object dataToBeCheckedIn, String sComment, String encoding) throws BizException
context
- The current IContext
.itemId
- The item IThingID
is to be checked in.dataToBeCheckedIn
- The data to be checked in. This strongly depends on type of an item to be checked in.sComment
- The comment, which is to be added in the version history for the version is checked in.
See the implementation for more detail.BizException
- if any error occurs while checking the item inIContext
void setCurrentVersion(IContext context, IThingID itemId, String sVersionId) throws BizException
context
- The current IContext
.itemId
- The item IThingID
is to be checked in.sVersionId
- The version id, which points a version to be set as the current one.BizException
- if any error occurs while setting versionIContext
IListView<IView> listVersions(IContext context, IThingID itemID) throws BizException
context
- the current users contextitemID
- the item whose versions will be listedIView
objects describing each version of the documentBizException