Package lumis.portal.interactiveprocess
Class Step
- java.lang.Object
-
- lumis.portal.interactiveprocess.Step
-
- All Implemented Interfaces:
java.io.Serializable
,IStep
@StableMinor(version="17.0", sinceVersion="7.1") public class Step extends java.lang.Object implements IStep, java.io.Serializable
Aprocess
step.- Since:
- 7.1.0
- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Step(IStepExecutable executable)
Creates a step with the givenexecutable
.Step(IStepExecutable executable, boolean mandatory)
Creates a step with the givenexecutable
indicating whether it is mandatory or not.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEnvironmentRestriction(java.lang.String environmentTag, EnvironmentType environmentType)
Adds an environment restriction with the given tag and type (if it does not exist yet).StepOutcome
execute()
Executes this step and returns the outcome.
If this step has already been executed and it's outcome isStepOutcomeStatus.SUCCESS
orStepOutcomeStatus.IGNORED
anIllegalStateException
is raised.java.lang.String
getDescription()
Returns the description of the step.IStepExecutable
getExecutable()
Returns this step's executable.java.lang.String
getId()
Returns the Step Id.java.util.Date
getIgnoredDate()
Returns the date time that indicates when the step was ignored by user.java.lang.String
getIgnoredUserId()
Returns the userId who ignored the step.java.lang.String
getMessage()
Returns the message of the step.IStepOutcome
getOutcome()
Returns the outcome of this step.IProcess
getProcess()
Returns the process owner of the step.int
getStepNumber()
Returns the number of this step.boolean
isMandatory()
Returns whether this step is mandatory.void
removeEnvironmentRestriction(java.lang.String environmentTag, EnvironmentType environmentType)
Removes the environment restriction with the given tag and type.
-
-
-
Constructor Detail
-
Step
public Step(IStepExecutable executable)
Creates a step with the givenexecutable
.- Parameters:
executable
- the executable.- Since:
- 7.1.0
-
Step
public Step(IStepExecutable executable, boolean mandatory)
Creates a step with the givenexecutable
indicating whether it is mandatory or not.- Parameters:
executable
- the executable.mandatory
- indicates whether the step is mandatory or not.- Since:
- 7.1.0
-
-
Method Detail
-
execute
public StepOutcome execute() throws PortalException
Executes this step and returns the outcome.
If this step has already been executed and it's outcome isStepOutcomeStatus.SUCCESS
orStepOutcomeStatus.IGNORED
anIllegalStateException
is raised.- Returns:
- the outcome.
- Throws:
PortalException
- Since:
- 7.1.0
-
getExecutable
public IStepExecutable getExecutable() throws PortalException
Returns this step's executable.- Returns:
- this step's executable.
- Throws:
PortalException
- if any error occurs during the process.- Since:
- 7.1.0
-
isMandatory
public boolean isMandatory()
Description copied from interface:IStep
Returns whether this step is mandatory.- Specified by:
isMandatory
in interfaceIStep
- Returns:
- whether this step is mandatory.
-
getOutcome
public IStepOutcome getOutcome()
Returns the outcome of this step. If this step hasn't been executed yet,null
will be returned.- Returns:
- the outcome of this step.
- Since:
- 7.1.0
-
getStepNumber
public int getStepNumber()
Description copied from interface:IStep
Returns the number of this step.- Specified by:
getStepNumber
in interfaceIStep
- Returns:
- the number of this step.
-
addEnvironmentRestriction
public void addEnvironmentRestriction(java.lang.String environmentTag, EnvironmentType environmentType)
Adds an environment restriction with the given tag and type (if it does not exist yet). If both arguments arenull
anIllegalArgumentException
will be raised.- Parameters:
environmentTag
- the environment tag.environmentType
- the environment type.- Throws:
java.lang.IllegalArgumentException
- if both parameters arenull
.- Since:
- 7.1.0
-
removeEnvironmentRestriction
public void removeEnvironmentRestriction(java.lang.String environmentTag, EnvironmentType environmentType)
Removes the environment restriction with the given tag and type. If both arguments arenull
anIllegalArgumentException
will be raised.- Parameters:
environmentTag
- the environment tag.environmentType
- the environment type.- Throws:
java.lang.IllegalArgumentException
- if both parameters arenull
.- Since:
- 7.1.0
-
getId
public java.lang.String getId()
Returns the Step Id.- Returns:
- the Step Id.
- Since:
- 7.1.0
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IStep
Returns the description of the step.- Specified by:
getDescription
in interfaceIStep
- Returns:
- the description of the step.
-
getMessage
public java.lang.String getMessage()
Description copied from interface:IStep
Returns the message of the step.- Specified by:
getMessage
in interfaceIStep
- Returns:
- the message of the step.
-
getProcess
public IProcess getProcess()
Description copied from interface:IStep
Returns the process owner of the step.- Specified by:
getProcess
in interfaceIStep
- Returns:
- the process owner of the step.
-
getIgnoredDate
public java.util.Date getIgnoredDate()
Description copied from interface:IStep
Returns the date time that indicates when the step was ignored by user. If the step wasn't ignored, this information will benull
.- Specified by:
getIgnoredDate
in interfaceIStep
- Returns:
- the date time that indicates when the step was ignored by user.
null
if the step wasn't ignored.
-
getIgnoredUserId
public java.lang.String getIgnoredUserId()
Description copied from interface:IStep
Returns the userId who ignored the step. If the step wasn't ignored, this information will benull
.- Specified by:
getIgnoredUserId
in interfaceIStep
- Returns:
- the userId who ignored the step.
null
if the step wasn't ignored.
-
-