Class ClassSectionSource
- java.lang.Object
-
- net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
-
- net.officefloor.plugin.section.clazz.ClassSectionSource
-
- All Implemented Interfaces:
SectionSourceService<ClassSectionSource>
,SectionSourceServiceFactory
,SectionSource
,ServiceFactory<SectionSourceService<?>>
public class ClassSectionSource extends AbstractSectionSource implements SectionSourceService<ClassSectionSource>, SectionSourceServiceFactory
Class
SectionSource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClassSectionSource.SectionClassManagedFunctionSource
ManagedFunctionSource
implementation to provide theManagedFunction
instances for theClassSectionSource
.-
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
CLASS_OBJECT_NAME
Name of theSectionManagedObject
for the section class.
-
Constructor Summary
Constructors Constructor Description ClassSectionSource()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SectionSourceService<?>
createService(ServiceContext context)
Creates the service.java.lang.String
getSectionSourceAlias()
Obtains the alias for theSectionSource
Class
.java.lang.Class<ClassSectionSource>
getSectionSourceClass()
Obtains theSectionSource
Class
.static ClassSectionFunctionNamespace
loadClassFunctions(java.lang.Class<?> sectionClass, SectionManagedObject sectionManagedObject, boolean isProvideInputs, ClassSectionLoader loader, SectionSourceContext context)
Loads theClass
SectionFunction
instances.protected void
loadSpecification(AbstractSectionSource.SpecificationContext context)
Loads theSectionSourceSpecification
.void
sourceSection(SectionDesigner designer, SectionSourceContext context)
Sources theOfficeSection
by constructing it via the inputSectionDesigner
.-
Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
getSpecification
-
-
-
-
Field Detail
-
CLASS_OBJECT_NAME
public static final java.lang.String CLASS_OBJECT_NAME
Name of theSectionManagedObject
for the section class.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadClassFunctions
public static ClassSectionFunctionNamespace loadClassFunctions(java.lang.Class<?> sectionClass, SectionManagedObject sectionManagedObject, boolean isProvideInputs, ClassSectionLoader loader, SectionSourceContext context) throws java.lang.Exception
Loads theClass
SectionFunction
instances.- Parameters:
sectionClass
- SectionClass
.sectionManagedObject
-SectionManagedObject
providing theClass
object.isProvideInputs
- Indicates if provideSectionInput
instances for eachManagedFunction
.loader
-ClassSectionLoader
.context
-SectionSourceContext
.- Returns:
ClassSectionFunctionNamespace
.- Throws:
java.lang.Exception
- If fails to load theSectionFunction
instances.
-
createService
public SectionSourceService<?> createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<SectionSourceService<?>>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
getSectionSourceAlias
public java.lang.String getSectionSourceAlias()
Description copied from interface:SectionSourceService
Obtains the alias for theSectionSource
Class
.- Specified by:
getSectionSourceAlias
in interfaceSectionSourceService<ClassSectionSource>
- Returns:
- Alias for the
SectionSource
Class
.
-
getSectionSourceClass
public java.lang.Class<ClassSectionSource> getSectionSourceClass()
Description copied from interface:SectionSourceService
Obtains theSectionSource
Class
.- Specified by:
getSectionSourceClass
in interfaceSectionSourceService<ClassSectionSource>
- Returns:
SectionSource
Class
.
-
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
.
-
-