Class SectionInputNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.SectionInputNodeImpl
-
- All Implemented Interfaces:
LinkFlowNode,Node,SectionInputNode,OfficeFlowSinkNode,OfficeSectionInput,DeployedOfficeInput,OfficeFloorFlowSinkNode,SectionFlowSinkNode,SectionFlowSourceNode,SectionInput,SubSectionInput
public class SectionInputNodeImpl extends java.lang.Object implements SectionInputNode
SectionInputNodenode.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.SectionInputNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description SectionInputNodeImpl(java.lang.String inputName, SectionNode section, NodeContext context)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(java.lang.Object annotation)Adds the annotation for thisSectionInput.voidaddExecutionExplorer(ExecutionExplorer executionExplorer)Adds anExecutionExplorerfor the execution tree from thisOfficeSectionInput.<O,M extends ManagedObject>
ExternalServiceInput<O,M>addExternalServiceInput(java.lang.Class<O> objectType, java.lang.Class<? extends M> managedObjectType, ExternalServiceCleanupEscalationHandler<? super M> cleanupEscalationHandler)Adds anExternalServiceInputto externally trigger thisDeployedOfficeInput.Node[]getChildNodes()Obtains the childNodeinstances.DeployedOfficegetDeployedOffice()Obtains theDeployedOfficecontaining thisDeployedOfficeInput.java.lang.StringgetDeployedOfficeInputName()Obtains the name of theDeployedOfficeInput.FunctionManagergetFunctionManager()Obtains theFunctionManagerto externally trigger thisDeployedOfficeInput.LinkFlowNodegetLinkedFlowNode()Obtains theLinkFlowNodelinked to thisLinkFlowNode.java.lang.StringgetLocation()Obtains the location of theNode.java.lang.StringgetNodeName()Obtains the name of theNode.java.lang.StringgetNodeType()Obtains theNodetype.OfficeSectiongetOfficeSection()Obtains theOfficeSectioncontaining thisOfficeSectionInput.java.lang.StringgetOfficeSectionInputName()Obtains the name of thisOfficeSectionInput.NodegetParentNode()java.lang.StringgetSectionInputName()Obtains the name of thisSectionInput.java.lang.StringgetSubSectionInputName()Obtains the name of thisSubSectionInput.voidinitialise(java.lang.String parameterType)Initialises thisSectionInputType.booleanisInitialised()Indicates if theNodehas been initialised.booleanlinkFlowNode(LinkFlowNode node)Links the inputLinkFlowNodeto thisLinkFlowNode.voidloadExternalServicing(Office office)Loads theFunctionManagerinstances to externally trigger thisSectionInputNode.OfficeSectionInputTypeloadOfficeSectionInputType(CompileContext compileContext)Loads theOfficeSectionInputType.SectionInputTypeloadSectionInputType(CompileContext compileContext)Loads theSectionInputType.booleanrunExecutionExplorers(java.util.Map<java.lang.String,ManagedFunctionNode> managedFunctions, CompileContext compileContext)Runs theExecutionExplorerinstances.-
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
-
SectionInputNodeImpl
public SectionInputNodeImpl(java.lang.String inputName, SectionNode section, NodeContext context)Instantiate.- Parameters:
inputName- Name of theSubSectionInput(which is the name of theSectionInputType).section-SectionNodecontaining thisSectionInputNode.context-NodeContext.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:NodeObtains the location of theNode.- Specified by:
getLocationin interfaceNode- Returns:
- Location of the
Node. May benullifNodedoes not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:NodeObtains the childNodeinstances.- Specified by:
getChildNodesin interfaceNode- Returns:
- Child
Nodeinstances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:NodeIndicates if theNodehas been initialised.Nodeinstances should only be initialised once. Initialising theNodetwice is an issue.- Specified by:
isInitialisedin interfaceNode- Returns:
trueif initialised.
-
initialise
public void initialise(java.lang.String parameterType)
Description copied from interface:SectionInputNodeInitialises thisSectionInputType.- Specified by:
initialisein interfaceSectionInputNode- Parameters:
parameterType- Parameter type.
-
loadExternalServicing
public void loadExternalServicing(Office office) throws UnknownFunctionException
Description copied from interface:SectionInputNodeLoads theFunctionManagerinstances to externally trigger thisSectionInputNode.- Specified by:
loadExternalServicingin interfaceSectionInputNode- Parameters:
office-Officecontaining thisSectionInputNode.- Throws:
UnknownFunctionException-UnknownFunctionException.
-
loadSectionInputType
public SectionInputType loadSectionInputType(CompileContext compileContext)
Description copied from interface:SectionInputNodeLoads theSectionInputType.- Specified by:
loadSectionInputTypein interfaceSectionInputNode- Parameters:
compileContext-CompileContext.- Returns:
SectionInputTypeornullwith issues reported to theCompilerIssues.
-
loadOfficeSectionInputType
public OfficeSectionInputType loadOfficeSectionInputType(CompileContext compileContext)
Description copied from interface:SectionInputNodeLoads theOfficeSectionInputType.- Specified by:
loadOfficeSectionInputTypein interfaceSectionInputNode- Parameters:
compileContext-CompileContext.- Returns:
OfficeSectionInputTypeornullwith issues reported to theCompilerIssues.
-
runExecutionExplorers
public boolean runExecutionExplorers(java.util.Map<java.lang.String,ManagedFunctionNode> managedFunctions, CompileContext compileContext)
Description copied from interface:SectionInputNodeRuns theExecutionExplorerinstances.- Specified by:
runExecutionExplorersin interfaceSectionInputNode- Parameters:
managedFunctions-ManagedFunctionNodeinstances by their qualified name.compileContext-CompileContext.- Returns:
trueif successfully explored execution.
-
getSectionInputName
public java.lang.String getSectionInputName()
Description copied from interface:SectionInputObtains the name of thisSectionInput.- Specified by:
getSectionInputNamein interfaceSectionInput- Returns:
- Name of this
SectionInput.
-
addAnnotation
public void addAnnotation(java.lang.Object annotation)
Description copied from interface:SectionInputAdds the annotation for this
SectionInput.This is exposed as is on the
SectionInputTypeinterface for thisSectionInput.- Specified by:
addAnnotationin interfaceSectionInput- Parameters:
annotation- Annotation.
-
getSubSectionInputName
public java.lang.String getSubSectionInputName()
Description copied from interface:SubSectionInputObtains the name of thisSubSectionInput.- Specified by:
getSubSectionInputNamein interfaceSubSectionInput- Returns:
- Name of this
SubSectionInput.
-
getOfficeSection
public OfficeSection getOfficeSection()
Description copied from interface:OfficeSectionInputObtains theOfficeSectioncontaining thisOfficeSectionInput.- Specified by:
getOfficeSectionin interfaceOfficeSectionInput- Returns:
OfficeSectioncontaining thisOfficeSectionInput.
-
getOfficeSectionInputName
public java.lang.String getOfficeSectionInputName()
Description copied from interface:OfficeSectionInputObtains the name of thisOfficeSectionInput.- Specified by:
getOfficeSectionInputNamein interfaceOfficeSectionInput- Returns:
- Name of this
OfficeSectionInput.
-
addExecutionExplorer
public void addExecutionExplorer(ExecutionExplorer executionExplorer)
Description copied from interface:OfficeSectionInputAdds anExecutionExplorerfor the execution tree from thisOfficeSectionInput.- Specified by:
addExecutionExplorerin interfaceOfficeSectionInput- Parameters:
executionExplorer-ExecutionExplorer.
-
getDeployedOfficeInputName
public java.lang.String getDeployedOfficeInputName()
Description copied from interface:DeployedOfficeInputObtains the name of theDeployedOfficeInput.- Specified by:
getDeployedOfficeInputNamein interfaceDeployedOfficeInput- Returns:
- Name of the
DeployedOfficeInput.
-
getDeployedOffice
public DeployedOffice getDeployedOffice()
Description copied from interface:DeployedOfficeInputObtains theDeployedOfficecontaining thisDeployedOfficeInput.- Specified by:
getDeployedOfficein interfaceDeployedOfficeInput- Returns:
DeployedOfficecontaining thisDeployedOfficeInput.
-
getFunctionManager
public FunctionManager getFunctionManager()
Description copied from interface:DeployedOfficeInputObtains the
FunctionManagerto externally trigger thisDeployedOfficeInput.This allows
OfficeFloorExtensionServiceinstances to obtain theFunctionManagerfor external triggering of service handling.- Specified by:
getFunctionManagerin interfaceDeployedOfficeInput- Returns:
FunctionManagerto externally trigger thisDeployedOfficeInput.
-
addExternalServiceInput
public <O,M extends ManagedObject> ExternalServiceInput<O,M> addExternalServiceInput(java.lang.Class<O> objectType, java.lang.Class<? extends M> managedObjectType, ExternalServiceCleanupEscalationHandler<? super M> cleanupEscalationHandler)
Description copied from interface:DeployedOfficeInputAdds an
ExternalServiceInputto externally trigger thisDeployedOfficeInput.This allows
OfficeFloorExtensionServiceinstances to run external services (running within their ownThread) to useOfficeFloorto service.Should the external service require running within the
OfficeFlooropen/close life-cycle, add anOfficeFloorListenerto theOfficeFloorDeployer.An example use case is running
OfficeFloorwithin a JEE server and havingOfficeFloorservice the Servlet requests.Note should more complex interaction be required with
OfficeFloor, consider creating aManagedObjectSourceand invoking services through theManagedObjectExecuteContext.- Specified by:
addExternalServiceInputin interfaceDeployedOfficeInput- Type Parameters:
O- Object type.M-ManagedObjecttype.- Parameters:
objectType- Type of object provided to theExternalServiceInput.managedObjectType- Type of theManagedObjectto theExternalServiceInput.cleanupEscalationHandler-ExternalServiceCleanupEscalationHandler.- Returns:
ExternalServiceInput.
-
linkFlowNode
public boolean linkFlowNode(LinkFlowNode node)
Description copied from interface:LinkFlowNodeLinks the inputLinkFlowNodeto thisLinkFlowNode.- Specified by:
linkFlowNodein interfaceLinkFlowNode- Parameters:
node-LinkFlowNodeto link to thisLinkFlowNode.- Returns:
trueif linked.
-
getLinkedFlowNode
public LinkFlowNode getLinkedFlowNode()
Description copied from interface:LinkFlowNodeObtains theLinkFlowNodelinked to thisLinkFlowNode.- Specified by:
getLinkedFlowNodein interfaceLinkFlowNode- Returns:
LinkFlowNodelinked to thisLinkFlowNode.
-
-