Interface ConfigurationManager

All Superinterfaces:
ResourceCollectionManager

public interface ConfigurationManager extends ResourceCollectionManager
The ConfigurationManager is the primary interface for interacting with the configuration of a Gateway. It provides access to the various configuration collections, as well as the ability to add resources to the configuration.

When reading configuration, always read from the "local" collection. Because of the inheritance chain set up by this manager, this ensures you will be reading the correct version of any configured resource.

  • Field Details

  • Method Details

    • getConfigCollection

      @Nonnull default ResourceCollection getConfigCollection()
      Get the resource collection that represents this gateway's configuration, for the currently active mode. This is equivalent to calling getConfigCollection(ResourceFilter.ALL_RESOURCES)

      Technically speaking, this reads from the "local" collection, which is the bottom of the inheritance chain.

    • isNewConfiguration

      boolean isNewConfiguration()
      Returns:
      true if the configuration collection was created during this gateway's startup. Indicates a fresh install, or an upgrade from 8.1 to 8.3+.
    • addSystemResources

      void addSystemResources(List<Resource> resources)
      Adds a collection of resources to the "system" resource collection - the ancestor of all other configuration collections.
    • getSingletonResource

      default Optional<Resource> getSingletonResource(ResourceType resourceType)
      Looks for the active definition of a singleton resource of the given type. The "active" definition is the one that is currently in effect, taking into account the inheritance structure and configuration mode.
    • getNamedResource

      default Optional<Resource> getNamedResource(ResourceType resourceType, String resourceName)
      Looks for the active definition of a named resource of the given type and name. The "active" definition is the one that is currently in effect, taking into account the inheritance structure and configuration mode.
    • getResource

      Optional<Resource> getResource(ResourcePath path)
      Looks for the active definition of a resource at the given path. The "active" definition is the one that is currently in effect, taking into account the inheritance structure and configuration mode.
    • getResources

      List<Resource> getResources(ResourceType resourceType)
    • getConfigCollection

      @Nonnull ResourceCollection getConfigCollection(@Nonnull ResourceFilter filter)
      Get the resource collection that represents this gateway's configuration, for the currently active mode.
      Parameters:
      filter - The filter to apply to the resources in the collection.
    • getActiveMode

      Optional<String> getActiveMode()
      Returns:
      The name of the currently active configuration mode, or an empty Optional if no mode is active.
    • getModes

      Set<String> getModes()
      Get the names of the configuration modes that have been defined. Omits the "core", "local", and "external" modes.
    • getResourceTypeMetaRegistry

      ResourceTypeMetaRegistry getResourceTypeMetaRegistry()
    • getMigrationStrategyRegistry

      MigrationStrategyRegistry getMigrationStrategyRegistry()