com.starteam
Class Workflow.Step

java.lang.Object
  extended by com.starteam.Workflow.Step
Enclosing class:
Workflow

public static class Workflow.Step
extends java.lang.Object

A Step represents a State in the Workflow State Machine Each step represents an EnmeratedValue from the legal set for the workflow definition's EnumeratedProperty


Nested Class Summary
static class Workflow.Step.WebCacheStep
          A Step Accessor for the Web Cache Object Model
 
Method Summary
 PropertyCollection getAccessDeniedProperties(ViewMember artifact)
          returns the set of properties that must be denied access (hidden) when the workflow property for the specified artifact is in this state
 PropertyCollection getAccessGrantedProperties(ViewMember artifact)
          returns the set of properties that may be granted read only access when the workflow property for the specified artifact is in this state
 java.lang.Object getAssignableValue(Property src, java.lang.Object state, Property trgt, boolean interpret)
          Returns the assignable value of the target property driven by dynamic default initialization when the source property changes to the new state note that setting state to NULL is a special case meaning the 'otherwise' or default condition Note also that the information provided here is extracted directly from the .xml, with context only if available.
 PropertyCollection getInitializedProperties(ViewMember artifact)
          returns the set of properties whose values were automatically initialized when the workflow entered this step.
 Workflow.Step[] getNextSteps(ViewMember artifact)
          returns the set of steps that can be transitioned to from this step
 EnumeratedValue[] getPermittedStateTransitions(ViewMember artifact)
          returns the set of Enumerated Values that this artifact may transition to from this state
 User[] getPermittedUsers(ViewMember artifact, ObjectProperty prprty)
          Returns the set of users who are possible legal values for this property in this state
 PropertyCollection getRequiredProperties()
          Returns the set of required properties at this step, whether or not these properties have been initialized for a particular item at that step
 PropertyCollection getRequiredProperties(ViewMember artifact)
          returns the set of properties that require non-null or non-empty values when the workflow property for the specified artifact is in this state
 EnumeratedValue[] getSelectableValues(Property src, java.lang.Object state, EnumeratedProperty trgt)
          Returns the (sub)set of enumerated values of the target property that are selectable, or specifically candidates for allowable values when the source property changes to the new state once again, based on dynamic default initialization note that setting state to NULL is a special case meaning the 'otherwise' or default condition
 PropertyCollection getSourceProperties()
          Returns the set of source properties that trigger dynamic default initialization when in this step.
 PropertyCollection getTargetProperties(Property src, java.lang.Object state)
          Returns the set of target properties whose values will change, triggered by a change of the source property to the new state based on dynamic default initialization note that setting state to NULL is a special case meaning the 'otherwise' or default condition The returned set of target properties can be of any type, e.g.
 EnumeratedValue getValue()
          Returns the value of this step
 boolean includeSelectedValue(Property src, java.lang.Object state, EnumeratedProperty trgt)
          Returns true if the client should retain a field's previously selected value false if the client should remove a field's previously selected value in the event that the selected value does not appear in the current list of available selections note that setting state to NULL is a special case meaning the 'otherwise' or default condition This boolean is primarily a hint to the UI
 boolean isAuthorized(ViewMember artifact)
          returns true if the logged in user is authorized to transition this artifact to its next step
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValue

public EnumeratedValue getValue()
Returns the value of this step

Returns:
the value of this step

getRequiredProperties

public PropertyCollection getRequiredProperties(ViewMember artifact)
returns the set of properties that require non-null or non-empty values when the workflow property for the specified artifact is in this state

Parameters:
artifact - the ViewMember whose properties need to be validated in this state
Returns:
the set of properties that require non-null or non-empty values

getRequiredProperties

public PropertyCollection getRequiredProperties()
Returns the set of required properties at this step, whether or not these properties have been initialized for a particular item at that step

Returns:
the set of required properties at this step

getAccessGrantedProperties

public PropertyCollection getAccessGrantedProperties(ViewMember artifact)
returns the set of properties that may be granted read only access when the workflow property for the specified artifact is in this state

Parameters:
artifact - the ViewMember whose properties need to be shown in this state
Returns:
the set of properties that may be granted read only access

getAccessDeniedProperties

public PropertyCollection getAccessDeniedProperties(ViewMember artifact)
returns the set of properties that must be denied access (hidden) when the workflow property for the specified artifact is in this state

Parameters:
artifact - the ViewMember whose properties need to be hidden in this state
Returns:
the set of properties that must be denied access

getPermittedStateTransitions

public EnumeratedValue[] getPermittedStateTransitions(ViewMember artifact)
returns the set of Enumerated Values that this artifact may transition to from this state

Parameters:
artifact - the ViewMember which is about to transition to the next step
Returns:
the set of Enumerated Values that this artifact may transition to

getNextSteps

public Workflow.Step[] getNextSteps(ViewMember artifact)
returns the set of steps that can be transitioned to from this step

Parameters:
artifact - the ViewMember at a given step (possibly ready to transition to the next step)
Returns:
the set of steps that can be transitioned to from this step

getInitializedProperties

public PropertyCollection getInitializedProperties(ViewMember artifact)
returns the set of properties whose values were automatically initialized when the workflow entered this step.

Parameters:
artifact - the ViewMember in this state
Returns:
the set of properties whose values were initialized in this step

getPermittedUsers

public User[] getPermittedUsers(ViewMember artifact,
                                ObjectProperty prprty)
Returns the set of users who are possible legal values for this property in this state

Parameters:
artifact - the ViewMember whose user property is about to be assigned
prprty - the property which is about to transition to the next step
Returns:
the set of users who are possible legal values for this property in this state

isAuthorized

public boolean isAuthorized(ViewMember artifact)
returns true if the logged in user is authorized to transition this artifact to its next step

Parameters:
artifact - the ViewMember which is about to transition to the next step
Returns:
true if the logged in user is authorized

getSourceProperties

public PropertyCollection getSourceProperties()
Returns the set of source properties that trigger dynamic default initialization when in this step. Typically, source properties are enumerated properties

Returns:
the set of source properties that trigger dynamic defaults

getTargetProperties

public PropertyCollection getTargetProperties(Property src,
                                              java.lang.Object state)
Returns the set of target properties whose values will change, triggered by a change of the source property to the new state based on dynamic default initialization note that setting state to NULL is a special case meaning the 'otherwise' or default condition The returned set of target properties can be of any type, e.g. Text, User, Enumerated etc.

Parameters:
src - the source property
state - the new state that the source property can transition to
Returns:
the set of target properties affected by the transition of the source property to the new state

includeSelectedValue

public boolean includeSelectedValue(Property src,
                                    java.lang.Object state,
                                    EnumeratedProperty trgt)
Returns true if the client should retain a field's previously selected value false if the client should remove a field's previously selected value in the event that the selected value does not appear in the current list of available selections note that setting state to NULL is a special case meaning the 'otherwise' or default condition This boolean is primarily a hint to the UI

Parameters:
src - The source property
state - the new state that the source property can transition to
trgt - The affected target enumerated property (the include_selected xml attribute of the enumLimitations node in the workflow designer .xml)
Returns:
true if the client should retain a field's previously selected value

getSelectableValues

public EnumeratedValue[] getSelectableValues(Property src,
                                             java.lang.Object state,
                                             EnumeratedProperty trgt)
Returns the (sub)set of enumerated values of the target property that are selectable, or specifically candidates for allowable values when the source property changes to the new state once again, based on dynamic default initialization note that setting state to NULL is a special case meaning the 'otherwise' or default condition

Parameters:
src - The source property
state - the new state that the source property can transition to
trgt - The affected target enumerated property, which can now transition to a subset of selectable states (also defined as the enumLimitation set in the workflow designer .xml)
Returns:
the allowed subset of enumerated values for the target property

getAssignableValue

public java.lang.Object getAssignableValue(Property src,
                                           java.lang.Object state,
                                           Property trgt,
                                           boolean interpret)
Returns the assignable value of the target property driven by dynamic default initialization when the source property changes to the new state note that setting state to NULL is a special case meaning the 'otherwise' or default condition Note also that the information provided here is extracted directly from the .xml, with context only if available. If the context is associated with a specific Artifact, then that context resolution can only occur when the source property is actually transitioned to the appropriate target state

Parameters:
src - The source property
state - the new state that the source property can transition to
trgt - The affected target property, which will transition to a new state based on the assignable value as specified in the workflow designer .xml)
interpret - if true, strings like , and return appropriate object instances interpreted at runtime, e.g. User, Time, Label if false, returns the raw strings for the client to interpret as desired
Returns:
the (single valued) assignable value of the target property


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.