Package net.officefloor.frame.api.build
Interface ManagedFunctionBuilder<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
-
- All Superinterfaces:
FlowBuilder<F>,FunctionBuilder<F>
- All Known Implementing Classes:
ManagedFunctionBuilderImpl
public interface ManagedFunctionBuilder<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> extends FlowBuilder<F>
Builder of theManagedFunction.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAnnotation(java.lang.Object annotation)Adds the annotation for thisManagedFunction.voidaddGovernance(java.lang.String governanceName)AddsGovernanceto thisManagedFunction.DependencyMappingBuilderaddManagedObject(java.lang.String functionManagedObjectName, java.lang.String officeManagedObjectName)Adds aManagedObjectbound to thisManagedFunction.voidlinkManagedObject(int managedObjectIndex, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)Links in aManagedObjectto thisManagedFunction.voidlinkManagedObject(O key, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)Links in aManagedObjectto thisManagedFunction.voidlinkParameter(int index, java.lang.Class<?> parameterType)Links in the parameter for thisManagedFunction.voidlinkParameter(O key, java.lang.Class<?> parameterType)Links in the parameter for thisManagedFunction.<E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>>
AdministrationBuilder<f,G>postAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)AddsAdministrationto be undertaken after thisManagedFunction.<E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>>
AdministrationBuilder<f,G>preAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)AddsAdministrationto be undertaken before thisManagedFunction.voidsetAsynchronousFlowTimeout(long timeout)Specifies the timeout to forAsynchronousFlowinstances for thisManagedFunction.-
Methods inherited from interface net.officefloor.frame.api.build.FlowBuilder
setNextFunction
-
Methods inherited from interface net.officefloor.frame.api.build.FunctionBuilder
addEscalation, linkFlow, linkFlow, setResponsibleTeam
-
-
-
-
Method Detail
-
addAnnotation
void addAnnotation(java.lang.Object annotation)
Adds the annotation for this
ManagedFunction.This is exposed as is on the
FunctionManagerinterface for thisManagedFunctionto allow reflective:- identification of this
ManagedFunction(e.g. can check on type of this object) - means to trigger functionality on this
ManagedFunction(e.g. can expose functionality to be invoked)
- Parameters:
annotation- Annotation.
- identification of this
-
linkParameter
void linkParameter(O key, java.lang.Class<?> parameterType)
Links in the parameter for thisManagedFunction.- Parameters:
key- Key identifying the parameter.parameterType- Type of the parameter.
-
linkParameter
void linkParameter(int index, java.lang.Class<?> parameterType)Links in the parameter for thisManagedFunction.- Parameters:
index- Index identifying the parameter.parameterType- Type of the parameter.
-
linkManagedObject
void linkManagedObject(O key, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)
Links in aManagedObjectto thisManagedFunction.- Parameters:
key- Key identifying theManagedObject.scopeManagedObjectName- Name of theManagedObjectwithin theManagedObjectScope.objectType- Type required by theManagedFunction.
-
linkManagedObject
void linkManagedObject(int managedObjectIndex, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)Links in aManagedObjectto thisManagedFunction.- Parameters:
managedObjectIndex- Index of theManagedObject.scopeManagedObjectName- Name of theManagedObjectwithin theManagedObjectScope.objectType- Type required by theManagedFunction.
-
preAdminister
<E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>> AdministrationBuilder<f,G> preAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)
AddsAdministrationto be undertaken before thisManagedFunction.- Type Parameters:
E- Extension type.f-Flowkey type.G-Governancekey type.- Parameters:
administrationName- Name of theAdministration.extension- Extension type forAdministration.administrationFactory-AdministrationFactory.- Returns:
AdministrationBuilderto build theAdministration.
-
postAdminister
<E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>> AdministrationBuilder<f,G> postAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)
AddsAdministrationto be undertaken after thisManagedFunction.- Type Parameters:
E- Extension type.f-Flowkey type.G-Governancekey type.- Parameters:
administrationName- Name of theAdministration.extension- Extension type forAdministration.administrationFactory-AdministrationFactory.- Returns:
AdministrationBuilderto build theAdministration.
-
addGovernance
void addGovernance(java.lang.String governanceName)
Adds
Governanceto thisManagedFunction.In other words, to execute this
ManagedFunctiontheGovernancewill be automatically activated before theManagedFunctionis executed (or stay active from previousManagedFunction).The
Governancewill be:- enforced when either a
ManagedFunctiondoes not require theGovernanceor theThreadStatecompletes. - disregarded when an escalation occurs to a
ManagedFunctionnot requiring theGovernance. Note that this does allow theGovernanceto stay active should theEscalationManagedFunctionrequire theGovernance. - Manually managed by an
Administration
- Parameters:
governanceName- Name of theGovernance.
- enforced when either a
-
addManagedObject
DependencyMappingBuilder addManagedObject(java.lang.String functionManagedObjectName, java.lang.String officeManagedObjectName)
Adds a
ManagedObjectbound to thisManagedFunction.Dependency scope:
- Other
ManagedObjectinstances added via this method. ThreadStateboundManagedObjectinstances.ProcessStateboundManagedObjectinstances.
- Parameters:
functionManagedObjectName- Name of theManagedObjectto be referenced locally by thisManagedFunction.officeManagedObjectName- Name of theManagedObjectreferenced locally within theOffice.- Returns:
DependencyMappingBuilder.
- Other
-
setAsynchronousFlowTimeout
void setAsynchronousFlowTimeout(long timeout)
Specifies the timeout to forAsynchronousFlowinstances for thisManagedFunction.- Parameters:
timeout- Timeout.
-
-