Package wt.vc.wip
Class WorkInProgressHelper
java.lang.Object
wt.vc.wip.WorkInProgressHelper
- All Implemented Interfaces:
Externalizable,Serializable
Provides the Work In Progress (WIP) service's Application Programming
Interface (API). This API includes static methods to checkin, checkout,
undo checkout, find the predecessor and successor(s) of an iteration,
find the original checked out copy of a working copy, find the working
copy of an original checked out copy, get cookie information, and get
search conditions to aid in a query. These methods can be categorized
as locally and remotely invokeable. The local methods are getters of
information, typically from cookies, that are held in the client or server.
The remote methods serve as wrappers to services that promote server-side
functionality to clients.
Note that the methods in this helper do not consider/handle "sandbox"
checkouts, but rather are specific to work-in-progress checkouts. The
lone exception to this is getState() which can return WorkInProgressState.CHECKED_OUT_TO_SANDBOX.
This state is now obsolete, but may still exist in customer databases.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WTCollectiongetCheckedOut(WTCollection objects) Given a collection of Workables, returns a collection containing only those objects that are checked out.protected static WTCollectiongetCheckedOut(WTCollection objects, WTPrincipal worker) Given a collection of Workables, returns a collection containing only those objects that are checked out.static SearchConditiongetSearchCondition(Class target, boolean checkedOut) Deprecated.static SearchConditiongetSearchCondition(Class targetClass, boolean searchEqual, WorkInProgressState... targetStates) Returns a search condition for any of the specified WIP state to be appended on a query.static SearchConditiongetSearchCondition(Class targetClass, WorkInProgressState targetState, boolean searchEqual) Returns a search condition for specified WIP state to be appended on a query.static SearchConditiongetSearchCondition_CI(Class target) Determines a search condition (containing a Checked In clause) to be appended on a query.static SearchConditiongetSearchCondition_CO(Class target) Determines a search condition (containing a Checked Out clause) to be appended on a query.static SearchConditiongetSearchCondition_WRK(Class target) Determines a search condition (containing a Working clause) to be appended on a query.static WorkInProgressStateGets the work-in-progress state of the object.static booleanisCheckedOut(Workable object) Tests if the workable object is checked out.static booleanisCheckedOut(Workable object, WTPrincipal worker) Tests if the workable object is checked out by the principal.static booleanisPrivateWorkingCopy(Workable object) Tests if the workable object is a private working copy An iteration can have many private workign copies.static booleanisReservedWorkingCopy(Workable object) Tests if the workable object is a reserved working copy There can only be one reserved working copy of an iteration.static booleanisWorkingCopy(Workable object) Tests if the workable object is a working copy.
-
Field Details
-
service
Supported API: true
-
-
Method Details
-
getState
Gets the work-in-progress state of the object. The object could be either checked in, checked out, or in work.
Supported API: true- Parameters:
object-- Returns:
- WorkInProgressState
- Throws:
WorkInProgressException
-
isCheckedOut
Tests if the workable object is checked out. True is returned if the object is either the original [checked out] copy, or the working copy of the original. Otherwise, false is returned.
Supported API: true- Parameters:
object-- Returns:
- boolean
- Throws:
WTException
-
isCheckedOut
Tests if the workable object is checked out by the principal. True is returned if the object is either the original [checked out] copy and its locker is the given principal, or the working copy of the original and its owner is the given principal. Otherwise, false is returned.
Supported API: true- Parameters:
object-worker-- Returns:
- boolean
- Throws:
WTException
-
getCheckedOut
protected static WTCollection getCheckedOut(WTCollection objects, WTPrincipal worker) throws WTException Given a collection of Workables, returns a collection containing only those objects that are checked out.
Supported API: true- Parameters:
objects-worker-- Returns:
- WTCollection
- Throws:
WTException
-
getCheckedOut
Given a collection of Workables, returns a collection containing only those objects that are checked out.
Supported API: true- Parameters:
objects-- Returns:
- WTCollection
- Throws:
WTException
-
isPrivateWorkingCopy
Tests if the workable object is a private working copy An iteration can have many private workign copies.
Supported API: true- Parameters:
object-- Returns:
- boolean
-
isReservedWorkingCopy
Tests if the workable object is a reserved working copy There can only be one reserved working copy of an iteration.
Supported API: true- Parameters:
object-- Returns:
- boolean
-
isWorkingCopy
Tests if the workable object is a working copy.
Supported API: true- Parameters:
object-- Returns:
- boolean
-
getSearchCondition
public static SearchCondition getSearchCondition(Class target, boolean checkedOut) throws WorkInProgressException, QueryException Deprecated.Determines a search condition to be appended on a query.
Supported API: true- Parameters:
target-checkedOut-- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-
getSearchCondition_WRK
public static SearchCondition getSearchCondition_WRK(Class target) throws WorkInProgressException, QueryException Determines a search condition (containing a Working clause) to be appended on a query.
Supported API: true- Parameters:
target-- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-
getSearchCondition_CO
public static SearchCondition getSearchCondition_CO(Class target) throws WorkInProgressException, QueryException Determines a search condition (containing a Checked Out clause) to be appended on a query.
Supported API: true- Parameters:
target-- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-
getSearchCondition_CI
public static SearchCondition getSearchCondition_CI(Class target) throws WorkInProgressException, QueryException Determines a search condition (containing a Checked In clause) to be appended on a query.
Supported API: true- Parameters:
target-- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-
getSearchCondition
public static SearchCondition getSearchCondition(Class targetClass, WorkInProgressState targetState, boolean searchEqual) throws WorkInProgressException, QueryException Returns a search condition for specified WIP state to be appended on a query.
Supported API: true- Parameters:
targetClass- Class type to apply search condition to.targetState- WIP state being searched for.searchEqual- Set true to search for objects with state equal to the one specified, and set false to search for objects with state not equal to the one specified.- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-
getSearchCondition
public static SearchCondition getSearchCondition(Class targetClass, boolean searchEqual, WorkInProgressState... targetStates) throws WorkInProgressException, QueryException Returns a search condition for any of the specified WIP state to be appended on a query.
Supported API: true- Parameters:
targetClass- Class type to apply search condition to.searchEqual- Set true to search for objects with state in the set specified, and set false to search for objects with state not in the list specified.targetStates- Set of WIP states being searched for.- Returns:
- SearchCondition
- Throws:
WorkInProgressExceptionQueryException
-