Class ManagedFunctionMetaDataImpl<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.frame.impl.execute.managedfunction.ManagedFunctionMetaDataImpl<O,F>
-
- All Implemented Interfaces:
ManagedFunctionLogicMetaData
,ManagedFunctionMetaData<O,F>
public class ManagedFunctionMetaDataImpl<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> extends java.lang.Object implements ManagedFunctionMetaData<O,F>
Meta-data of aManagedFunction
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedFunctionMetaDataImpl(java.lang.String functionName, ManagedFunctionFactory<O,F> functionFactory, java.lang.Object[] annotations, java.lang.Class<?> parameterType, TeamManagement responsibleTeam, ManagedObjectIndex[] functionIndexedManagedObjects, ManagedObjectMetaData<?>[] functionBoundManagedObjects, boolean[] requiredGovernance, long asynchronousFlowTimeout, AssetManagerReference asynchronousFlowsAssetManagerReference, java.util.logging.Logger logger)
Initiate with details of the meta-data for theManagedFunction
.
-
Method Summary
-
-
-
Constructor Detail
-
ManagedFunctionMetaDataImpl
public ManagedFunctionMetaDataImpl(java.lang.String functionName, ManagedFunctionFactory<O,F> functionFactory, java.lang.Object[] annotations, java.lang.Class<?> parameterType, TeamManagement responsibleTeam, ManagedObjectIndex[] functionIndexedManagedObjects, ManagedObjectMetaData<?>[] functionBoundManagedObjects, boolean[] requiredGovernance, long asynchronousFlowTimeout, AssetManagerReference asynchronousFlowsAssetManagerReference, java.util.logging.Logger logger)
Initiate with details of the meta-data for theManagedFunction
.- Parameters:
functionName
- Name of theManagedFunction
.functionFactory
-ManagedFunctionFactory
to create theManagedFunction
of theManagedFunctionMetaData
.annotations
- Differentiators.parameterType
- Parameter type of thisManagedFunction
.responsibleTeam
-TeamManagement
of theTeam
responsible for executing thisManagedFunction
. May benull
.functionIndexedManagedObjects
- Translates theManagedFunction
index to theManagedObjectIndex
to obtain theManagedObject
for theManagedFunction
.functionBoundManagedObjects
-ManagedObjectMetaData
of theManagedObject
instances bound to theManagedFunction
.requiredGovernance
- RequiredGovernance
.asynchronousFlowTimeout
-AsynchronousFlow
timeout.asynchronousFlowsAssetManagerReference
-AssetManagerReference
for the invokedAsynchronousFlow
instances.logger
-Logger
forManagedFunctionContext
.
-
-
Method Detail
-
loadOfficeMetaData
public void loadOfficeMetaData(OfficeMetaData officeMetaData, FlowMetaData[] flowMetaData, ManagedFunctionMetaData<?,?> nextFunctionMetaData, EscalationProcedure escalationProcedure, ManagedFunctionAdministrationMetaData<?,?,?>[] preAdministration, ManagedFunctionAdministrationMetaData<?,?,?>[] postAdministration, ManagedObjectIndex[] requiredManagedObjects)
Loads the remaining state of thisManagedFunctionMetaData
.- Parameters:
officeMetaData
-OfficeMetaData
.flowMetaData
- Meta-data of the availableFlow
instances from thisManagedFunction
.nextFunctionMetaData
-ManagedFunctionMetaData
of the nextManagedFunction
.escalationProcedure
-EscalationProcedure
for exceptions of theManagedFunction
of thisManagedFunctionMetaData
.preAdministration
-ManagedFunctionAdministrationMetaData
specifying theAdministration
instances to be completed before executing theManagedFunction
.postAdministration
-ManagedFunctionAdministrationMetaData
specifying theAdministration
instances to be completed after executing theManagedFunction
.requiredManagedObjects
-ManagedObjectIndex
instances identifying theManagedObject
instances that must be loaded before theManagedFunction
may be executed.
-
getFunctionName
public java.lang.String getFunctionName()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains the name of theManagedFunctionLogic
.- Specified by:
getFunctionName
in interfaceManagedFunctionLogicMetaData
- Returns:
- Name of the
ManagedFunctionLogic
.
-
getManagedFunctionFactory
public ManagedFunctionFactory<O,F> getManagedFunctionFactory()
Description copied from interface:ManagedFunctionMetaData
- Specified by:
getManagedFunctionFactory
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
ManagedFunctionFactory
-
getAnnotations
public java.lang.Object[] getAnnotations()
Description copied from interface:ManagedFunctionMetaData
Obtains the annotations for theManagedFunction
.- Specified by:
getAnnotations
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Annotations.
-
getParameterType
public java.lang.Class<?> getParameterType()
Description copied from interface:ManagedFunctionMetaData
Obtains the parameter type for theManagedFunction
.- Specified by:
getParameterType
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Parameter type for the
ManagedFunction
. May benull
to indicate no parameter.
-
getLogger
public java.util.logging.Logger getLogger()
Description copied from interface:ManagedFunctionMetaData
Obtains theLogger
forManagedFunctionContext
.- Specified by:
getLogger
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
Logger
forManagedFunctionContext
.
-
getResponsibleTeam
public TeamManagement getResponsibleTeam()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theTeamManagement
responsible for completion of theFunctionState
.- Specified by:
getResponsibleTeam
in interfaceManagedFunctionLogicMetaData
- Returns:
TeamManagement
responsible for completion of theFunctionState
. May benull
to enable anyTeam
to execute theFunctionState
.
-
getRequiredManagedObjects
public ManagedObjectIndex[] getRequiredManagedObjects()
Description copied from interface:ManagedFunctionMetaData
Obtains the
ManagedObjectIndex
instances identifying theManagedObject
instances that must be loaded before theManagedFunction
may be executed.The order of the
ManagedObjectIndex
instances must be respected as they are sorted to enable appropriateCoordinatingManagedObject
to co-ordinate with dependencies.- Specified by:
getRequiredManagedObjects
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Listing of
ManagedObjectIndex
instances.
-
getRequiredGovernance
public boolean[] getRequiredGovernance()
Description copied from interface:ManagedFunctionMetaData
Obtains the activation flags for theGovernance
. The index into the array identifies theGovernance
for the respective activation flag.- Specified by:
getRequiredGovernance
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Activation flags for the
Governance
.
-
getManagedObject
public ManagedObjectIndex getManagedObject(int managedObjectIndex)
Description copied from interface:ManagedFunctionMetaData
Obtains theManagedObjectIndex
for theManagedFunction
index.- Specified by:
getManagedObject
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Parameters:
managedObjectIndex
-ManagedObjectIndex
for theManagedFunction
index.- Returns:
ManagedObjectIndex
to obtain theManagedObject
for theManagedFunction
.
-
getFlow
public FlowMetaData getFlow(int flowIndex)
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theFlowMetaData
of the specifiedFlow
.- Specified by:
getFlow
in interfaceManagedFunctionLogicMetaData
- Parameters:
flowIndex
- Index of theFlow
.- Returns:
FlowMetaData
of the specifiedFlow
.
-
getAsynchronousFlowTimeout
public long getAsynchronousFlowTimeout()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains the time out forAsynchronousFlow
instigated by theManagedFunction
.- Specified by:
getAsynchronousFlowTimeout
in interfaceManagedFunctionLogicMetaData
- Returns:
- Time out for
AsynchronousFlow
instigated by theManagedFunction
.
-
getAsynchronousFlowManagerReference
public AssetManagerReference getAsynchronousFlowManagerReference()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theAssetManagerReference
that managesAsynchronousFlow
instances instigated by theManagedFunction
.- Specified by:
getAsynchronousFlowManagerReference
in interfaceManagedFunctionLogicMetaData
- Returns:
AssetManagerReference
that managesAsynchronousFlow
instances instigated by theManagedFunction
.
-
getEscalationProcedure
public EscalationProcedure getEscalationProcedure()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theEscalationProcedure
for theManagedFunctionLogic
.- Specified by:
getEscalationProcedure
in interfaceManagedFunctionLogicMetaData
- Returns:
EscalationProcedure
.
-
getOfficeMetaData
public OfficeMetaData getOfficeMetaData()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theOfficeMetaData
.- Specified by:
getOfficeMetaData
in interfaceManagedFunctionLogicMetaData
- Returns:
OfficeMetaData
.
-
getNextManagedFunctionMetaData
public ManagedFunctionMetaData<?,?> getNextManagedFunctionMetaData()
Description copied from interface:ManagedFunctionLogicMetaData
Obtains theManagedFunctionMetaData
of the nextManagedFunction
.- Specified by:
getNextManagedFunctionMetaData
in interfaceManagedFunctionLogicMetaData
- Returns:
ManagedFunctionMetaData
of nextManagedFunction
.
-
getPreAdministrationMetaData
public ManagedFunctionAdministrationMetaData<?,?,?>[] getPreAdministrationMetaData()
Description copied from interface:ManagedFunctionMetaData
Meta-data of theAdministration
to undertake before executing theManagedFunction
.- Specified by:
getPreAdministrationMetaData
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Listing of the
Administration
instances to undertake before executing theManagedFunction
.
-
getPostAdministrationMetaData
public ManagedFunctionAdministrationMetaData<?,?,?>[] getPostAdministrationMetaData()
Description copied from interface:ManagedFunctionMetaData
Meta-data of theAdministration
to undertake after executing theManagedFunction
.- Specified by:
getPostAdministrationMetaData
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Listing the
Administration
instances to undertake after executing theManagedFunction
.
-
getManagedObjectMetaData
public ManagedObjectMetaData<?>[] getManagedObjectMetaData()
Description copied from interface:ManagedFunctionMetaData
Obtains the meta-data of theManagedObject
instances bound to theManagedFunction
.- Specified by:
getManagedObjectMetaData
in interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Meta-data of the
ManagedObject
instances bound to theManagedFunction
.
-
-