Class AbstractFunctionBuilder<F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.frame.impl.construct.function.AbstractFunctionBuilder<F>
-
- All Implemented Interfaces:
FunctionBuilder<F>
,FunctionConfiguration<F>
- Direct Known Subclasses:
AdministrationBuilderImpl
,GovernanceBuilderImpl
,ManagedFunctionBuilderImpl
public abstract class AbstractFunctionBuilder<F extends java.lang.Enum<F>> extends java.lang.Object implements FunctionBuilder<F>, FunctionConfiguration<F>
AbstractFunctionBuilder
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractFunctionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)
EscalationConfiguration[]
getEscalations()
Obtains theEscalationConfiguration
instances.FlowConfiguration<F>[]
getFlowConfiguration()
Obtains the configuration of theFlow
instances for thisManagedFunctionLogic
.java.lang.String
getResponsibleTeamName()
Obtains the name of theTeam
to execute theManagedFunctionLogic
.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
public void setResponsibleTeam(java.lang.String officeTeamName)
Description copied from interface:FunctionBuilder
Specifies the
Team
by itsOffice
registered name that that is responsible for this node.Should this not be specified, any
Team
will be used.- Specified by:
setResponsibleTeam
in interfaceFunctionBuilder<F extends java.lang.Enum<F>>
- Parameters:
officeTeamName
- Name of theTeam
within theOffice
.
-
linkFlow
public void linkFlow(F key, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
Description copied from interface:FunctionBuilder
- Specified by:
linkFlow
in interfaceFunctionBuilder<F extends java.lang.Enum<F>>
- 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
public void linkFlow(int flowIndex, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
Description copied from interface:FunctionBuilder
- Specified by:
linkFlow
in interfaceFunctionBuilder<F extends java.lang.Enum<F>>
- 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
public void addEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)
Description copied from interface:FunctionBuilder
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.- Specified by:
addEscalation
in interfaceFunctionBuilder<F extends java.lang.Enum<F>>
- Parameters:
typeOfCause
- Type of cause handled by thisEscalationFlow
.functionName
- Name of theManagedFunction
to handle theEscalation
.
-
getResponsibleTeamName
public java.lang.String getResponsibleTeamName()
Description copied from interface:FunctionConfiguration
Obtains the name of theTeam
to execute theManagedFunctionLogic
.- Specified by:
getResponsibleTeamName
in interfaceFunctionConfiguration<F extends java.lang.Enum<F>>
- Returns:
- Name of
Team
. May benull
to use anyTeam
.
-
getFlowConfiguration
public FlowConfiguration<F>[] getFlowConfiguration()
Description copied from interface:FunctionConfiguration
Obtains the configuration of theFlow
instances for thisManagedFunctionLogic
.- Specified by:
getFlowConfiguration
in interfaceFunctionConfiguration<F extends java.lang.Enum<F>>
- Returns:
- Configuration of
Flow
instances for thisManagedFunctionLogic
.
-
getEscalations
public EscalationConfiguration[] getEscalations()
Description copied from interface:FunctionConfiguration
Obtains theEscalationConfiguration
instances.- Specified by:
getEscalations
in interfaceFunctionConfiguration<F extends java.lang.Enum<F>>
- Returns:
EscalationConfiguration
instances.
-
-