Interface ComposeArchitect

All Known Implementing Classes:
ComposeEmployer.ComposeArchitectImpl

public interface ComposeArchitect
Builds the composed ManagedFunction instances.
  • Method Details

    • addInput

      void addInput(String inputName, OfficeSectionInput input)
      Adds OfficeSectionInput that will be available to link in composition via #inputName.
      Parameters:
      inputName - Name for input in composition.
      input - OfficeSectionInput.
    • addGovernance

      void addGovernance(String governanceName, OfficeGovernance goverance)
      Adds OfficeGovernance for the composition.
      Parameters:
      governanceName - Name used in composition for the OfficeGovernance.
      goverance - OfficeGovernance.
    • isCompositionsAvailable

      boolean isCompositionsAvailable(String resourceDirectory, Predicate<String> itemNameFilter) throws Exception
      Determines if compositions are available in the resource directory.
      Parameters:
      resourceDirectory - Name of directory containing the compositions.
      itemNameFilter - Predicate to filter item names (file name minus extension). Only items whose name passes the filter are considered.
      Returns:
      true if at least one matching composition is available.
      Throws:
      Exception - If fails to check for compositions.
    • addComposition

      <C extends ComposeConfiguration, T> T addComposition(String sectionName, ComposeSource<T,C> source, String resourceName, PropertyList properties, Class<C> configuration) throws Exception
      Builds the item requiring composition.
      Type Parameters:
      C - Configuration type.
      T - Built item type.
      Parameters:
      sectionName - Name of the OfficeSection to contain the composition.
      source - ComposeSource to source the item requiring composition.
      resourceName - Name of resource defining the composition.
      properties - PropertyList to configure the composition.
      configuration - Class extending ComposeConfiguration to provide additional configuration for the item being built.
      Returns:
      Built item.
      Throws:
      Exception - If fails to build item.
    • addCompositions

      <T> void addCompositions(String namespace, DirectoryItemComposer<T> composer, String resourceDirectory, PropertyList properties, ComposeListener<T> listener) throws Exception
      Builds a directory of items requiring composition.
      Type Parameters:
      T - Build item type.
      Parameters:
      namespace - Namespace to isolate the compositions (SectionSource) instances from other compositions.
      composer - DirectoryItemComposer to source the items requiring composition.
      resourceDirectory - Name of directory containing the compositions.
      properties - PropertyList to configure the compositions.
      listener - ComposeListener to receive the built items.
      Throws:
      Exception - If fails to build the items.