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 void
addAnnotation(java.lang.Object annotation)
Adds the annotation for thisManagedFunction
.void
addGovernance(java.lang.String governanceName)
AddsGovernance
to thisManagedFunction
.DependencyMappingBuilder
addManagedObject(java.lang.String functionManagedObjectName, java.lang.String officeManagedObjectName)
Adds aManagedObject
bound to thisManagedFunction
.void
linkManagedObject(int managedObjectIndex, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)
Links in aManagedObject
to thisManagedFunction
.void
linkManagedObject(O key, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)
Links in aManagedObject
to thisManagedFunction
.void
linkParameter(int index, java.lang.Class<?> parameterType)
Links in the parameter for thisManagedFunction
.void
linkParameter(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)
AddsAdministration
to 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)
AddsAdministration
to be undertaken before thisManagedFunction
.void
setAsynchronousFlowTimeout(long timeout)
Specifies the timeout to forAsynchronousFlow
instances 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
FunctionManager
interface for thisManagedFunction
to 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 aManagedObject
to thisManagedFunction
.- Parameters:
key
- Key identifying theManagedObject
.scopeManagedObjectName
- Name of theManagedObject
within theManagedObjectScope
.objectType
- Type required by theManagedFunction
.
-
linkManagedObject
void linkManagedObject(int managedObjectIndex, java.lang.String scopeManagedObjectName, java.lang.Class<?> objectType)
Links in aManagedObject
to thisManagedFunction
.- Parameters:
managedObjectIndex
- Index of theManagedObject
.scopeManagedObjectName
- Name of theManagedObject
within 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)
AddsAdministration
to be undertaken before thisManagedFunction
.- Type Parameters:
E
- Extension type.f
-Flow
key type.G
-Governance
key type.- Parameters:
administrationName
- Name of theAdministration
.extension
- Extension type forAdministration
.administrationFactory
-AdministrationFactory
.- Returns:
AdministrationBuilder
to 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)
AddsAdministration
to be undertaken after thisManagedFunction
.- Type Parameters:
E
- Extension type.f
-Flow
key type.G
-Governance
key type.- Parameters:
administrationName
- Name of theAdministration
.extension
- Extension type forAdministration
.administrationFactory
-AdministrationFactory
.- Returns:
AdministrationBuilder
to build theAdministration
.
-
addGovernance
void addGovernance(java.lang.String governanceName)
Adds
Governance
to thisManagedFunction
.In other words, to execute this
ManagedFunction
theGovernance
will be automatically activated before theManagedFunction
is executed (or stay active from previousManagedFunction
).The
Governance
will be:- enforced when either a
ManagedFunction
does not require theGovernance
or theThreadState
completes. - disregarded when an escalation occurs to a
ManagedFunction
not requiring theGovernance
. Note that this does allow theGovernance
to stay active should theEscalation
ManagedFunction
require 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
ManagedObject
bound to thisManagedFunction
.Dependency scope:
- Other
ManagedObject
instances added via this method. ThreadState
boundManagedObject
instances.ProcessState
boundManagedObject
instances.
- Parameters:
functionManagedObjectName
- Name of theManagedObject
to be referenced locally by thisManagedFunction
.officeManagedObjectName
- Name of theManagedObject
referenced locally within theOffice
.- Returns:
DependencyMappingBuilder
.
- Other
-
setAsynchronousFlowTimeout
void setAsynchronousFlowTimeout(long timeout)
Specifies the timeout to forAsynchronousFlow
instances for thisManagedFunction
.- Parameters:
timeout
- Timeout.
-
-