Class TransformSectionSource
- java.lang.Object
-
- net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
-
- net.officefloor.plugin.section.transform.TransformSectionSource
-
- All Implemented Interfaces:
OfficeSectionTransformer
,SectionSource
@PrivateSource public class TransformSectionSource extends AbstractSectionSource implements OfficeSectionTransformer
Enables transforming aSectionSource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
AbstractSectionSource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_SECTION_LOCATION
Name of theProperty
for the location of theSectionSource
to transform.static java.lang.String
PROPERTY_SECTION_PROPERTY_PREFIX
static java.lang.String
PROPERTY_SECTION_SOURCE_CLASS_NAME
static java.lang.String
SUB_SECTION_NAME
Name of theSubSection
being transformed.
-
Constructor Summary
Constructors Constructor Description TransformSectionSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureProperties(OfficeSectionTransformerContext context, PropertyList properties)
Enables overriding to configure additionalProperty
instances.protected SectionSourceContext
getContext()
Obtains theSectionSourceContext
.protected TransformSectionDesigner
getDesginer()
Obtains theTransformSectionDesigner
to configure the transformedSectionSource
.protected void
loadEnhancements()
Loads further enhancements.protected void
loadSectionInput(SectionInputType inputType)
Loads theSectionInput
.protected void
loadSectionObject(SectionObjectType objectType)
Loads theSectionObject
.protected void
loadSectionOutput(SectionOutputType outputType)
Loads theSectionOutput
.protected void
loadSpecification(AbstractSectionSource.SpecificationContext context)
Loads theSectionSourceSpecification
.protected void
loadSubSection(java.lang.String sectionSourceClassName, java.lang.String sectionLocation, PropertyList properties)
Loads theSectionSource
.void
sourceSection(SectionDesigner designer, SectionSourceContext context)
Sources theOfficeSection
by constructing it via the inputSectionDesigner
.void
transformOfficeSection(OfficeSectionTransformerContext context)
Transforms theOfficeSection
.-
Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
getSpecification
-
-
-
-
Field Detail
-
PROPERTY_SECTION_SOURCE_CLASS_NAME
public static final java.lang.String PROPERTY_SECTION_SOURCE_CLASS_NAME
- See Also:
- Constant Field Values
-
PROPERTY_SECTION_LOCATION
public static final java.lang.String PROPERTY_SECTION_LOCATION
Name of theProperty
for the location of theSectionSource
to transform.- See Also:
- Constant Field Values
-
PROPERTY_SECTION_PROPERTY_PREFIX
public static final java.lang.String PROPERTY_SECTION_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
SUB_SECTION_NAME
public static final java.lang.String SUB_SECTION_NAME
Name of theSubSection
being transformed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDesginer
protected final TransformSectionDesigner getDesginer()
Obtains theTransformSectionDesigner
to configure the transformedSectionSource
.- Returns:
TransformSectionDesigner
.
-
getContext
protected final SectionSourceContext getContext()
Obtains theSectionSourceContext
.- Returns:
SectionSourceContext
.
-
loadSubSection
protected void loadSubSection(java.lang.String sectionSourceClassName, java.lang.String sectionLocation, PropertyList properties) throws java.lang.Exception
Loads the
SectionSource
.Override to alter the
SectionSource
.- Parameters:
sectionSourceClassName
-SectionSource
class name.sectionLocation
-SectionSource
location.properties
-PropertyList
for theSectionSource
.- Throws:
java.lang.Exception
- If fails to load the wrappedSubSection
.
-
loadSectionInput
protected void loadSectionInput(SectionInputType inputType) throws java.lang.Exception
Loads the
SectionInput
.Override to alter
SectionInput
instances.- Parameters:
inputType
-SectionInputType
.- Throws:
java.lang.Exception
- If fails to load theSectionInput
.
-
loadSectionOutput
protected void loadSectionOutput(SectionOutputType outputType) throws java.lang.Exception
Loads the
SectionOutput
.Override to alter
SectionOutput
instances.- Parameters:
outputType
-SectionOutputType
.- Throws:
java.lang.Exception
- If fails to load theSectionOutput
.
-
loadSectionObject
protected void loadSectionObject(SectionObjectType objectType) throws java.lang.Exception
Loads the
SectionObject
.Override to alter
SectionObject
instances.- Parameters:
objectType
-SectionObjectType
.- Throws:
java.lang.Exception
- If fails to laod theSectionObject
.
-
loadEnhancements
protected void loadEnhancements() throws java.lang.Exception
Loads further enhancements.
Override to load further enhancements.
- Throws:
java.lang.Exception
- If fails to load enhancements.
-
transformOfficeSection
public void transformOfficeSection(OfficeSectionTransformerContext context)
Description copied from interface:OfficeSectionTransformer
Transforms theOfficeSection
.- Specified by:
transformOfficeSection
in interfaceOfficeSectionTransformer
- Parameters:
context
-OfficeSectionTransformerContext
.
-
configureProperties
protected void configureProperties(OfficeSectionTransformerContext context, PropertyList properties)
Enables overriding to configure additionalProperty
instances.- Parameters:
context
-OfficeSectionTransformerContext
.properties
-PropertyList
to load additionalProperty
instances.
-
loadSpecification
protected void loadSpecification(AbstractSectionSource.SpecificationContext context)
Description copied from class:AbstractSectionSource
Loads theSectionSourceSpecification
.- Specified by:
loadSpecification
in classAbstractSectionSource
- Parameters:
context
-AbstractSectionSource.SpecificationContext
.
-
sourceSection
public void sourceSection(SectionDesigner designer, SectionSourceContext context) throws java.lang.Exception
Description copied from interface:SectionSource
Sources theOfficeSection
by constructing it via the inputSectionDesigner
.- Specified by:
sourceSection
in interfaceSectionSource
- Parameters:
designer
-SectionDesigner
to construct the structure of theOfficeSection
.context
-SectionSourceContext
to source details to construct theOfficeSection
.- Throws:
java.lang.Exception
- If fails to construct theOfficeSection
.
-
-