Interface ComposeContext<C>


public interface ComposeContext<C>
Context for the ComposeArchitect.
  • 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

      <IC> IC getConfiguration(String contentName, Class<IC> type)
      Obtains the particular configuration from the composition meta-data content by name.
      Type Parameters:
      IC - Content type.
      Parameters:
      contentName - Name of content.
      type - Content type.
      Returns:
      Content.
    • getOfficeArchitect

      OfficeArchitect getOfficeArchitect()
      Obtains OfficeArchitect to configure the item.
      Returns:
      OfficeArchitect.
    • getOfficeSourceContext

      OfficeSourceContext getOfficeSourceContext()
      Obtains the OfficeSourceContext to assist configuring the item.
      Returns:
      OfficeSourceContext.
    • getStartFunction

      OfficeSectionInput getStartFunction()

      Obtains the starting function to composition.

      May be null if no functions for composition, as particular configuration of item requires no functions.

      Returns:
      Starting function or null.
    • getFunction

      OfficeSectionInput getFunction(String functionName, Consumer<String> handleNotConfigured)

      Obtains the OfficeSectionInput to a named function.

      This allows the item to link to invoking the function.

      Parameters:
      functionName - Name of the function.
      handleNotConfigured - Consumer to handle the function not configured.
      Returns:
      OfficeSectionInput to 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 CompositionConfiguration escalation 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 the OfficeSection containing the composition.
      Returns:
      OfficeSection containing the composition.