Class ClassSectionLoader
- java.lang.Object
-
- net.officefloor.plugin.section.clazz.loader.ClassSectionLoader
-
- All Implemented Interfaces:
ClassSectionLoaderContext
public class ClassSectionLoader extends java.lang.Object implements ClassSectionLoaderContext
Class
loader forSectionSource
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassSectionLoader(SectionDesigner designer, SectionSourceContext sectionContext)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassSectionFunctionNamespace
addManagedFunctions(java.lang.String namespaceName, java.lang.String managedFunctionSourceClassName, PropertyList properties, FunctionDecoration functionDecoration)
Loads theSectionFunction
instances.ClassSectionFunctionNamespace
addManagedFunctions(java.lang.String namespaceName, ManagedFunctionSource managedFunctionSource, PropertyList properties, FunctionDecoration functionDecoration)
Loads theSectionFunction
instances.ClassSectionManagedObject
addManagedObject(java.lang.String objectName, java.lang.String managedObjectSourceClassName, PropertyList properties, ObjectDecoration objectDecoration)
Loads theSectionManagedObject
.ClassSectionManagedObject
addManagedObject(java.lang.String objectName, ManagedObjectSource<?,?> managedObjectSource, PropertyList properties, ObjectDecoration objectDecoration)
Loads theSectionManagedObject
.SectionDependencyObjectNode
getDependency(java.lang.String qualifier, java.lang.String typeName)
Obtains theSectionDependencyObjectNode
.SectionFlowSinkNode
getEscalation(java.lang.Class<?> escalationType)
Obtains theSectionFlowSinkNode
for theEscalation
.ClassSectionFlow
getFlow(java.lang.String flowName, java.lang.String argumentTypeName)
Obtains theClassSectionFlow
.ClassSectionManagedFunction
getFunction(java.lang.String functionName)
Obtains theClassSectionManagedFunction
.SectionDesigner
getSectionDesigner()
Obtains theSectionDesigner
.ClassSectionFlowContext
getSectionFlowContext()
Obtains theClassSectionFlowContext
.ClassSectionObjectContext
getSectionObjectContext()
Obtains theClassSectionObjectContext
.protected java.lang.String
getSectionObjectName(java.lang.String qualifier, java.lang.String typeName)
Obtains theSectionObject
name.SectionSourceContext
getSectionSourceContext()
Obtains theSectionSourceContext
.protected boolean
isQualifier(java.lang.String qualifier)
Indicates if have qualifier.void
load()
Links non-configured items.
-
-
-
Constructor Detail
-
ClassSectionLoader
public ClassSectionLoader(SectionDesigner designer, SectionSourceContext sectionContext)
Instantiate.- Parameters:
designer
-SectionDesigner
.sectionContext
-SectionSourceContext
.
-
-
Method Detail
-
getSectionObjectName
protected java.lang.String getSectionObjectName(java.lang.String qualifier, java.lang.String typeName)
Obtains theSectionObject
name.- Parameters:
qualifier
- Qualifier. May benull
.typeName
- Type of object.- Returns:
SectionObject
name.
-
isQualifier
protected boolean isQualifier(java.lang.String qualifier)
Indicates if have qualifier.- Parameters:
qualifier
- Qualifier.- Returns:
true
if have qualifier.
-
addManagedFunctions
public ClassSectionFunctionNamespace addManagedFunctions(java.lang.String namespaceName, java.lang.String managedFunctionSourceClassName, PropertyList properties, FunctionDecoration functionDecoration) throws java.lang.Exception
Loads theSectionFunction
instances.- Parameters:
namespaceName
- Name ofSectionFunctionNamespace
.managedFunctionSourceClassName
-ManagedFunctionSource
Class
name.properties
-PropertyList
for theManagedFunctionSource
.functionDecoration
-FunctionDecoration
. May benull
.- Returns:
ClassSectionFunctionNamespace
.- Throws:
java.lang.Exception
- If fails to loadSectionFunction
instances.
-
addManagedFunctions
public ClassSectionFunctionNamespace addManagedFunctions(java.lang.String namespaceName, ManagedFunctionSource managedFunctionSource, PropertyList properties, FunctionDecoration functionDecoration) throws java.lang.Exception
Loads theSectionFunction
instances.- Parameters:
namespaceName
- Name ofSectionFunctionNamespace
.managedFunctionSource
-ManagedFunctionSource
.properties
-PropertyList
for theManagedFunctionSource
.functionDecoration
-FunctionDecoration
. May benull
.- Returns:
ClassSectionFunctionNamespace
.- Throws:
java.lang.Exception
- If fails to loadSectionFunction
instances.
-
addManagedObject
public ClassSectionManagedObject addManagedObject(java.lang.String objectName, java.lang.String managedObjectSourceClassName, PropertyList properties, ObjectDecoration objectDecoration) throws java.lang.Exception
Loads theSectionManagedObject
.- Parameters:
objectName
- Name ofSectionManagedObject
.managedObjectSourceClassName
-ManagedObjectSource
Class
name.properties
-PropertyList
for theManagedObjectSource
.objectDecoration
-ObjectDecoration
May benull
.- Returns:
ClassSectionManagedObject
.- Throws:
java.lang.Exception
- If fails to load theSectionManagedObject
.
-
addManagedObject
public ClassSectionManagedObject addManagedObject(java.lang.String objectName, ManagedObjectSource<?,?> managedObjectSource, PropertyList properties, ObjectDecoration objectDecoration) throws java.lang.Exception
Loads theSectionManagedObject
.- Parameters:
objectName
- Name ofSectionManagedObject
.managedObjectSource
-ManagedObjectSource
.properties
-PropertyList
for theManagedObjectSource
.objectDecoration
-ObjectDecoration
May benull
.- Returns:
ClassSectionManagedObject
.- Throws:
java.lang.Exception
- If fails to load theSectionManagedObject
.
-
getDependency
public SectionDependencyObjectNode getDependency(java.lang.String qualifier, java.lang.String typeName) throws java.lang.Exception
Obtains theSectionDependencyObjectNode
.- Parameters:
qualifier
- Qualifier. May benull
.typeName
- Type name of dependency.- Returns:
SectionDependencyObjectNode
.- Throws:
java.lang.Exception
- If fails to obtainSectionDependencyObjectNode
.
-
getFlow
public ClassSectionFlow getFlow(java.lang.String flowName, java.lang.String argumentTypeName)
Obtains theClassSectionFlow
.- Parameters:
flowName
- Name of theSectionFlowSinkNode
.argumentTypeName
- Argument type name. May benull
for no argument.- Returns:
ClassSectionFlow
.
-
getFunction
public ClassSectionManagedFunction getFunction(java.lang.String functionName)
Obtains theClassSectionManagedFunction
.- Parameters:
functionName
- Name of theSectionFunction
.- Returns:
ClassSectionManagedFunction
ornull
if noSectionFunction
by the name.
-
getEscalation
public SectionFlowSinkNode getEscalation(java.lang.Class<?> escalationType) throws java.lang.Exception
Obtains theSectionFlowSinkNode
for theEscalation
.- Parameters:
escalationType
-Escalation
type.- Returns:
SectionFlowSinkNode
.- Throws:
java.lang.Exception
- If fails to obtainSectionFlowSinkNode
.
-
load
public void load() throws java.lang.Exception
Links non-configured items.- Throws:
java.lang.Exception
- If fails to configure.
-
getSectionObjectContext
public ClassSectionObjectContext getSectionObjectContext()
Description copied from interface:ClassSectionLoaderContext
Obtains theClassSectionObjectContext
.- Specified by:
getSectionObjectContext
in interfaceClassSectionLoaderContext
- Returns:
ClassSectionObjectContext
.
-
getSectionFlowContext
public ClassSectionFlowContext getSectionFlowContext()
Description copied from interface:ClassSectionLoaderContext
Obtains theClassSectionFlowContext
.- Specified by:
getSectionFlowContext
in interfaceClassSectionLoaderContext
- Returns:
ClassSectionFlowContext
.
-
getSectionDesigner
public SectionDesigner getSectionDesigner()
Description copied from interface:ClassSectionLoaderContext
Obtains theSectionDesigner
.- Specified by:
getSectionDesigner
in interfaceClassSectionLoaderContext
- Returns:
SectionDesigner
.
-
getSectionSourceContext
public SectionSourceContext getSectionSourceContext()
Description copied from interface:ClassSectionLoaderContext
Obtains theSectionSourceContext
.- Specified by:
getSectionSourceContext
in interfaceClassSectionLoaderContext
- Returns:
SectionSourceContext
.
-
-