|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.compile.spi.section.source.impl.AbstractSectionSource
net.officefloor.plugin.section.clazz.ClassSectionSource
public class ClassSectionSource
Class SectionSource.
The implementation has been segregated into smaller methods to allow
overriding to re-use ClassSectionSource for other uses.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource |
|---|
AbstractSectionSource.SpecificationContext |
| Field Summary | |
|---|---|
static String |
CLASS_OBJECT_NAME
Name of the SectionManagedObject for the section class. |
| Constructor Summary | |
|---|---|
ClassSectionSource()
|
|
| Method Summary | |
|---|---|
protected SectionManagedObject |
createClassManagedObject(String objectName,
Class<?> sectionClass)
Creates the SectionManagedObject for providing the section
object. |
protected void |
enrichTask(SectionTask task,
TaskType<?,?,?> taskType,
Method taskMethod,
Class<?> parameterType)
Enriches the Task. |
protected DependencyMetaData[] |
extractClassManagedObjectDependencies(String objectName,
Class<?> sectionClass)
Extracts the DependencyMetaData instances for the section object. |
protected SectionSourceContext |
getContext()
Obtains the SectionSourceContext. |
protected SectionDesigner |
getDesigner()
Obtains the SectionDesigner. |
SectionManagedObject |
getManagedObject(String typeName)
Obtains the SectionManagedObject for the type. |
SectionObject |
getOrCreateObject(String qualifier,
String typeName)
Obtains the SectionObject. |
SectionOutput |
getOrCreateOutput(String name,
String argumentType,
boolean isEscalationOnly)
Obtains the SectionOutput. |
SubSection |
getOrCreateSubSection(Class<?> sectionInterfaceType,
SectionInterface sectionAnnotation)
Obtains the SubSection. |
protected Class<?> |
getSectionClass(String sectionClassName)
Obtains the section class. |
protected String |
getSectionClassName()
Obtains the name of the class for the section. |
String |
getSectionSourceAlias()
Obtains the alias for the SectionSource Class. |
Class<ClassSectionSource> |
getSectionSourceClass()
Obtains the SectionSource Class. |
SectionTask |
getTaskByName(String taskName)
Obtains the SectionTask by its name. |
SectionTask |
getTaskByTypeName(String taskTypeName)
Obtains the SectionTask by its TaskType name. |
protected String |
getTaskName(TaskType<?,?,?> taskType)
Obtains the Task name from the TaskType. |
protected void |
linkNextTask(SectionTask task,
TaskType<?,?,?> taskType,
Method taskMethod,
Class<?> argumentType,
NextTask nextTaskAnnotation)
Links the next Task. |
protected void |
linkTaskEscalation(SectionTask task,
TaskType<?,?,?> taskType,
TaskEscalationType escalationType,
SectionTask escalationHandler)
Links the Task escalation. |
protected void |
linkTaskFlow(SectionTask task,
TaskType<?,?,?> taskType,
Class<?> flowInterfaceType,
Method flowMethod,
Class<?> flowArgumentType)
Links the TaskFlow. |
protected void |
linkTaskFlow(TaskFlow taskFlow,
TaskType<?,?,?> taskType,
Class<?> flowInterfaceType,
Method flowMethod,
Class<?> flowArgumentType)
Links the TaskFlow. |
protected void |
linkTaskObject(SectionTask task,
TaskType<?,?,?> taskType,
TaskObjectType<?> objectType)
Links the TaskObject. |
protected void |
loadSpecification(AbstractSectionSource.SpecificationContext context)
Loads the SectionSourceSpecification. |
void |
registerTaskByTypeName(String taskTypeName,
SectionTask task)
Allows being made aware of further SectionTask instances within
the section to be considered for linking flows. |
void |
sourceSection(SectionDesigner designer,
SectionSourceContext context)
Sources the OfficeSection by constructing it via the input
SectionDesigner. |
| Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource |
|---|
getSpecification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASS_OBJECT_NAME
SectionManagedObject for the section class.
| Constructor Detail |
|---|
public ClassSectionSource()
| Method Detail |
|---|
protected SectionDesigner getDesigner()
SectionDesigner.
SectionDesigner;protected SectionSourceContext getContext()
SectionSourceContext.
SectionSourceContext.public SectionTask getTaskByName(String taskName)
SectionTask by its name.
taskName - Name of the SectionTask.
SectionTask or null if no
SectionTask by the name.public SectionTask getTaskByTypeName(String taskTypeName)
SectionTask by its TaskType name.
taskTypeName - TaskType name.
SectionTask or null if no
SectionTask by the TaskType name.
public void registerTaskByTypeName(String taskTypeName,
SectionTask task)
Allows being made aware of further SectionTask instances within
the section to be considered for linking flows.
This allows ClassSectionSource to be used in conjunction with
other functionality - such as template rendering for dynamic HTTP web
pages.
taskTypeName - Name to register the SectionTask.task - SectionTask.
public SectionObject getOrCreateObject(String qualifier,
String typeName)
Obtains the SectionObject.
Should the SectionObject not yet be added, it is added.
qualifier - Qualifier for the SectionObject. If not
Qualifier should be the same as the type name.typeName - Fully qualified type name of the SectionObject.
SectionObject.public SectionManagedObject getManagedObject(String typeName)
SectionManagedObject for the type.
typeName - Fully qualified type name of the object for the
SectionManagedObject.
SectionManagedObject or null if no
SectionManagedObject for the type.
public SectionOutput getOrCreateOutput(String name,
String argumentType,
boolean isEscalationOnly)
Obtains the SectionOutput.
Should the SectionOutput not yet be added, it is added.
name - Name of the SectionOutput.argumentType - Type of the argument. May be null if no argument.isEscalationOnly - true if escalation only.
SectionObject.
public SubSection getOrCreateSubSection(Class<?> sectionInterfaceType,
SectionInterface sectionAnnotation)
Obtains the SubSection.
Should the SubSection not already be created, it is created.
sectionInterfaceType - Type that is annotated with SectionInterface.sectionAnnotation - SectionInterface annotation.
SubSection.protected String getSectionClassName()
protected Class<?> getSectionClass(String sectionClassName)
throws Exception
sectionClassName - Name of the section class.
Exception - If fails to obtain the section class.
protected SectionManagedObject createClassManagedObject(String objectName,
Class<?> sectionClass)
SectionManagedObject for providing the section
object.
objectName - Name of the object within the section.sectionClass - Section object class.
SectionManagedObject.
protected DependencyMetaData[] extractClassManagedObjectDependencies(String objectName,
Class<?> sectionClass)
throws Exception
DependencyMetaData instances for the section object.
objectName - Name of the object within the section.sectionClass - Section object class.
DependencyMetaData instances for the section
object.
Exception - If fails to extract the DependencyMetaData instances.protected String getTaskName(TaskType<?,?,?> taskType)
Task name from the TaskType.
taskType - TaskType.
Task name.
protected void enrichTask(SectionTask task,
TaskType<?,?,?> taskType,
Method taskMethod,
Class<?> parameterType)
Task.
task - SectionTask.taskType - TaskType for the SectionTask.taskMethod - Method for the SectionTask.parameterType - Parameter type for the SectionTask. May be
null if no parameter.
protected void linkNextTask(SectionTask task,
TaskType<?,?,?> taskType,
Method taskMethod,
Class<?> argumentType,
NextTask nextTaskAnnotation)
Task.
task - SectionTask.taskType - TaskType.taskMethod - Method for the SectionTask.argumentType - Argument type. May be null if no argument type.nextTaskAnnotation - NextTask annotation on the Method.
protected void linkTaskFlow(SectionTask task,
TaskType<?,?,?> taskType,
Class<?> flowInterfaceType,
Method flowMethod,
Class<?> flowArgumentType)
TaskFlow.
task - SectionTask.taskType - TaskType.flowInterfaceType - Interface type specifying the flows.flowMethod - Method on the interface for the flow to be linked.flowArgumentType - TaskFlow argument type. May be null if no
argument.
protected void linkTaskFlow(TaskFlow taskFlow,
TaskType<?,?,?> taskType,
Class<?> flowInterfaceType,
Method flowMethod,
Class<?> flowArgumentType)
TaskFlow.
taskFlow - TaskFlow.taskType - TaskType.flowInterfaceType - Interface type specifying the flows.flowMethod - Method on the interface for the flow to be linked.flowArgumentType - TaskFlow argument type. May be null if no
argument.
protected void linkTaskEscalation(SectionTask task,
TaskType<?,?,?> taskType,
TaskEscalationType escalationType,
SectionTask escalationHandler)
Task escalation.
task - SectionTask.taskType - TaskType.escalationType - TaskEscalationType.escalationHandler - Potential SectionTask that can handle escalation based
on its parameter. May be null if no
SectionTask can handle the escalation.
protected void linkTaskObject(SectionTask task,
TaskType<?,?,?> taskType,
TaskObjectType<?> objectType)
TaskObject.
task - SectionTask.taskType - TaskType.objectType - TaskObjectType.public String getSectionSourceAlias()
SectionSourceServiceSectionSource Class.
getSectionSourceAlias in interface SectionSourceService<ClassSectionSource>SectionSource Class.public Class<ClassSectionSource> getSectionSourceClass()
SectionSourceServiceSectionSource Class.
getSectionSourceClass in interface SectionSourceService<ClassSectionSource>SectionSource Class.protected void loadSpecification(AbstractSectionSource.SpecificationContext context)
AbstractSectionSourceSectionSourceSpecification.
loadSpecification in class AbstractSectionSourcecontext - AbstractSectionSource.SpecificationContext.
public void sourceSection(SectionDesigner designer,
SectionSourceContext context)
throws Exception
SectionSourceOfficeSection by constructing it via the input
SectionDesigner.
sourceSection in interface SectionSourcedesigner - SectionDesigner to construct the structure of the
OfficeSection.context - SectionSourceContext to source details to construct
the OfficeSection.
Exception - If fails to construct the OfficeSection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||