Package net.officefloor.frame.api.build
Interface ManagedFunctionBuilder<O extends Enum<O>,F extends Enum<F>>
- All Superinterfaces:
FlowBuilder<F>,FunctionBuilder<F>
- All Known Implementing Classes:
ManagedFunctionBuilderImpl
Builder of the
ManagedFunction.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(Object annotation) Adds the annotation for thisManagedFunction.voidaddGovernance(String governanceName) AddsGovernanceto thisManagedFunction.addManagedObject(String functionManagedObjectName, String officeManagedObjectName) Adds aManagedObjectbound to thisManagedFunction.voidlinkManagedObject(int managedObjectIndex, String scopeManagedObjectName, Class<?> objectType) Links in aManagedObjectto thisManagedFunction.voidlinkManagedObject(O key, String scopeManagedObjectName, Class<?> objectType) Links in aManagedObjectto thisManagedFunction.voidlinkParameter(int index, Class<?> parameterType) Links in the parameter for thisManagedFunction.voidlinkParameter(O key, Class<?> parameterType) Links in the parameter for thisManagedFunction.<E,f extends Enum<f>, G extends Enum<G>>
AdministrationBuilder<f,G> postAdminister(String administrationName, Class<E> extension, AdministrationFactory<E, f, G> administrationFactory) AddsAdministrationto be undertaken after thisManagedFunction.<E,f extends Enum<f>, G extends Enum<G>>
AdministrationBuilder<f,G> preAdminister(String administrationName, 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
setNextFunctionMethods inherited from interface net.officefloor.frame.api.build.FunctionBuilder
addEscalation, linkFlow, linkFlow, setResponsibleTeam
-
Method Details
-
addAnnotation
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)
It is also exposed to
Administrationto enable reflective administration.- Parameters:
annotation- Annotation.
- identification of this
-
linkParameter
Links in the parameter for thisManagedFunction.- Parameters:
key- Key identifying the parameter.parameterType- Type of the parameter.
-
linkParameter
Links in the parameter for thisManagedFunction.- Parameters:
index- Index identifying the parameter.parameterType- Type of the parameter.
-
linkManagedObject
Links in aManagedObjectto thisManagedFunction.- Parameters:
key- Key identifying theManagedObject.scopeManagedObjectName- Name of theManagedObjectwithin theManagedObjectScope.objectType- Type required by theManagedFunction.
-
linkManagedObject
Links in aManagedObjectto thisManagedFunction.- Parameters:
managedObjectIndex- Index of theManagedObject.scopeManagedObjectName- Name of theManagedObjectwithin theManagedObjectScope.objectType- Type required by theManagedFunction.
-
preAdminister
<E,f extends Enum<f>, AdministrationBuilder<f,G extends Enum<G>> G> preAdminister(String administrationName, 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 Enum<f>, AdministrationBuilder<f,G extends Enum<G>> G> postAdminister(String administrationName, 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
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(String functionManagedObjectName, 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.
-