Package net.officefloor.frame.api.build
Interface FunctionBuilder<F extends java.lang.Enum<F>>
-
- All Known Subinterfaces:
AdministrationBuilder<F,G>
,FlowBuilder<F>
,GovernanceBuilder<F>
,ManagedFunctionBuilder<O,F>
,ManagedObjectFunctionBuilder<O,F>
- All Known Implementing Classes:
AbstractFunctionBuilder
,AdministrationBuilderImpl
,GovernanceBuilderImpl
,ManagedFunctionBuilderImpl
public interface FunctionBuilder<F extends java.lang.Enum<F>>
Builds aFunctionState
provides linking to otherFunctionState
instances.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)
void
linkFlow(int flowIndex, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
void
linkFlow(F key, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
void
setResponsibleTeam(java.lang.String officeTeamName)
-
-
-
Method Detail
-
setResponsibleTeam
void setResponsibleTeam(java.lang.String officeTeamName)
-
linkFlow
void linkFlow(F key, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
- Parameters:
key
- Key identifying theFlow
.functionName
- Name of the initialManagedFunction
for theFlow
.argumentType
- Type of argument passed to the instigatedFlow
. May benull
to indicate no argument.isSpawnThreadState
-true
to instigate theFlow
in a spawnedThreadState
.
-
linkFlow
void linkFlow(int flowIndex, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
- Parameters:
flowIndex
- Index identifying theFlow
.functionName
- Name of the initialManagedFunction
for theFlow
.argumentType
- Type of argument passed to the instigatedFlow
. May benull
to indicate no argument.isSpawnThreadState
-true
to instigate theFlow
in a spawnedThreadState
.
-
addEscalation
void addEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)
Adds an
EscalationFlow
to theEscalationProcedure
for theManagedFunction
.The order in which the
EscalationFlow
instances are added is the order in which they are checked for handling escalation. Only oneEscalationFlow
is used to handle escalation and the first one covering the cause will be used. This is similar totry ... catch
blocks.- Parameters:
typeOfCause
- Type of cause handled by thisEscalationFlow
.functionName
- Name of theManagedFunction
to handle theEscalation
.
-
-