Class ComposeSectionSource
java.lang.Object
net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
net.officefloor.activity.compose.section.ComposeSectionSource
- All Implemented Interfaces:
SectionSource
SectionSource for-
Nested Class Summary
Nested classes/interfaces inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
AbstractSectionSource.SpecificationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalAccessFunction(String functionName, Consumer<String> handleNotConfigured) Flags a composed function is to be externally accessed.static <F,H> void link(Map<String, String> configuration, CompositionConfiguration compositionConfiguration, F[] flowTypes, Function<F, String> getFlowName, Function<String, H> getHandler, BiConsumer<F, H> link, Consumer<F> nonConfiguredFlowHandler, BiConsumer<F, String> noHandlerAvailable, BiConsumer<String, String> extraConfiguredFlowHandler) Links flow to handler based on configuration.protected voidloadSpecification(AbstractSectionSource.SpecificationContext specificationContext) Loads theSectionSourceSpecification.voidsourceSection(SectionDesigner sectionDesigner, SectionSourceContext sectionSourceContext) Sources theOfficeSectionby constructing it via the inputSectionDesigner.Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
getSpecification
-
Constructor Details
-
ComposeSectionSource
Instantiate.- Parameters:
composeConfig-ComposeConfiguration.
-
-
Method Details
-
link
public static <F,H> void link(Map<String, String> configuration, CompositionConfiguration compositionConfiguration, F[] flowTypes, Function<F, String> getFlowName, Function<String, H> getHandler, BiConsumer<F, H> link, Consumer<F> nonConfiguredFlowHandler, BiConsumer<F, String> noHandlerAvailable, BiConsumer<String, String> extraConfiguredFlowHandler) Links flow to handler based on configuration.- Type Parameters:
F- Flow type.H- Handler type.- Parameters:
configuration- Configuration of flow to handler function.compositionConfiguration-CompositionConfigurationfor composition escalation handling. Should benullfor flow handling.flowTypes- Flow types.getFlowName- Means to obtain flow name from flow type.getHandler- Obtains the handler for the configured handler name.link- Links the flow to the handler.nonConfiguredFlowHandler- Invoked for flows not configured.noHandlerAvailable- Invoked ifnullhandler provided for flow.extraConfiguredFlowHandler- Invoked for configuration of a flow that does not exist in the flow types.
-
addExternalAccessFunction
Flags a composed function is to be externally accessed.- Parameters:
functionName- Name of function to externally expose.handleNotConfigured-Consumerto handle the function not being configured.
-
loadSpecification
Description copied from class:AbstractSectionSourceLoads theSectionSourceSpecification.- Specified by:
loadSpecificationin classAbstractSectionSource- Parameters:
specificationContext-AbstractSectionSource.SpecificationContext.
-
sourceSection
public void sourceSection(SectionDesigner sectionDesigner, SectionSourceContext sectionSourceContext) throws Exception Description copied from interface:SectionSourceSources theOfficeSectionby constructing it via the inputSectionDesigner.- Parameters:
sectionDesigner-SectionDesignerto construct the structure of theOfficeSection.sectionSourceContext-SectionSourceContextto source details to construct theOfficeSection.- Throws:
Exception- If fails to construct theOfficeSection.
-