Interface ComposeContext<C>
public interface ComposeContext<C>
Context for the
ComposeArchitect.-
Method Summary
Modifier and TypeMethodDescriptionObtains theOfficeSectioncontaining the composition.Obtains the configuration for the item.<IC> ICgetConfiguration(String contentName, Class<IC> type) Obtains the particular configuration from thecompositionmeta-data content by name.getFunction(String functionName, Consumer<String> handleNotConfigured) Obtains theOfficeSectionInputto a named function.Obtains the suggested name of the item.ObtainsOfficeArchitectto configure the item.Obtains theOfficeSourceContextto assist configuring the item.Obtains the starting function to composition.<E> voidlinkEscalations(Map<String, String> configuration, E[] escalationTypes, ComposeLinkHandler<E> linkHandler) Convenience method to link the escalations to handling functions via configuration.<F> voidlinkFlows(Map<String, String> configuration, F[] flowTypes, ComposeLinkHandler<F> linkHandler) Convenience method to link the flows to handling functions via configuration.
-
Method Details
-
getItemName
String getItemName()Obtains the suggested name of the item.- Returns:
- Suggested name of the item.
-
getConfiguration
C getConfiguration()Obtains the configuration for the item.- Returns:
- Configuration for the item.
-
getConfiguration
Obtains the particular configuration from thecompositionmeta-data content by name.- Type Parameters:
IC- Content type.- Parameters:
contentName- Name of content.type- Content type.- Returns:
- Content.
-
getOfficeArchitect
OfficeArchitect getOfficeArchitect()ObtainsOfficeArchitectto configure the item.- Returns:
OfficeArchitect.
-
getOfficeSourceContext
OfficeSourceContext getOfficeSourceContext()Obtains theOfficeSourceContextto assist configuring the item.- Returns:
OfficeSourceContext.
-
getStartFunction
OfficeSectionInput getStartFunction()Obtains the starting function to composition.
May be
nullif no functions for composition, as particular configuration of item requires no functions.- Returns:
- Starting function or
null.
-
getFunction
Obtains the
OfficeSectionInputto a named function.This allows the item to link to invoking the function.
- Parameters:
functionName- Name of the function.handleNotConfigured-Consumerto handle the function not configured.- Returns:
OfficeSectionInputto the function.
-
linkFlows
<F> void linkFlows(Map<String, String> configuration, F[] flowTypes, ComposeLinkHandler<F> linkHandler) Convenience method to link the flows to handling functions via configuration.- Type Parameters:
F- Flow type.- Parameters:
configuration- Configuration mapping the output to the handling function.flowTypes- Flow types of the item.linkHandler-ComposeLinkHandler.
-
linkEscalations
<E> void linkEscalations(Map<String, String> configuration, E[] escalationTypes, ComposeLinkHandler<E> linkHandler) Convenience method to link the escalations to handling functions via configuration.
This incorporates the
CompositionConfigurationescalation mapping.- Type Parameters:
E- Escalation type.- Parameters:
configuration- Configuration mapping the escalation to the handling function.escalationTypes- Escalation types of the item.linkHandler-ComposeLinkHandler.
-
getCompositionSection
OfficeSection getCompositionSection()Obtains theOfficeSectioncontaining the composition.- Returns:
OfficeSectioncontaining the composition.
-