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 voidaddEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)EscalationConfiguration[]getEscalations()Obtains theEscalationConfigurationinstances.FlowConfiguration<F>[]getFlowConfiguration()Obtains the configuration of theFlowinstances for thisManagedFunctionLogic.java.lang.StringgetResponsibleTeamName()Obtains the name of theTeamto execute theManagedFunctionLogic.voidlinkFlow(int flowIndex, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)voidlinkFlow(F key, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)voidsetResponsibleTeam(java.lang.String officeTeamName)
-
-
-
Method Detail
-
setResponsibleTeam
public void setResponsibleTeam(java.lang.String officeTeamName)
Description copied from interface:FunctionBuilderSpecifies the
Teamby itsOfficeregistered name that that is responsible for this node.Should this not be specified, any
Teamwill be used.- Specified by:
setResponsibleTeamin interfaceFunctionBuilder<F extends java.lang.Enum<F>>- Parameters:
officeTeamName- Name of theTeamwithin theOffice.
-
linkFlow
public void linkFlow(F key, java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)
Description copied from interface:FunctionBuilder- Specified by:
linkFlowin interfaceFunctionBuilder<F extends java.lang.Enum<F>>- Parameters:
key- Key identifying theFlow.functionName- Name of the initialManagedFunctionfor theFlow.argumentType- Type of argument passed to the instigatedFlow. May benullto indicate no argument.isSpawnThreadState-trueto instigate theFlowin 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:
linkFlowin interfaceFunctionBuilder<F extends java.lang.Enum<F>>- Parameters:
flowIndex- Index identifying theFlow.functionName- Name of the initialManagedFunctionfor theFlow.argumentType- Type of argument passed to the instigatedFlow. May benullto indicate no argument.isSpawnThreadState-trueto instigate theFlowin a spawnedThreadState.
-
addEscalation
public void addEscalation(java.lang.Class<? extends java.lang.Throwable> typeOfCause, java.lang.String functionName)Description copied from interface:FunctionBuilderAdds an
EscalationFlowto theEscalationProcedurefor theManagedFunction.The order in which the
EscalationFlowinstances are added is the order in which they are checked for handling escalation. Only oneEscalationFlowis used to handle escalation and the first one covering the cause will be used. This is similar totry ... catchblocks.- Specified by:
addEscalationin interfaceFunctionBuilder<F extends java.lang.Enum<F>>- Parameters:
typeOfCause- Type of cause handled by thisEscalationFlow.functionName- Name of theManagedFunctionto handle theEscalation.
-
getResponsibleTeamName
public java.lang.String getResponsibleTeamName()
Description copied from interface:FunctionConfigurationObtains the name of theTeamto execute theManagedFunctionLogic.- Specified by:
getResponsibleTeamNamein interfaceFunctionConfiguration<F extends java.lang.Enum<F>>- Returns:
- Name of
Team. May benullto use anyTeam.
-
getFlowConfiguration
public FlowConfiguration<F>[] getFlowConfiguration()
Description copied from interface:FunctionConfigurationObtains the configuration of theFlowinstances for thisManagedFunctionLogic.- Specified by:
getFlowConfigurationin interfaceFunctionConfiguration<F extends java.lang.Enum<F>>- Returns:
- Configuration of
Flowinstances for thisManagedFunctionLogic.
-
getEscalations
public EscalationConfiguration[] getEscalations()
Description copied from interface:FunctionConfigurationObtains theEscalationConfigurationinstances.- Specified by:
getEscalationsin interfaceFunctionConfiguration<F extends java.lang.Enum<F>>- Returns:
EscalationConfigurationinstances.
-
-