Class ManagedFunctionNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.ManagedFunctionNodeImpl
-
- All Implemented Interfaces:
LinkFlowNode
,ManagedFunctionNode
,Node
,OfficeSectionFunction
,SectionFlowSinkNode
,SectionFlowSourceNode
,SectionFunction
public class ManagedFunctionNodeImpl extends java.lang.Object implements ManagedFunctionNode
ManagedFunctionNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.ManagedFunctionNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description ManagedFunctionNodeImpl(java.lang.String functionName, SectionNode sectionNode, NodeContext context)
Initiate.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName, getQualifiedName
-
-
-
-
Constructor Detail
-
ManagedFunctionNodeImpl
public ManagedFunctionNodeImpl(java.lang.String functionName, SectionNode sectionNode, NodeContext context)
Initiate.- Parameters:
functionName
- Name of thisSectionFunction
.sectionNode
-SectionNode
containing thisManagedFunctionNode
.context
-NodeContext
.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:Node
Obtains the name of theNode
.- Specified by:
getNodeName
in interfaceNode
- Returns:
- Name of the
Node
.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:Node
Obtains theNode
type.- Specified by:
getNodeType
in interfaceNode
- Returns:
Node
type.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:Node
Obtains the location of theNode
.- Specified by:
getLocation
in interfaceNode
- Returns:
- Location of the
Node
. May benull
ifNode
does not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node
- Specified by:
getParentNode
in interfaceNode
- Returns:
Node
containing thisNode
.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:Node
Obtains the childNode
instances.- Specified by:
getChildNodes
in interfaceNode
- Returns:
- Child
Node
instances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:Node
Indicates if theNode
has been initialised.Node
instances should only be initialised once. Initialising theNode
twice is an issue.- Specified by:
isInitialised
in interfaceNode
- Returns:
true
if initialised.
-
initialise
public void initialise(java.lang.String managedFunctionTypeName, FunctionNamespaceNode namespaceNode)
Description copied from interface:ManagedFunctionNode
Initialises thisManagedFunctionNode
.- Specified by:
initialise
in interfaceManagedFunctionNode
- Parameters:
managedFunctionTypeName
-ManagedFunctionType
name.namespaceNode
-FunctionNamespaceNode
for theManagedFunctionNode
.
-
getQualifiedFunctionName
public java.lang.String getQualifiedFunctionName()
Description copied from interface:ManagedFunctionNode
Obtains the fully qualified name of thisManagedFunction
.- Specified by:
getQualifiedFunctionName
in interfaceManagedFunctionNode
- Returns:
- Fully qualified name of this
ManagedFunction
.
-
getFunctionNamespaceNode
public FunctionNamespaceNode getFunctionNamespaceNode()
Description copied from interface:ManagedFunctionNode
Obtains theFunctionNamespaceNode
containing thisManagedFunctionNode
.- Specified by:
getFunctionNamespaceNode
in interfaceManagedFunctionNode
- Returns:
FunctionNamespaceNode
containing thisManagedFunctionNode
.
-
getAugmentedFunctionObject
public AugmentedFunctionObject getAugmentedFunctionObject(java.lang.String objectName)
Description copied from interface:ManagedFunctionNode
Obtains theAugmentedFunctionObject
.- Specified by:
getAugmentedFunctionObject
in interfaceManagedFunctionNode
- Parameters:
objectName
- Name of theAugmentedFunctionObject
.- Returns:
AugmentedFunctionObject
.
-
loadManagedFunctionType
public ManagedFunctionType<?,?> loadManagedFunctionType(CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Loads theManagedFunctionType
for thisManagedFunctionNode
.- Specified by:
loadManagedFunctionType
in interfaceManagedFunctionNode
- Parameters:
compileContext
-CompileContext
.- Returns:
ManagedFunctionType
for thisManagedFunctionNode
. May benull
if can not determineManagedFunctionType
.
-
loadOfficeFunctionType
public OfficeFunctionType loadOfficeFunctionType(OfficeSubSectionType parentSubSectionType, CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Loads theOfficeFunctionType
.- Specified by:
loadOfficeFunctionType
in interfaceManagedFunctionNode
- Parameters:
parentSubSectionType
- ContainingOfficeSubSectionType
to thisOfficeSectionFunction
.compileContext
-CompileContext
.- Returns:
OfficeFunctionType
ornull
with issues reported to theCompilerIssues
.
-
souceManagedFunction
public boolean souceManagedFunction(ManagedFunctionVisitor visitor, CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Sources theManagedFunction
.- Specified by:
souceManagedFunction
in interfaceManagedFunctionNode
- Parameters:
visitor
-ManagedFunctionVisitor
.compileContext
-CompileContext
.- Returns:
true
if successfully sourced theManagedFunction
.false
if failed to source with issues reported to theCompilerIssues
.
-
autoWireManagedFunctionResponsibility
public void autoWireManagedFunctionResponsibility(AutoWirer<LinkTeamNode> autoWirer, CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Auto wires theResponsibleTeam
for thisManagedFunction
.- Specified by:
autoWireManagedFunctionResponsibility
in interfaceManagedFunctionNode
- Parameters:
autoWirer
-AutoWirer
.compileContext
-CompileContext
.
-
createExecutionManagedFunction
public ExecutionManagedFunction createExecutionManagedFunction(CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Creates anExecutionManagedFunction
for thisManagedFunctionNode
.- Specified by:
createExecutionManagedFunction
in interfaceManagedFunctionNode
- Parameters:
compileContext
-CompileContext
.- Returns:
ExecutionManagedFunction
for thisManagedFunctionNode
.
-
buildManagedFunction
public void buildManagedFunction(OfficeBuilder officeBuilder, CompileContext compileContext)
Description copied from interface:ManagedFunctionNode
Builds theManagedFunction
for thisManagedFunctionNode
.- Specified by:
buildManagedFunction
in interfaceManagedFunctionNode
- Parameters:
officeBuilder
-OfficeBuilder
.compileContext
-CompileContext
.
-
getSectionFunctionName
public java.lang.String getSectionFunctionName()
Description copied from interface:SectionFunction
Obtains the name of thisSectionFunction
.- Specified by:
getSectionFunctionName
in interfaceSectionFunction
- Returns:
- Name of this
SectionFunction
.
-
getFunctionFlow
public FunctionFlow getFunctionFlow(java.lang.String functionFlowName)
Description copied from interface:SectionFunction
Obtains theFunctionFlow
for theManagedFunctionFlowType
.- Specified by:
getFunctionFlow
in interfaceSectionFunction
- Parameters:
functionFlowName
- Name of theManagedFunctionFlowType
.- Returns:
FunctionFlow
.
-
getFunctionObject
public FunctionObject getFunctionObject(java.lang.String functionObjectName)
Description copied from interface:SectionFunction
Obtains theFunctionObject
for theManagedFunctionObjectType
.- Specified by:
getFunctionObject
in interfaceSectionFunction
- Parameters:
functionObjectName
- Name of theManagedFunctionObjectType
.- Returns:
FunctionObject
.
-
getFunctionEscalation
public FunctionFlow getFunctionEscalation(java.lang.String functionEscalationName)
Description copied from interface:SectionFunction
Obtains theFunctionFlow
for theManagedFunctionEscalationType
.- Specified by:
getFunctionEscalation
in interfaceSectionFunction
- Parameters:
functionEscalationName
- Fully qualified class name of theThrowable
identifying theManagedFunctionEscalationType
. TheEscalation
type is used rather than the name as handling is done by theEscalation
type.- Returns:
FunctionFlow
for theManagedFunctionEscalationType
.
-
linkFlowNode
public boolean linkFlowNode(LinkFlowNode node)
Description copied from interface:LinkFlowNode
Links the inputLinkFlowNode
to thisLinkFlowNode
.- Specified by:
linkFlowNode
in interfaceLinkFlowNode
- Parameters:
node
-LinkFlowNode
to link to thisLinkFlowNode
.- Returns:
true
if linked.
-
getLinkedFlowNode
public LinkFlowNode getLinkedFlowNode()
Description copied from interface:LinkFlowNode
Obtains theLinkFlowNode
linked to thisLinkFlowNode
.- Specified by:
getLinkedFlowNode
in interfaceLinkFlowNode
- Returns:
LinkFlowNode
linked to thisLinkFlowNode
.
-
getOfficeFunctionName
public java.lang.String getOfficeFunctionName()
Description copied from interface:OfficeSectionFunction
Obtains the name of theOfficeSectionFunction
.- Specified by:
getOfficeFunctionName
in interfaceOfficeSectionFunction
- Returns:
- Name of the
OfficeSectionFunction
.
-
getResponsibleTeam
public ResponsibleTeam getResponsibleTeam()
Description copied from interface:OfficeSectionFunction
Obtains theResponsibleTeam
responsible for thisOfficeSectionFunction
.- Specified by:
getResponsibleTeam
in interfaceOfficeSectionFunction
- Returns:
ResponsibleTeam
responsible for thisOfficeSectionFunction
.
-
addPreAdministration
public void addPreAdministration(OfficeAdministration administration)
Description copied from interface:OfficeSectionFunction
Adds an
OfficeAdministration
to be done before attempting thisOfficeSectionFunction
.The order that the
OfficeAdministration
instances are added is the order they will be done before thisOfficeSectionFunction
.- Specified by:
addPreAdministration
in interfaceOfficeSectionFunction
- Parameters:
administration
-OfficeAdministration
to be done before attempting thisOfficeSectionFunction
.
-
addPostAdministration
public void addPostAdministration(OfficeAdministration administration)
Description copied from interface:OfficeSectionFunction
Adds an
OfficeAdministration
to be done after completing thisOfficeSectionFunction
.The order that the
OfficeAdministration
instances are added is the order they will be done after thisOfficeSectionFunction
is complete.- Specified by:
addPostAdministration
in interfaceOfficeSectionFunction
- Parameters:
administration
-OfficeAdministration
to be done after completing thisOfficeSectionFunction
.
-
addGovernance
public void addGovernance(OfficeGovernance governance)
Description copied from interface:OfficeSectionFunction
Adds
Governance
for thisOfficeSectionFunction
.This enables specifying specifically which
OfficeSectionFunction
instances requireGovernance
.- Specified by:
addGovernance
in interfaceOfficeSectionFunction
- Parameters:
governance
-OfficeGovernance
.
-
-