public class HttpTemplateSectionSource extends ClassSectionSource
SectionSource
for the HTTP template.Modifier and Type | Class and Description |
---|---|
static class |
HttpTemplateSectionSource.NoLogicClass
Class to use if no class specified.
|
AbstractSectionSource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
ON_COMPLETION_OUTPUT_NAME
Name of the
SectionOutput for flow after completion of rending
the HttpTemplate . |
static String |
OVERRIDE_SECTION_PREFIX
Prefix on a
HttpTemplateSection name to indicate it is an
override section. |
static String |
PROPERTY_CHARSET
Property name for the
Charset for the HttpTemplate . |
static String |
PROPERTY_CLASS_NAME
Property name for the
Class providing the backing logic to the
template. |
static String |
PROPERTY_CONTENT_TYPE
Property name for the Content-Type for the
HttpTemplate . |
static String |
PROPERTY_INHERITED_TEMPLATES
Property name for the comma separated list of inherited templates.
|
static String |
PROPERTY_TEMPLATE_URI
Property name for the
HttpTemplate URI path. |
static String |
RENDER_TEMPLATE_INPUT_NAME
Name of the
SectionInput for rendering this HttpTemplate . |
CLASS_OBJECT_NAME
Constructor and Description |
---|
HttpTemplateSectionSource() |
Modifier and Type | Method and Description |
---|---|
protected SectionManagedObject |
createClassManagedObject(String objectName,
Class<?> sectionClass)
Creates the
SectionManagedObject for providing the section
object. |
protected void |
enrichTask(SectionTask task,
TaskType<?,?,?> taskType,
Method method,
Class<?> parameterType)
Enriches the
Task . |
protected DependencyMetaData[] |
extractClassManagedObjectDependencies(String objectName,
Class<?> sectionClass)
Extracts the
DependencyMetaData instances for the section object. |
static net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] |
filterCommentHttpTemplateSections(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] sections)
Removes the comment
HttpTemplateSection instances. |
protected Class<?> |
getSectionClass(String sectionClassName)
Obtains the section class.
|
protected String |
getSectionClassName()
Obtains the name of the class for the section.
|
static net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] |
inheritHttpTemplateSections(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] parentSections,
net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] childSections,
SectionDesigner designer)
Returns the result of inheriting the parent
HttpTemplateSection
instances with the child HttpTemplateSection overrides. |
protected void |
linkTaskFlow(TaskFlow taskFlow,
TaskType<?,?,?> taskType,
Class<?> flowInterfaceType,
Method flowMethod,
Class<?> flowArgumentType)
Links the
TaskFlow . |
protected void |
loadSpecification(AbstractSectionSource.SpecificationContext context)
Loads the
SectionSourceSpecification . |
static String |
reconstructHttpTemplateContent(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] sections)
Reconstructs the
HttpTemplate raw content from the
HttpTemplateSection instances. |
void |
sourceSection(SectionDesigner designer,
SectionSourceContext context)
Sources the
OfficeSection by constructing it via the input
SectionDesigner . |
getContext, getDesigner, getManagedObject, getOrCreateObject, getOrCreateOutput, getOrCreateSubSection, getSectionSourceAlias, getSectionSourceClass, getTaskByName, getTaskByTypeName, getTaskName, linkNextTask, linkTaskEscalation, linkTaskFlow, linkTaskObject, registerTaskByTypeName
getSpecification
public static final String PROPERTY_TEMPLATE_URI
HttpTemplate
URI path.public static final String PROPERTY_CLASS_NAME
Class
providing the backing logic to the
template.public static final String PROPERTY_INHERITED_TEMPLATES
public static final String PROPERTY_CONTENT_TYPE
HttpTemplate
.public static final String PROPERTY_CHARSET
Charset
for the HttpTemplate
.public static final String OVERRIDE_SECTION_PREFIX
HttpTemplateSection
name to indicate it is an
override section.public static final String RENDER_TEMPLATE_INPUT_NAME
SectionInput
for rendering this HttpTemplate
.public static final String ON_COMPLETION_OUTPUT_NAME
SectionOutput
for flow after completion of rending
the HttpTemplate
.public static net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] filterCommentHttpTemplateSections(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] sections)
HttpTemplateSection
instances.sections
- Listing of HttpTemplateSection
instances.HttpTemplateSection
instances.public static net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] inheritHttpTemplateSections(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] parentSections, net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] childSections, SectionDesigner designer)
HttpTemplateSection
instances with the child HttpTemplateSection
overrides.parentSections
- Parent HttpTemplateSection
instances to inherit.childSections
- Child HttpTemplateSection
instances to override.designer
- SectionDesigner
.HttpTemplateSection
instances from result of inheritance.public static String reconstructHttpTemplateContent(net.officefloor.plugin.web.http.template.parse.HttpTemplateSection[] sections)
HttpTemplate
raw content from the
HttpTemplateSection
instances.sections
- HttpTemplateSection
instances.HttpTemplate
content from reconstruction from the
HttpTemplateSection
instances.protected void loadSpecification(AbstractSectionSource.SpecificationContext context)
AbstractSectionSource
SectionSourceSpecification
.loadSpecification
in class ClassSectionSource
context
- AbstractSectionSource.SpecificationContext
.public void sourceSection(SectionDesigner designer, SectionSourceContext context) throws Exception
SectionSource
OfficeSection
by constructing it via the input
SectionDesigner
.sourceSection
in interface SectionSource
sourceSection
in class ClassSectionSource
designer
- SectionDesigner
to construct the structure of the
OfficeSection
.context
- SectionSourceContext
to source details to construct
the OfficeSection
.Exception
- If fails to construct the OfficeSection
.protected String getSectionClassName()
ClassSectionSource
getSectionClassName
in class ClassSectionSource
protected Class<?> getSectionClass(String sectionClassName) throws Exception
ClassSectionSource
getSectionClass
in class ClassSectionSource
sectionClassName
- Name of the section class.Exception
- If fails to obtain the section class.protected SectionManagedObject createClassManagedObject(String objectName, Class<?> sectionClass)
ClassSectionSource
SectionManagedObject
for providing the section
object.createClassManagedObject
in class ClassSectionSource
objectName
- Name of the object within the section.sectionClass
- Section object class.SectionManagedObject
.protected DependencyMetaData[] extractClassManagedObjectDependencies(String objectName, Class<?> sectionClass) throws Exception
ClassSectionSource
DependencyMetaData
instances for the section object.extractClassManagedObjectDependencies
in class ClassSectionSource
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 void enrichTask(SectionTask task, TaskType<?,?,?> taskType, Method method, Class<?> parameterType)
ClassSectionSource
Task
.enrichTask
in class ClassSectionSource
task
- SectionTask
.taskType
- TaskType
for the SectionTask
.method
- Method
for the SectionTask
.parameterType
- Parameter type for the SectionTask
. May be
null
if no parameter.protected void linkTaskFlow(TaskFlow taskFlow, TaskType<?,?,?> taskType, Class<?> flowInterfaceType, Method flowMethod, Class<?> flowArgumentType)
ClassSectionSource
TaskFlow
.linkTaskFlow
in class ClassSectionSource
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.Copyright © 2005–2016. All rights reserved.