Class TransformSectionDesigner
- java.lang.Object
-
- net.officefloor.plugin.section.transform.TransformSectionDesigner
-
- All Implemented Interfaces:
SourceIssues
,SectionDesigner
public class TransformSectionDesigner extends java.lang.Object implements SectionDesigner
SectionDesigner
to intercept configuration to provide access to theSectionSource
configured items.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description TransformSectionDesigner(SectionDesigner delegate)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompileError
addIssue(java.lang.String issueDescription)
Allows the source to add an issue.CompileError
addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Allows the source to add an issue along with its cause.SectionManagedObjectPool
addManagedObjectPool(java.lang.String managedObjectPoolName, java.lang.String managedObjectPoolSourceClassName)
Adds anSectionManagedObjectPool
.SectionManagedObjectPool
addManagedObjectPool(java.lang.String managedObjectPoolName, ManagedObjectPoolSource managedObjectPoolSource)
Adds aSectionManagedObjectPool
.SectionFunctionNamespace
addSectionFunctionNamespace(java.lang.String namespaceName, java.lang.String managedFunctionSourceClassName)
Adds aSectionFunctionNamespace
to theSectionNode
being built.SectionFunctionNamespace
addSectionFunctionNamespace(java.lang.String namespaceName, ManagedFunctionSource managedFunctionSource)
Adds aSectionFunctionNamespace
to theSectionNode
being built.SectionInput
addSectionInput(java.lang.String inputName, java.lang.String parameterType)
Adds aSectionInput
to theSectionNode
being built.SectionManagedObjectSource
addSectionManagedObjectSource(java.lang.String managedObjectSourceName, java.lang.String managedObjectSourceClassName)
Adds aSectionManagedObjectSource
to theSectionNode
being built.SectionManagedObjectSource
addSectionManagedObjectSource(java.lang.String managedObjectSourceName, ManagedObjectSource<?,?> managedObjectSource)
Adds aSectionManagedObjectSource
to theSectionNode
being built.SectionObject
addSectionObject(java.lang.String objectName, java.lang.String objectType)
Adds aSectionObject
to theSectionNode
being built.SectionOutput
addSectionOutput(java.lang.String outputName, java.lang.String argumentType, boolean isEscalationOnly)
Adds aSectionOutput
to theSectionNode
being built.SubSection
addSubSection(java.lang.String subSectionName, java.lang.String sectionSourceClassName, java.lang.String location)
Adds aSubSection
to theSectionNode
being built.SubSection
addSubSection(java.lang.String subSectionName, SectionSource sectionSource, java.lang.String location)
Adds aSubSection
to theSectionNode
being built.SectionInput
getSectionInput(java.lang.String inputName)
Obtains theSectionInput
.SectionOutput
getSectionOutput(java.lang.String outputName)
Obtains theSectionOutput
.SubSection
getSubSection(java.lang.String subSectionName)
Obtains theSubSection
.void
link(FunctionFlow functionFlow, SectionFlowSinkNode sectionSinkNode, boolean isSpawnThreadState)
Links theFunctionFlow
to be undertaken by theSectionFlowSinkNode
.void
link(SectionDependencyRequireNode sectionRequireNode, SectionDependencyObjectNode sectionObjectNode)
Links theSectionDependencyRequireNode
to be fulfilled by theSectionDependencyObjectNode
.void
link(SectionFlowSourceNode flowSourceNode, SectionFlowSinkNode flowSinkNode)
Links theSectionFlowSourceNode
to undertaken by theSectionFlowSinkNode
.void
link(SectionManagedObjectSource managedObjectSource, SectionManagedObjectPool managedObjectPool)
Links theSectionManagedObjectSource
to be pooled by theSectionManagedObjectPool
.
-
-
-
Constructor Detail
-
TransformSectionDesigner
public TransformSectionDesigner(SectionDesigner delegate)
Initiate.- Parameters:
delegate
- DelegateSectionDesigner
.
-
-
Method Detail
-
getSectionInput
public SectionInput getSectionInput(java.lang.String inputName)
Obtains theSectionInput
.- Parameters:
inputName
- Name of theSectionInput
.- Returns:
SectionInput
.
-
getSectionOutput
public SectionOutput getSectionOutput(java.lang.String outputName)
Obtains theSectionOutput
.- Parameters:
outputName
- Name of theSectionOutput
.- Returns:
SectionOutput
.
-
getSubSection
public SubSection getSubSection(java.lang.String subSectionName)
Obtains theSubSection
.- Parameters:
subSectionName
- Name of theSubSection
.- Returns:
SubSection
.
-
addSectionInput
public SectionInput addSectionInput(java.lang.String inputName, java.lang.String parameterType)
Description copied from interface:SectionDesigner
Adds aSectionInput
to theSectionNode
being built.- Specified by:
addSectionInput
in interfaceSectionDesigner
- Parameters:
inputName
- Name of theSectionInput
.parameterType
- Parameter type for theSectionInputType
.- Returns:
SectionInput
for linking.
-
addSectionOutput
public SectionOutput addSectionOutput(java.lang.String outputName, java.lang.String argumentType, boolean isEscalationOnly)
Description copied from interface:SectionDesigner
Adds aSectionOutput
to theSectionNode
being built.- Specified by:
addSectionOutput
in interfaceSectionDesigner
- Parameters:
outputName
- Name of theSectionOutput
.argumentType
- Argument type for theSectionOutputType
.isEscalationOnly
-true
if onlyManagedFunctionEscalationType
instances are using theSectionOutputType
.- Returns:
SectionOutput
for linking.
-
addSectionObject
public SectionObject addSectionObject(java.lang.String objectName, java.lang.String objectType)
Description copied from interface:SectionDesigner
Adds aSectionObject
to theSectionNode
being built.- Specified by:
addSectionObject
in interfaceSectionDesigner
- Parameters:
objectName
- Name of theSectionObject
.objectType
- Type required for theSectionObjectType
.- Returns:
SectionObject
for linking.
-
addSectionFunctionNamespace
public SectionFunctionNamespace addSectionFunctionNamespace(java.lang.String namespaceName, java.lang.String managedFunctionSourceClassName)
Description copied from interface:SectionDesigner
Adds aSectionFunctionNamespace
to theSectionNode
being built.- Specified by:
addSectionFunctionNamespace
in interfaceSectionDesigner
- Parameters:
namespaceName
- Name of theSectionFunctionNamespace
.managedFunctionSourceClassName
- Fully qualified class name of theManagedFunctionSource
. This allows adding theSectionFunctionNamespace
without having to worry if theManagedFunctionSource
is available on the class path.- Returns:
SectionFunctionNamespace
.
-
addSectionFunctionNamespace
public SectionFunctionNamespace addSectionFunctionNamespace(java.lang.String namespaceName, ManagedFunctionSource managedFunctionSource)
Description copied from interface:SectionDesigner
Adds aSectionFunctionNamespace
to theSectionNode
being built.- Specified by:
addSectionFunctionNamespace
in interfaceSectionDesigner
- Parameters:
namespaceName
- Name of theSectionFunctionNamespace
.managedFunctionSource
-ManagedFunctionSource
instance to use.- Returns:
SectionFunctionNamespace
.
-
addSectionManagedObjectSource
public SectionManagedObjectSource addSectionManagedObjectSource(java.lang.String managedObjectSourceName, java.lang.String managedObjectSourceClassName)
Description copied from interface:SectionDesigner
Adds aSectionManagedObjectSource
to theSectionNode
being built.- Specified by:
addSectionManagedObjectSource
in interfaceSectionDesigner
- Parameters:
managedObjectSourceName
- Name of theSectionManagedObjectSource
.managedObjectSourceClassName
- Fully qualified class name of theManagedObjectSource
. This allows adding theSectionManagedObject
without having to worry if theManagedObjectSource
is available on the class path.- Returns:
SectionManagedObject
.
-
addSectionManagedObjectSource
public SectionManagedObjectSource addSectionManagedObjectSource(java.lang.String managedObjectSourceName, ManagedObjectSource<?,?> managedObjectSource)
Description copied from interface:SectionDesigner
Adds aSectionManagedObjectSource
to theSectionNode
being built.- Specified by:
addSectionManagedObjectSource
in interfaceSectionDesigner
- Parameters:
managedObjectSourceName
- Name of theSectionManagedObjectSource
.managedObjectSource
-ManagedObjectSource
instance to use.- Returns:
SectionManagedObject
.
-
addManagedObjectPool
public SectionManagedObjectPool addManagedObjectPool(java.lang.String managedObjectPoolName, java.lang.String managedObjectPoolSourceClassName)
Description copied from interface:SectionDesigner
Adds anSectionManagedObjectPool
.- Specified by:
addManagedObjectPool
in interfaceSectionDesigner
- Parameters:
managedObjectPoolName
- Name of theSectionManagedObjectPool
.managedObjectPoolSourceClassName
- Fully qualified class name of theManagedObjectPoolSource
.- Returns:
- Added
SectionManagedObjectPool
.
-
addManagedObjectPool
public SectionManagedObjectPool addManagedObjectPool(java.lang.String managedObjectPoolName, ManagedObjectPoolSource managedObjectPoolSource)
Description copied from interface:SectionDesigner
Adds aSectionManagedObjectPool
.- Specified by:
addManagedObjectPool
in interfaceSectionDesigner
- Parameters:
managedObjectPoolName
- Name of theSectionManagedObjectPool
.managedObjectPoolSource
-ManagedObjectPoolSource
instance to use.- Returns:
SectionManagedObjectPool
.
-
addSubSection
public SubSection addSubSection(java.lang.String subSectionName, java.lang.String sectionSourceClassName, java.lang.String location)
Description copied from interface:SectionDesigner
Adds aSubSection
to theSectionNode
being built.- Specified by:
addSubSection
in interfaceSectionDesigner
- Parameters:
subSectionName
- Name of theSubSection
.sectionSourceClassName
- Fully qualified class name of theSectionSource
for theSubSection
. This allows adding theSubSection
without having to worry if theSectionSource
is available on the class path. This should be used over attempting to find theSectionSource
- as should leave to the compiler to find theSectionSource
.location
- Location of theSubSection
.- Returns:
SubSection
.
-
addSubSection
public SubSection addSubSection(java.lang.String subSectionName, SectionSource sectionSource, java.lang.String location)
Description copied from interface:SectionDesigner
Adds aSubSection
to theSectionNode
being built.- Specified by:
addSubSection
in interfaceSectionDesigner
- Parameters:
subSectionName
- Name of theSubSection
.sectionSource
-SectionSource
to enable providing direct instances. This should only be used should theSectionSource
want to create aSubSection
instance by supplying its own instantiatedSectionSource
implementation.location
- Location of theSubSection
.- Returns:
SubSection
.
-
link
public void link(SectionManagedObjectSource managedObjectSource, SectionManagedObjectPool managedObjectPool)
Description copied from interface:SectionDesigner
Links theSectionManagedObjectSource
to be pooled by theSectionManagedObjectPool
.- Specified by:
link
in interfaceSectionDesigner
- Parameters:
managedObjectSource
-SectionManagedObjectSource
.managedObjectPool
-SectionManagedObjectPool
.
-
link
public void link(SectionFlowSourceNode flowSourceNode, SectionFlowSinkNode flowSinkNode)
Description copied from interface:SectionDesigner
Links theSectionFlowSourceNode
to undertaken by theSectionFlowSinkNode
.- Specified by:
link
in interfaceSectionDesigner
- Parameters:
flowSourceNode
-SectionFlowSourceNode
.flowSinkNode
-SectionFlowSinkNode
.
-
link
public void link(FunctionFlow functionFlow, SectionFlowSinkNode sectionSinkNode, boolean isSpawnThreadState)
Description copied from interface:SectionDesigner
Links theFunctionFlow
to be undertaken by theSectionFlowSinkNode
.- Specified by:
link
in interfaceSectionDesigner
- Parameters:
functionFlow
-FunctionFlow
.sectionSinkNode
-SectionFlowSinkNode
.isSpawnThreadState
- Indicates if spawnsThreadState
forFlow
.
-
link
public void link(SectionDependencyRequireNode sectionRequireNode, SectionDependencyObjectNode sectionObjectNode)
Description copied from interface:SectionDesigner
Links theSectionDependencyRequireNode
to be fulfilled by theSectionDependencyObjectNode
.- Specified by:
link
in interfaceSectionDesigner
- Parameters:
sectionRequireNode
-SectionDependencyRequireNode
.sectionObjectNode
-SectionDependencyObjectNode
.
-
addIssue
public CompileError addIssue(java.lang.String issueDescription)
Description copied from interface:SourceIssues
Allows the source to add an issue.
This is available to report invalid configuration.
- Specified by:
addIssue
in interfaceSourceIssues
- Parameters:
issueDescription
- Description of the issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling.
-
addIssue
public CompileError addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Description copied from interface:SourceIssues
Allows the source to add an issue along with its cause.
This is available to report invalid configuration.
- Specified by:
addIssue
in interfaceSourceIssues
- Parameters:
issueDescription
- Description of the issue.cause
- Cause of the issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling.
-
-