wt.vc.wip
Class WorkInProgressServiceFwd

java.lang.Object
  extended bywt.vc.wip.WorkInProgressServiceFwd
All Implemented Interfaces:
RemoteAccess, Serializable, WorkInProgressService

public class WorkInProgressServiceFwd
extends Object
implements RemoteAccess, WorkInProgressService, Serializable

Provides server-side functionality as a service that's remotely available for use by a client. The intent is that this interface defines all the necessary server-side functionality for WIP.

Note that the methods in this service do not consider/handle "sandbox" checkouts, but rather are specific to work-in-progress checkouts.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
WorkInProgressServiceFwd()
           
 
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.
 CheckoutLink checkout(Workable object, Folder folder, String note)
          Checkout a workable object.
 WTCollection checkout(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)
          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..
 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.
 WTValuedMap getCheckedOutToWorkingMap(WTCollection workables)
          Method that takes a WTCollection of Workable objects, determines which Workable objects from the WTCollection are in the checked out state.
 Folder getCheckoutFolder()
          Gets the folder named "Checked Out" located in the current session user's personal cabinet.
private static Manager getManager()
           
 boolean hasChanged(Workable object)
          Deprecated.  
 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.
 void undoCheckouts(Enumeration enum)
          Deprecated.  
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

WorkInProgressServiceFwd

public WorkInProgressServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

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: false

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: false

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: false

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: false

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

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: false

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

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: false

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

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: false

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

undoCheckouts

public void undoCheckouts(Enumeration enum)
                   throws WTException,
                          WorkInProgressException,
                          WTPropertyVetoException,
                          PersistenceException
Deprecated.  

Given an enumeration 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: false

Specified by:
undoCheckouts in interface WorkInProgressService
Parameters:
enum -
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.

Supported API: false

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: false

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: false

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: false

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

hasChanged

public boolean hasChanged(Workable object)
                   throws WTException
Deprecated.  

Checks if the given object has changed since it was checked out. The object can be either the working or original copy. If the original copy is passed in then the working copy will be retreived from the database.

Currently this method always returns true. The goal is to be able to detect if any attributes and associations from the object have been modified, and if not return false.

Supported API: false

Specified by:
hasChanged in interface WorkInProgressService
Parameters:
object - The object to to test. If it is not a working copy then the working copy associated with the original copy will be retreived from the database and used.
Returns:
true
Throws:
WTException

getCheckoutFolder

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

Supported API: false

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

findCheckedOutObjects

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

Supported API: false

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: false

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: false

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

getCheckedOutToWorkingMap

public WTValuedMap getCheckedOutToWorkingMap(WTCollection workables)
                                      throws WorkInProgressException,
                                             WTException
Method that takes a WTCollection of Workable objects, determines which Workable objects from the WTCollection are in the checked out state. For the Workable objects that are checked out, a WTValuedMap is created where the key is the checked out object, and the value is the working copy. This method is to be used as the multi-object replacement for workingCopyOf and originalCopyOf.

Supported API: false

Specified by:
getCheckedOutToWorkingMap in interface WorkInProgressService
Parameters:
workables -
Returns:
WTValuedMap
Throws:
WorkInProgressException
WTException
See Also:
workingCopyOf(wt.vc.wip.Workable), originalCopyOf(wt.vc.wip.Workable)

checkoutMap

public WTValuedMap checkoutMap(WTCollection objects,
                               Folder folder,
                               String note)
                        throws WTException,
                               WorkInProgressException,
                               NonLatestCheckoutException,
                               WTPropertyVetoException,
                               PersistenceException,
                               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: false

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
ObjectsAlreadyCheckedOutException

checkoutMap

public WTValuedMap checkoutMap(WTKeyedMap objects,
                               Folder folder)
                        throws WTException,
                               WorkInProgressException,
                               NonLatestCheckoutException,
                               WTPropertyVetoException,
                               PersistenceException,
                               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: false

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
ObjectsAlreadyCheckedOutException