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, AssetManager asynchronousFlowsAssetManager, java.util.logging.Logger logger, java.util.concurrent.Executor executor)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, AssetManager asynchronousFlowsAssetManager, java.util.logging.Logger logger, java.util.concurrent.Executor executor)Initiate with details of the meta-data for theManagedFunction.- Parameters:
functionName- Name of theManagedFunction.functionFactory-ManagedFunctionFactoryto create theManagedFunctionof theManagedFunctionMetaData.annotations- Differentiators.parameterType- Parameter type of thisManagedFunction.responsibleTeam-TeamManagementof theTeamresponsible for executing thisManagedFunction. May benull.functionIndexedManagedObjects- Translates theManagedFunctionindex to theManagedObjectIndexto obtain theManagedObjectfor theManagedFunction.functionBoundManagedObjects-ManagedObjectMetaDataof theManagedObjectinstances bound to theManagedFunction.requiredGovernance- RequiredGovernance.asynchronousFlowTimeout-AsynchronousFlowtimeout.asynchronousFlowsAssetManager-AssetManagerfor the invokedAsynchronousFlowinstances.logger-LoggerforManagedFunctionContext.executor-ExecutorforManagedFunctionContext.
-
-
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 availableFlowinstances from thisManagedFunction.nextFunctionMetaData-ManagedFunctionMetaDataof the nextManagedFunction.escalationProcedure-EscalationProcedurefor exceptions of theManagedFunctionof thisManagedFunctionMetaData.preAdministration-ManagedFunctionAdministrationMetaDataspecifying theAdministrationinstances to be completed before executing theManagedFunction.postAdministration-ManagedFunctionAdministrationMetaDataspecifying theAdministrationinstances to be completed after executing theManagedFunction.requiredManagedObjects-ManagedObjectIndexinstances identifying theManagedObjectinstances that must be loaded before theManagedFunctionmay be executed.
-
getFunctionName
public java.lang.String getFunctionName()
Description copied from interface:ManagedFunctionLogicMetaDataObtains the name of theManagedFunctionLogic.- Specified by:
getFunctionNamein interfaceManagedFunctionLogicMetaData- Returns:
- Name of the
ManagedFunctionLogic.
-
getManagedFunctionFactory
public ManagedFunctionFactory<O,F> getManagedFunctionFactory()
Description copied from interface:ManagedFunctionMetaData- Specified by:
getManagedFunctionFactoryin 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:ManagedFunctionMetaDataObtains the annotations for theManagedFunction.- Specified by:
getAnnotationsin 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:ManagedFunctionMetaDataObtains the parameter type for theManagedFunction.- Specified by:
getParameterTypein interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Parameter type for the
ManagedFunction. May benullto indicate no parameter.
-
getLogger
public java.util.logging.Logger getLogger()
Description copied from interface:ManagedFunctionMetaDataObtains theLoggerforManagedFunctionContext.- Specified by:
getLoggerin interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
LoggerforManagedFunctionContext.
-
getExecutor
public java.util.concurrent.Executor getExecutor()
Description copied from interface:ManagedFunctionMetaDataObtains theExecutorforManagedFunctionContext.- Specified by:
getExecutorin interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
ExecutorforManagedFunctionContext.
-
getResponsibleTeam
public TeamManagement getResponsibleTeam()
Description copied from interface:ManagedFunctionLogicMetaDataObtains theTeamManagementresponsible for completion of theFunctionState.- Specified by:
getResponsibleTeamin interfaceManagedFunctionLogicMetaData- Returns:
TeamManagementresponsible for completion of theFunctionState. May benullto enable anyTeamto execute theFunctionState.
-
getRequiredManagedObjects
public ManagedObjectIndex[] getRequiredManagedObjects()
Description copied from interface:ManagedFunctionMetaDataObtains the
ManagedObjectIndexinstances identifying theManagedObjectinstances that must be loaded before theManagedFunctionmay be executed.The order of the
ManagedObjectIndexinstances must be respected as they are sorted to enable appropriateCoordinatingManagedObjectto co-ordinate with dependencies.- Specified by:
getRequiredManagedObjectsin interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Listing of
ManagedObjectIndexinstances.
-
getRequiredGovernance
public boolean[] getRequiredGovernance()
Description copied from interface:ManagedFunctionMetaDataObtains the activation flags for theGovernance. The index into the array identifies theGovernancefor the respective activation flag.- Specified by:
getRequiredGovernancein 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:ManagedFunctionMetaDataObtains theManagedObjectIndexfor theManagedFunctionindex.- Specified by:
getManagedObjectin interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Parameters:
managedObjectIndex-ManagedObjectIndexfor theManagedFunctionindex.- Returns:
ManagedObjectIndexto obtain theManagedObjectfor theManagedFunction.
-
getFlow
public FlowMetaData getFlow(int flowIndex)
Description copied from interface:ManagedFunctionLogicMetaDataObtains theFlowMetaDataof the specifiedFlow.- Specified by:
getFlowin interfaceManagedFunctionLogicMetaData- Parameters:
flowIndex- Index of theFlow.- Returns:
FlowMetaDataof the specifiedFlow.
-
getAsynchronousFlowTimeout
public long getAsynchronousFlowTimeout()
Description copied from interface:ManagedFunctionLogicMetaDataObtains the time out forAsynchronousFlowinstigated by theManagedFunction.- Specified by:
getAsynchronousFlowTimeoutin interfaceManagedFunctionLogicMetaData- Returns:
- Time out for
AsynchronousFlowinstigated by theManagedFunction.
-
getAsynchronousFlowManager
public AssetManager getAsynchronousFlowManager()
Description copied from interface:ManagedFunctionLogicMetaData- Specified by:
getAsynchronousFlowManagerin interfaceManagedFunctionLogicMetaData- Returns:
AssetManagerthat managesAsynchronousFlowinstances instigated by theManagedFunction.
-
getEscalationProcedure
public EscalationProcedure getEscalationProcedure()
Description copied from interface:ManagedFunctionLogicMetaDataObtains theEscalationProcedurefor theManagedFunctionLogic.- Specified by:
getEscalationProcedurein interfaceManagedFunctionLogicMetaData- Returns:
EscalationProcedure.
-
getOfficeMetaData
public OfficeMetaData getOfficeMetaData()
Description copied from interface:ManagedFunctionLogicMetaDataObtains theOfficeMetaData.- Specified by:
getOfficeMetaDatain interfaceManagedFunctionLogicMetaData- Returns:
OfficeMetaData.
-
getNextManagedFunctionMetaData
public ManagedFunctionMetaData<?,?> getNextManagedFunctionMetaData()
Description copied from interface:ManagedFunctionLogicMetaDataObtains theManagedFunctionMetaDataof the nextManagedFunction.- Specified by:
getNextManagedFunctionMetaDatain interfaceManagedFunctionLogicMetaData- Returns:
ManagedFunctionMetaDataof nextManagedFunction.
-
getPreAdministrationMetaData
public ManagedFunctionAdministrationMetaData<?,?,?>[] getPreAdministrationMetaData()
Description copied from interface:ManagedFunctionMetaDataMeta-data of theAdministrationto undertake before executing theManagedFunction.- Specified by:
getPreAdministrationMetaDatain interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Listing of the
Administrationinstances to undertake before executing theManagedFunction.
-
getPostAdministrationMetaData
public ManagedFunctionAdministrationMetaData<?,?,?>[] getPostAdministrationMetaData()
Description copied from interface:ManagedFunctionMetaDataMeta-data of theAdministrationto undertake after executing theManagedFunction.- Specified by:
getPostAdministrationMetaDatain interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Listing the
Administrationinstances to undertake after executing theManagedFunction.
-
getManagedObjectMetaData
public ManagedObjectMetaData<?>[] getManagedObjectMetaData()
Description copied from interface:ManagedFunctionMetaDataObtains the meta-data of theManagedObjectinstances bound to theManagedFunction.- Specified by:
getManagedObjectMetaDatain interfaceManagedFunctionMetaData<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>- Returns:
- Meta-data of the
ManagedObjectinstances bound to theManagedFunction.
-
-