wt.vc.wip
Class StandardWorkInProgressService

java.lang.Object
  extended by wt.services.StandardManager
      extended by wt.vc.wip.StandardWorkInProgressService
All Implemented Interfaces:
Serializable, NetFactor, wt.services.Manager, WorkInProgressService, wt.vc.wip.WorkInProgressServiceSvr

public class StandardWorkInProgressService
extends StandardManager
implements WorkInProgressService, wt.vc.wip.WorkInProgressServiceSvr, Serializable

Provides the standard implementation of server-side functionality as defined by the WorkInProgressService interface. This class is the one intended to be extended to enhance functionality.

As defined by the standard WIP service's access control rules, since a Workable object is asserted as being Lockable the service relies on the locking service for applicable access control. Additionally, when an object is checked out then neither the original checked out or working copies can be checked out again nor deleted.

Event-based processing is performed on business objects asserted as being Workable during database storing, [preparation for] modifications, and deletions. When a business object is being stored in the database, the WIP service listens to a dispatched event indicating that the store is about to commence and initializes the state of the object to being checked in if and only if its checkout info cookie is null. Since a Workable asserts itself as being Foldered the WIP service listens to a dispatched event indicating that a store on a cabinet has successfully completed and checks if the cabinet exists in the user domain (i.e., a personal cabinet), and if so stores a checkout folder in that cabinet. When a business object is [prepared for] being modified in the database, the WIP service listens to a dispatched event indicating that the modify is about to commence and vetoes it if:

Otherwise, the WIP service allows the modification to take place. When a business object is being deleted in the database, the WIP service listens to a dispatched event indicating that a deletion is about to commence and vetoes it if the object is checked out or a working copy of a checked out object.

If the standard implementation is not desired then a custom implementation can extend from WorkInProgressService alongside the standard implementation, and be specified as a property to be used as the default WIP service.

Use the newStandardWorkInProgressService static factory method(s), not the StandardWorkInProgressService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
StandardManager, WorkInProgressServiceEvent, wt.fc.PersistenceManagerEvent.PRE_STORE, wt.fc.PersistenceManagerEvent.POST_STORE, wt.fc.PersistenceManagerEvent.PREPARE_FOR_MODIFICATION, wt.fc.PersistenceManagerEvent.PRE_MODIFY, wt.fc.PersistenceManagerEvent.PRE_DELETE, Serialized Form

Method Summary
 Workable checkin(Workable object, String note)
          Checkin a workable object.
 WTCollection checkin(WTCollection objects, String note)
          Checkin a WTCollection of Workable objects.
 WTCollection checkin(WTCollection objects, String note, Folder folder)
          Checkin a WTCollection of Workable objects to the folder specified by the name passed.
 WTCollection checkin(WTCollection objects, String note, String folder)
          Checkin a WTCollection of Workable objects to the folder specified by the name passed.
 WTCollection checkin(WTKeyedMap objects)
          Checkin a WTKeyedMap of Workable objects where the key is the Workable object, and the value is the note for that checkin.
 WTCollection checkin(WTKeyedMap objects, Folder folder)
          Checkin a WTKeyedMap of Workable objects to the folder specified by the name passed.
 WTCollection checkin(WTKeyedMap workableToNoteMap, WTValuedMap workableToFolderMap)
          Checkin a WTKeyedMap of Workable objects to checkin notes the folders specified by WTValuedMap of Workable objects to Folder objects passed.
 CheckoutLink checkout(Workable object, Folder folder, String note)
          Checkout a workable object.
 CheckoutLink checkout(Workable object, Folder folder, String note, boolean allowNonLatestCheckout)
          Checkout a workable object.
 WTCollection checkout(WTCollection objects, Folder folder, String note)
          Checks out a WTCollection of Workable objects to the specified folder.
 WTCollection checkout(WTCollection objects, Folder folder, String note, boolean allowNonLatestCheckout)
          Checks out a WTCollection of Workable objects to the specified folder.
 WTValuedMap checkoutMap(WTCollection objects, Folder folder, String note)
          Checks out a WTCollection of Workable objects to the specified folder.
 WTValuedMap checkoutMap(WTCollection objects, Folder folder, String note, boolean allowNonLatestCheckout)
          Checks out a WTCollection of Workable objects to the specified folder.
 WTValuedMap checkoutMap(WTKeyedMap objects, Folder folder)
          Checks out a WTKeyedMap of Workable objects to the specified folder, where the key is the Workable object, and the value is the note for that checkout..
 WTValuedMap checkoutMap(WTKeyedMap objects, Folder folder, boolean allowNonLatestCheckout)
          Checks out a WTKeyedMap of Workable objects to the specified folder, where the key is the Workable object, and the value is the note for that checkout..
 Workable derivedFrom(Workable workable)
          Given a workable return its derived from workable and null if one does not exist

Supported API: true
 WTValuedMap derivedFroms(WTCollection workables)
          Given a collection of workables return a WTValuedMap with keys = objects in iterations that have a derivedFrom, values = corresponding derived from iterations.
 Map<WTUser,WTCollection> findCheckedOutObjects(WTCollection containers, WTCollection users)
          Find checked-out objects in the collection of containers for the collection of users.
 QueryResult findCheckedOutObjects(WTContainer container)
          Find checked out objects for the container, return as a QueryResult.
 QueryResult findCheckedOutObjects(WTContainer container, WTUser name)
          Find checked out objects for the container and user, return as a QueryResult.
 QueryResult findCheckedOutObjects(WTUser name)
          Find checked out objects for the user, return as a QueryResult.
 Folder getCheckoutFolder()
          Gets the folder named "Checked Out" located in the current session user's personal cabinet.
 WTCollection getLocked(WTCollection workables)
          Given a collection of workables return the workables from that collection that are on a branch that is locked, i.e.
 WTCollection getLocked(WTCollection workables, WorkInProgressState wipState)
          Given a collection of workables return the workables from that collection that are on a branch that is locked, i.e.
 boolean isCheckoutAllowed(Workable workable)
          Given a workable object return true if it can be checked out.
 WTCollection isCheckoutAllowed(WTCollection workables)
          Given a WTCollection of workables return a WTCollection containing only the workables that can be checked out.
 boolean isLocked(Workable workable)
          Returns true if the input workable is locked because it or another iteration on its branch has been checked out.
 Workable originalCopyOf(Workable object)
          Navigates to the original copy from a working copy via the CheckoutLink.
 Workable undoCheckout(Workable object)
          Undo a checkout of a workable object.
 WTCollection undoCheckouts(WTCollection objects)
          Given a WTCollection of checked out objects undo each checkout.
 void undoCheckouts(WTUser user, WTContainer container)
          Undo all checkouts by the user for objects located in the specified container.
 Workable workingCopyOf(Workable object)
          Navigates to the working copy of an original copy via the CheckoutLink.
 
Methods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

checkin

public Workable checkin(Workable object,
                        String note)
                 throws WTException,
                        WorkInProgressException,
                        WTPropertyVetoException,
                        PersistenceException
Checkin a workable object. A PRE_CHECKIN WorkInProgressServiceEvent is emitted within a transaction before the object is checked in, and a POST_CHECKIN WorkInProgressServiceEvent is emitted within the same transaction after the object has been checked in.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
object -
note -
Returns:
Workable
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkin

public WTCollection checkin(WTCollection objects,
                            String note)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTCollection of Workable objects. A multi-object PRE_CHECKIN WorkInProgressServiceEvent is emitted within a transaction before the objects are checked in, and a multi-object POST_CHECKIN WorkInProgressServiceEvent is emitted within the same transaction after the collection of objects has been checked in. The supplied note is used as the comment for the checkin of the objects.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
objects - The WTCollection of Workable objects to be checked in.
note - The comment pertaining to the checkin of the Workable objects.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkin

public WTCollection checkin(WTCollection objects,
                            String note,
                            String folder)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTCollection of Workable objects to the folder specified by the name passed. This API is intended for first time checkin from a personal cabinet only. The supplied note is used as the comment for the checkin of the objects.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
objects - The WTCollection of Workable objects to be checked in.
note - The comment pertaining to the checkin of the Workable objects.
folder - The name of the folder the objects are to be checked in to.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkin

public WTCollection checkin(WTCollection objects,
                            String note,
                            Folder folder)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTCollection of Workable objects to the folder specified by the name passed. This API is intended for first time checkin from a personal cabinet only. The supplied note is used as the comment for the checkin of the objects.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
objects - The WTCollection of Workable objects to be checked in.
note - The comment pertaining to the checkin of the Workable objects.
folder - The Folder the objects are to be checked in to.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkin

public WTCollection checkin(WTKeyedMap objects)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTKeyedMap of Workable objects where the key is the Workable object, and the value is the note for that checkin. A multi-object PRE_CHECKIN WorkInProgressServiceEvent is emitted within a transaction before the objects are checked in, and a multi-object POST_CHECKIN WorkInProgressServiceEvent is emitted within the same transaction after the collection of objects has been checked in.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
objects - The WTKeyedMap of Workable objects to be checked in.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkin

public WTCollection checkin(WTKeyedMap objects,
                            Folder folder)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTKeyedMap of Workable objects to the folder specified by the name passed. The WTKeyedMap contains Workable objects as keys and the values are the associated notes. This API is intended for first time checkin from a personal cabinet only.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
objects - The WTKeyedMap of Workable objects to be checked in.
folder - The Folder the objects are to be checked in to.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

checkout

public CheckoutLink checkout(Workable object,
                             Folder folder,
                             String note)
                      throws WTException,
                             WorkInProgressException,
                             NonLatestCheckoutException,
                             WTPropertyVetoException,
                             PersistenceException
Checkout a workable object. A PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the object is checked out, and a POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the object has been checked out.

Supported API: true

Specified by:
checkout in interface WorkInProgressService
Parameters:
object -
folder -
note -
Returns:
CheckoutLink
Throws:
WTException
WorkInProgressException
NonLatestCheckoutException
WTPropertyVetoException
PersistenceException

checkout

public CheckoutLink checkout(Workable object,
                             Folder folder,
                             String note,
                             boolean allowNonLatestCheckout)
                      throws WorkInProgressException,
                             WTException
Checkout a workable object. This api optionally allows non-latest iterations to be checked out. A PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the object is checked out, and a POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the object has been checked out.

Supported API: true

Specified by:
checkout in interface WorkInProgressService
Parameters:
object -
folder -
note -
allowNonLatestCheckout -
Returns:
CheckoutLink
Throws:
WorkInProgressException
WTException

checkout

public WTCollection checkout(WTCollection objects,
                             Folder folder,
                             String note)
                      throws WTException,
                             WorkInProgressException,
                             NonLatestCheckoutException,
                             WTPropertyVetoException,
                             PersistenceException
Checks out a WTCollection of Workable objects to the specified folder. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkout in interface WorkInProgressService
Parameters:
objects - The WTCollection of objects to be checked out.
folder - The Folder the objects are to be checked out to.
note - The comment for the checkout operation.
Returns:
WTCollection - The collection returned contains the set of CheckoutLink objects resulting from the operation.
Throws:
WTException
WorkInProgressException
NonLatestCheckoutException
WTPropertyVetoException
PersistenceException

checkout

public WTCollection checkout(WTCollection objects,
                             Folder folder,
                             String note,
                             boolean allowNonLatestCheckout)
                      throws WorkInProgressException,
                             WTException
Checks out a WTCollection of Workable objects to the specified folder. This api optionally allows non-latest iterations to be checked out. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkout in interface WorkInProgressService
Parameters:
objects -
folder -
note -
allowNonLatestCheckout -
Returns:
WTCollection - The collection returned contains the set of CheckoutLink objects resulting from the operation.
Throws:
WorkInProgressException
WTException

derivedFrom

public Workable derivedFrom(Workable workable)
                     throws WorkInProgressException,
                            WTException
Given a workable return its derived from workable and null if one does not exist

Supported API: true

Specified by:
derivedFrom in interface WorkInProgressService
Parameters:
workable -
Returns:
Workable
Throws:
WorkInProgressException
WTException

derivedFroms

public WTValuedMap derivedFroms(WTCollection workables)
                         throws WorkInProgressException,
                                WTException
Given a collection of workables return a WTValuedMap with keys = objects in iterations that have a derivedFrom, values = corresponding derived from iterations.

Supported API: true

Specified by:
derivedFroms in interface WorkInProgressService
Parameters:
workables -
Returns:
WTValuedMap
Throws:
WorkInProgressException
WTException

undoCheckout

public Workable undoCheckout(Workable object)
                      throws WTException,
                             WorkInProgressException,
                             WTPropertyVetoException,
                             PersistenceException
Undo a checkout of a workable object. A PRE_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the object's checkout is undone, and a POST_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the object has had its checkout undone.

Supported API: true

Specified by:
undoCheckout in interface WorkInProgressService
Parameters:
object -
Returns:
Workable
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

undoCheckouts

public void undoCheckouts(WTUser user,
                          WTContainer container)
                   throws WTException,
                          WorkInProgressException,
                          WTPropertyVetoException,
                          PersistenceException
Undo all checkouts by the user for objects located in the specified container. A PRE_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the object's checkout is undone, and a POST_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the object has had its checkout undone.

Supported API: true

Specified by:
undoCheckouts in interface WorkInProgressService
Parameters:
user -
container -
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

undoCheckouts

public WTCollection undoCheckouts(WTCollection objects)
                           throws WTException,
                                  WorkInProgressException,
                                  WTPropertyVetoException,
                                  PersistenceException
Given a WTCollection of checked out objects undo each checkout. A multi-object PRE_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the checkout of the objects is undone, and a multi-object POST_UNDO_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the checkout of the collection of objects has been undone.

Supported API: true

Specified by:
undoCheckouts in interface WorkInProgressService
Parameters:
objects - The WTCollection of checked out objects.
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException

originalCopyOf

public Workable originalCopyOf(Workable object)
                        throws WTException,
                               WorkInProgressException
Navigates to the original copy from a working copy via the CheckoutLink.

Supported API: true

Specified by:
originalCopyOf in interface WorkInProgressService
Parameters:
object -
Returns:
Workable
Throws:
WTException
WorkInProgressException

workingCopyOf

public Workable workingCopyOf(Workable object)
                       throws WTException,
                              WorkInProgressException
Navigates to the working copy of an original copy via the CheckoutLink.

Supported API: true

Specified by:
workingCopyOf in interface WorkInProgressService
Parameters:
object -
Returns:
Workable
Throws:
WTException
WorkInProgressException

getCheckoutFolder

public Folder getCheckoutFolder()
                         throws WTException
Gets the folder named "Checked Out" located in the current session user's personal cabinet.

Supported API: true

Specified by:
getCheckoutFolder in interface WorkInProgressService
Returns:
Folder
Throws:
WTException

isLocked

public boolean isLocked(Workable workable)
                 throws WorkInProgressException,
                        WTException
Returns true if the input workable is locked because it or another iteration on its branch has been checked out.

Supported API: true

Specified by:
isLocked in interface WorkInProgressService
Parameters:
workable -
Returns:
boolean
Throws:
WorkInProgressException
WTException

getLocked

public WTCollection getLocked(WTCollection workables)
                       throws WorkInProgressException,
                              WTException
Given a collection of workables return the workables from that collection that are on a branch that is locked, i.e. where one object is checked out.

Supported API: true

Specified by:
getLocked in interface WorkInProgressService
Parameters:
workables -
Returns:
WTCollection
Throws:
WorkInProgressException
WTException

getLocked

public WTCollection getLocked(WTCollection workables,
                              WorkInProgressState wipState)
                       throws WorkInProgressException,
                              WTException
Given a collection of workables return the workables from that collection that are on a branch that is locked, i.e. where one object is checked out, and having the input WorkInProgressState.

Supported API: true

Specified by:
getLocked in interface WorkInProgressService
Parameters:
workables -
wipState -
Returns:
WTCollection
Throws:
WorkInProgressException
WTException

findCheckedOutObjects

public QueryResult findCheckedOutObjects(WTContainer container)
                                  throws WTException
Find checked out objects for the container, return as a QueryResult.

Supported API: true

Specified by:
findCheckedOutObjects in interface WorkInProgressService
Parameters:
container -
Returns:
QueryResult
Throws:
WTException

findCheckedOutObjects

public QueryResult findCheckedOutObjects(WTContainer container,
                                         WTUser name)
                                  throws WTException
Find checked out objects for the container and user, return as a QueryResult.

Supported API: true

Specified by:
findCheckedOutObjects in interface WorkInProgressService
Parameters:
container -
name -
Returns:
QueryResult
Throws:
WTException

findCheckedOutObjects

public QueryResult findCheckedOutObjects(WTUser name)
                                  throws WTException
Find checked out objects for the user, return as a QueryResult.

Supported API: true

Specified by:
findCheckedOutObjects in interface WorkInProgressService
Parameters:
name -
Returns:
QueryResult
Throws:
WTException

findCheckedOutObjects

public Map<WTUser,WTCollection> findCheckedOutObjects(WTCollection containers,
                                                      WTCollection users)
                                               throws WTException
Find checked-out objects in the collection of containers for the collection of users. Return as a map of users to collections of working copies of their checked-out objects.

Supported API: true

Specified by:
findCheckedOutObjects in interface WorkInProgressService
Parameters:
containers - Collection of WTContainers. The objects returned will be in one of these containers.
users - Collection of WTUsers. The objects returned will be checked out to one of these users.
Returns:
Map
Throws:
WTException

checkoutMap

public WTValuedMap checkoutMap(WTCollection objects,
                               Folder folder,
                               String note)
                        throws WTException,
                               WorkInProgressException,
                               NonLatestCheckoutException,
                               WTPropertyVetoException,
                               PersistenceException,
                               wt.vc.wip.ObjectsAlreadyCheckedOutException
Checks out a WTCollection of Workable objects to the specified folder. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkoutMap in interface WorkInProgressService
Parameters:
objects - The WTCollection of objects to be checked out.
folder - The Folder the objects are to be checked out to.
note - The comment for the checkout operation.
Returns:
WTValuedMap - The WTValuedMap returned contains the checked out Workable object as the key and the resulting CheckoutLink object as the value.
Throws:
WTException
WorkInProgressException
NonLatestCheckoutException
WTPropertyVetoException
PersistenceException
wt.vc.wip.ObjectsAlreadyCheckedOutException

checkoutMap

public WTValuedMap checkoutMap(WTCollection objects,
                               Folder folder,
                               String note,
                               boolean allowNonLatestCheckout)
                        throws WorkInProgressException,
                               WTException
Checks out a WTCollection of Workable objects to the specified folder. This api optionally allows non-latest iterations to be checked out. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkoutMap in interface WorkInProgressService
Parameters:
objects -
folder -
note -
allowNonLatestCheckout -
Returns:
WTValuedMap - The WTValuedMap returned contains the checked out Workable object as the key and the resulting CheckoutLink object as the value.
Throws:
WorkInProgressException
WTException

checkoutMap

public WTValuedMap checkoutMap(WTKeyedMap objects,
                               Folder folder)
                        throws WTException,
                               WorkInProgressException,
                               NonLatestCheckoutException,
                               WTPropertyVetoException,
                               PersistenceException,
                               wt.vc.wip.ObjectsAlreadyCheckedOutException
Checks out a WTKeyedMap of Workable objects to the specified folder, where the key is the Workable object, and the value is the note for that checkout.. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkoutMap in interface WorkInProgressService
Parameters:
objects - The WTCollection of objects to be checked out.
folder - The Folder the objects are to be checked out to.
Returns:
WTValuedMap - The WTValuedMap returned contains the checked out Workable object as the key and the resulting CheckoutLink object as the value.
Throws:
WTException
WorkInProgressException
NonLatestCheckoutException
WTPropertyVetoException
PersistenceException
wt.vc.wip.ObjectsAlreadyCheckedOutException

checkoutMap

public WTValuedMap checkoutMap(WTKeyedMap objects,
                               Folder folder,
                               boolean allowNonLatestCheckout)
                        throws WorkInProgressException,
                               WTException
Checks out a WTKeyedMap of Workable objects to the specified folder, where the key is the Workable object, and the value is the note for that checkout.. This api optionally allows non-latest checkouts. A multi-object PRE_CHECKOUT WorkInProgressServiceEvent is emitted within a transaction before the collection of objects is checked out, and a multi-object POST_CHECKOUT WorkInProgressServiceEvent is emitted within the same transaction after the objects have been checked out. The provided note is used as the comment for the checkout operation.

Supported API: true

Specified by:
checkoutMap in interface WorkInProgressService
Parameters:
objects -
folder -
allowNonLatestCheckout -
Returns:
WTValuedMap - The WTValuedMap returned contains the checked out Workable object as the key and the resulting CheckoutLink object as the value.
Throws:
WorkInProgressException
WTException

isCheckoutAllowed

public boolean isCheckoutAllowed(Workable workable)
                          throws WorkInProgressException,
                                 WTException
Given a workable object return true if it can be checked out. This api validates latest and non-latest objects.

Supported API: true

Specified by:
isCheckoutAllowed in interface WorkInProgressService
Parameters:
workable -
Returns:
boolean
Throws:
WorkInProgressException
WTException

isCheckoutAllowed

public WTCollection isCheckoutAllowed(WTCollection workables)
                               throws WorkInProgressException,
                                      WTException
Given a WTCollection of workables return a WTCollection containing only the workables that can be checked out. This api validates all latest and non-latest objects.

Supported API: true

Specified by:
isCheckoutAllowed in interface WorkInProgressService
Parameters:
workables -
Returns:
WTCollection
Throws:
WorkInProgressException
WTException

checkin

public WTCollection checkin(WTKeyedMap workableToNoteMap,
                            WTValuedMap workableToFolderMap)
                     throws WTException,
                            WorkInProgressException,
                            WTPropertyVetoException,
                            PersistenceException
Checkin a WTKeyedMap of Workable objects to checkin notes the folders specified by WTValuedMap of Workable objects to Folder objects passed. The WTKeyedMap contains Workable objects as keys and the values are the associated notes. The WTValuedMap contains Workable objects as keys and the values are the checkin Folders for each Workable object This API is intended for first time checkin from a personal cabinet only.

Supported API: true

Specified by:
checkin in interface WorkInProgressService
Parameters:
workableToNoteMap -
workableToFolderMap -
Returns:
WTCollection
Throws:
WTException
WorkInProgressException
WTPropertyVetoException
PersistenceException