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
SectionInputNode
node.- 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 void
addAnnotation(java.lang.Object annotation)
Adds the annotation for thisSectionInput
.void
addExecutionExplorer(ExecutionExplorer executionExplorer)
Adds anExecutionExplorer
for 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 anExternalServiceInput
to externally trigger thisDeployedOfficeInput
.Node[]
getChildNodes()
Obtains the childNode
instances.DeployedOffice
getDeployedOffice()
Obtains theDeployedOffice
containing thisDeployedOfficeInput
.java.lang.String
getDeployedOfficeInputName()
Obtains the name of theDeployedOfficeInput
.FunctionManager
getFunctionManager()
Obtains theFunctionManager
to externally trigger thisDeployedOfficeInput
.LinkFlowNode
getLinkedFlowNode()
Obtains theLinkFlowNode
linked to thisLinkFlowNode
.java.lang.String
getLocation()
Obtains the location of theNode
.java.lang.String
getNodeName()
Obtains the name of theNode
.java.lang.String
getNodeType()
Obtains theNode
type.OfficeSection
getOfficeSection()
Obtains theOfficeSection
containing thisOfficeSectionInput
.java.lang.String
getOfficeSectionInputName()
Obtains the name of thisOfficeSectionInput
.Node
getParentNode()
java.lang.String
getSectionInputName()
Obtains the name of thisSectionInput
.java.lang.String
getSubSectionInputName()
Obtains the name of thisSubSectionInput
.void
initialise(java.lang.String parameterType)
Initialises thisSectionInputType
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkFlowNode(LinkFlowNode node)
Links the inputLinkFlowNode
to thisLinkFlowNode
.void
loadExternalServicing(Office office)
Loads theFunctionManager
instances to externally trigger thisSectionInputNode
.OfficeSectionInputType
loadOfficeSectionInputType(CompileContext compileContext)
Loads theOfficeSectionInputType
.SectionInputType
loadSectionInputType(CompileContext compileContext)
Loads theSectionInputType
.boolean
runExecutionExplorers(java.util.Map<java.lang.String,ManagedFunctionNode> managedFunctions, CompileContext compileContext)
Runs theExecutionExplorer
instances.-
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
-SectionNode
containing thisSectionInputNode
.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 parameterType)
Description copied from interface:SectionInputNode
Initialises thisSectionInputType
.- Specified by:
initialise
in interfaceSectionInputNode
- Parameters:
parameterType
- Parameter type.
-
loadExternalServicing
public void loadExternalServicing(Office office) throws UnknownFunctionException
Description copied from interface:SectionInputNode
Loads theFunctionManager
instances to externally trigger thisSectionInputNode
.- Specified by:
loadExternalServicing
in interfaceSectionInputNode
- Parameters:
office
-Office
containing thisSectionInputNode
.- Throws:
UnknownFunctionException
-UnknownFunctionException
.
-
loadSectionInputType
public SectionInputType loadSectionInputType(CompileContext compileContext)
Description copied from interface:SectionInputNode
Loads theSectionInputType
.- Specified by:
loadSectionInputType
in interfaceSectionInputNode
- Parameters:
compileContext
-CompileContext
.- Returns:
SectionInputType
ornull
with issues reported to theCompilerIssues
.
-
loadOfficeSectionInputType
public OfficeSectionInputType loadOfficeSectionInputType(CompileContext compileContext)
Description copied from interface:SectionInputNode
Loads theOfficeSectionInputType
.- Specified by:
loadOfficeSectionInputType
in interfaceSectionInputNode
- Parameters:
compileContext
-CompileContext
.- Returns:
OfficeSectionInputType
ornull
with issues reported to theCompilerIssues
.
-
runExecutionExplorers
public boolean runExecutionExplorers(java.util.Map<java.lang.String,ManagedFunctionNode> managedFunctions, CompileContext compileContext)
Description copied from interface:SectionInputNode
Runs theExecutionExplorer
instances.- Specified by:
runExecutionExplorers
in interfaceSectionInputNode
- Parameters:
managedFunctions
-ManagedFunctionNode
instances by their qualified name.compileContext
-CompileContext
.- Returns:
true
if successfully explored execution.
-
getSectionInputName
public java.lang.String getSectionInputName()
Description copied from interface:SectionInput
Obtains the name of thisSectionInput
.- Specified by:
getSectionInputName
in interfaceSectionInput
- Returns:
- Name of this
SectionInput
.
-
addAnnotation
public void addAnnotation(java.lang.Object annotation)
Description copied from interface:SectionInput
Adds the annotation for this
SectionInput
.This is exposed as is on the
SectionInputType
interface for thisSectionInput
.- Specified by:
addAnnotation
in interfaceSectionInput
- Parameters:
annotation
- Annotation.
-
getSubSectionInputName
public java.lang.String getSubSectionInputName()
Description copied from interface:SubSectionInput
Obtains the name of thisSubSectionInput
.- Specified by:
getSubSectionInputName
in interfaceSubSectionInput
- Returns:
- Name of this
SubSectionInput
.
-
getOfficeSection
public OfficeSection getOfficeSection()
Description copied from interface:OfficeSectionInput
Obtains theOfficeSection
containing thisOfficeSectionInput
.- Specified by:
getOfficeSection
in interfaceOfficeSectionInput
- Returns:
OfficeSection
containing thisOfficeSectionInput
.
-
getOfficeSectionInputName
public java.lang.String getOfficeSectionInputName()
Description copied from interface:OfficeSectionInput
Obtains the name of thisOfficeSectionInput
.- Specified by:
getOfficeSectionInputName
in interfaceOfficeSectionInput
- Returns:
- Name of this
OfficeSectionInput
.
-
addExecutionExplorer
public void addExecutionExplorer(ExecutionExplorer executionExplorer)
Description copied from interface:OfficeSectionInput
Adds anExecutionExplorer
for the execution tree from thisOfficeSectionInput
.- Specified by:
addExecutionExplorer
in interfaceOfficeSectionInput
- Parameters:
executionExplorer
-ExecutionExplorer
.
-
getDeployedOfficeInputName
public java.lang.String getDeployedOfficeInputName()
Description copied from interface:DeployedOfficeInput
Obtains the name of theDeployedOfficeInput
.- Specified by:
getDeployedOfficeInputName
in interfaceDeployedOfficeInput
- Returns:
- Name of the
DeployedOfficeInput
.
-
getDeployedOffice
public DeployedOffice getDeployedOffice()
Description copied from interface:DeployedOfficeInput
Obtains theDeployedOffice
containing thisDeployedOfficeInput
.- Specified by:
getDeployedOffice
in interfaceDeployedOfficeInput
- Returns:
DeployedOffice
containing thisDeployedOfficeInput
.
-
getFunctionManager
public FunctionManager getFunctionManager()
Description copied from interface:DeployedOfficeInput
Obtains the
FunctionManager
to externally trigger thisDeployedOfficeInput
.This allows
OfficeFloorExtensionService
instances to obtain theFunctionManager
for external triggering of service handling.- Specified by:
getFunctionManager
in interfaceDeployedOfficeInput
- Returns:
FunctionManager
to 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:DeployedOfficeInput
Adds an
ExternalServiceInput
to externally trigger thisDeployedOfficeInput
.This allows
OfficeFloorExtensionService
instances to run external services (running within their ownThread
) to useOfficeFloor
to service.Should the external service require running within the
OfficeFloor
open/close life-cycle, add anOfficeFloorListener
to theOfficeFloorDeployer
.An example use case is running
OfficeFloor
within a JEE server and havingOfficeFloor
service the Servlet requests.Note should more complex interaction be required with
OfficeFloor
, consider creating aManagedObjectSource
and invoking services through theManagedObjectExecuteContext
.- Specified by:
addExternalServiceInput
in interfaceDeployedOfficeInput
- Type Parameters:
O
- Object type.M
-ManagedObject
type.- Parameters:
objectType
- Type of object provided to theExternalServiceInput
.managedObjectType
- Type of theManagedObject
to theExternalServiceInput
.cleanupEscalationHandler
-ExternalServiceCleanupEscalationHandler
.- Returns:
ExternalServiceInput
.
-
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
.
-
-