wt.clients.lifecycle
Class LifeCycleTaskLogic

java.lang.Object
  extended bywt.clients.lifecycle.LifeCycleTaskLogic

public class LifeCycleTaskLogic
extends Object

Class LifeCycleTaskLogic provides static helper methods for manipulating LifeCycleManaged objects. These methods encapsulate the server-side processing necessary to manipulate LifeCycleManaged objects.

Supported API: false

Extendable: false

See Also:
LifeCycleManaged

Field Summary
private static String versionID
           
 
Constructor Summary
LifeCycleTaskLogic()
           
 
Method Summary
static String getLifeCycleName(LifeCycleManaged lc_object)
          Method getLifeCycleName returns the String name of the life cycle which the given LifeCycleManaged object is in.
static State getLifeCycleState(LifeCycleManaged lc_object)
          Method getLifeCycleState returns the the life cycle State which the given object is currently in.
static String getLifeCycleStateDisplay(LifeCycleManaged lc_object)
          Method getLifeCycleStateDisplay returns a displayable String representation of the current life cycle State the given object is in.
static String getTeamTemplateName(LifeCycleManaged lc_object)
          Method getTeamTemplateName returns the name of the TeamTemplate that the given object is associated with.
static boolean isRolePlayer(LifeCycleManaged lc_object, WTUser user, Role role)
          Method isRolePlayer determines if the given WTUser plays the given Role for the given LifeCycleManaged object.
static boolean isSubmitted(LifeCycleManaged lc_object)
          Method isSubmitted determines if the given LifeCycleManaged object has been submitted to the life cycle.
static LifeCycleManaged submit(LifeCycleManaged lc_object)
          Method submit submits the given LifeCycleManaged object for approval in its life cycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values
Constructor Detail

LifeCycleTaskLogic

public LifeCycleTaskLogic()
Method Detail

getLifeCycleName

public static String getLifeCycleName(LifeCycleManaged lc_object)
                               throws LifeCycleException
Method getLifeCycleName returns the String name of the life cycle which the given LifeCycleManaged object is in.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object for which the name of the life cycle is returned
Returns:
the String name which the given object is in
Throws:
LifeCycleException - if an error occurs trying to retrieve the life cycle name
See Also:
LifeCycleManaged

getLifeCycleState

public static State getLifeCycleState(LifeCycleManaged lc_object)
                               throws LifeCycleException
Method getLifeCycleState returns the the life cycle State which the given object is currently in.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object whose current life cycle state is returned
Returns:
the current life cycle State of the given object
Throws:
LifeCycleException - if an error occurs trying to retrieve the current life cycle state of the given object
See Also:
LifeCycleManaged, State

getLifeCycleStateDisplay

public static String getLifeCycleStateDisplay(LifeCycleManaged lc_object)
                                       throws LifeCycleException
Method getLifeCycleStateDisplay returns a displayable String representation of the current life cycle State the given object is in.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object for which a display version of its current state is returned
Returns:
a displayable String representation of the current life cycle state the given object is in
Throws:
LifeCycleException - if an error occurs trying to retrieve the life cycle state of the given object
See Also:
LifeCycleManaged

getTeamTemplateName

public static String getTeamTemplateName(LifeCycleManaged lc_object)
                                  throws LifeCycleException
Method getTeamTemplateName returns the name of the TeamTemplate that the given object is associated with.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object for which TeamTemplate name is returned
Returns:
the String name of the project the given object is associated with
Throws:
LifeCycleException - if an error occurs retrieving the teamTemplate name
See Also:
LifeCycleManaged, TeamTemplate

isRolePlayer

public static boolean isRolePlayer(LifeCycleManaged lc_object,
                                   WTUser user,
                                   Role role)
                            throws WTException
Method isRolePlayer determines if the given WTUser plays the given Role for the given LifeCycleManaged object.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object for which the given user playing the given role is test
user - the WTUser who is tested for playing the given role on the given object
role - the Role that the given user is tested for playing on the given object
Returns:
if true, then the given user plays the given role on the given object
Throws:
WTException - if an error occurs testing whether or not the given user plays the given role on the given object
See Also:
LifeCycleManaged, Role, WTUser

submit

public static LifeCycleManaged submit(LifeCycleManaged lc_object)
                               throws LifeCycleException,
                                      WTException
Method submit submits the given LifeCycleManaged object for approval in its life cycle.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object to be submitted
Returns:
the updated LifeCycleManaged object
Throws:
LifeCycleException - if an error occurs submitting the object for approval to the life cycle
WTException - if an error occurs submitting the object for approval to the life cycle
See Also:
isSubmitted(wt.lifecycle.LifeCycleManaged), LifeCycleManaged

isSubmitted

public static boolean isSubmitted(LifeCycleManaged lc_object)
                           throws LifeCycleException
Method isSubmitted determines if the given LifeCycleManaged object has been submitted to the life cycle.

Supported API: false

Extendable: false

Parameters:
lc_object - the LifeCycleManaged object to be submitted
Returns:
if true, the given LifeCycleManaged object has already been submitted to the life cycle
Throws:
LifeCycleException - if an error occurs testing whether or not the given object has been previously submitted