Interface ManagerParameter


public interface ManagerParameter
Defines a contract for managing and accessing configuration parameters used by a manager component.

This interface provides methods to read, write, and merge properties, as well as to retrieve specific configuration values such as implementation class names and resource locations.

Implementations are expected to handle property storage and ensure consistency when merging or retrieving values.

  • Field Details

    • MANAGER_IMPL_CLASS_PREFIX

      static final String MANAGER_IMPL_CLASS_PREFIX
      Prefix used to identify manager implementation class properties.
      See Also:
    • PARSER_IMPL_PREFIX

      static final String PARSER_IMPL_PREFIX
      The configuration prefix for parser implementations.
      See Also:
    • CONFIGURATION_SERVICE_IMPL

      static final String CONFIGURATION_SERVICE_IMPL
      Key used to identify the configuration service implementation class.
      See Also:
  • Method Details

    • mergeProperties

      void mergeProperties(@Nullable Properties properties)
      Merges the given properties into the current set of properties. Existing keys may be overwritten depending on the implementation.
      Parameters:
      properties - the properties to merge; may be null
    • getProperty

      @NonNull Optional<String> getProperty(@NonNull String key)
      Retrieves the value of a property by its key.
      Parameters:
      key - the property key; must not be null
      Returns:
      an Optional containing the property value if present, otherwise an empty Optional; never null
    • setProperty

      void setProperty(@NonNull String key, @NonNull String value)
      Sets or updates the value of a property.
      Parameters:
      key - the property key; must not be null
      value - the property value; must not be null
    • getManagerImplClassName

      @NonNull String getManagerImplClassName()
      Returns the fully qualified class name of the manager implementation.
      Returns:
      the manager implementation class name; never null
    • getParserImplClassName

      @NonNull String getParserImplClassName(@NonNull String className)
      Returns the fully qualified class name of the parser implementation.
      Returns:
      the parser implementation class name; never null
    • getConfigurationServiceImplClassName

      @NonNull String getConfigurationServiceImplClassName()
      Returns the fully qualified class name of the configuration service implementation.
      Returns:
      the configuration service implementation class name; never null
    • createCacheKey

      @NonNull String createCacheKey()
      Creates a cache key representing the current state of the parameters.

      The cache key should uniquely identify the configuration so that it can be used for caching purposes.

      Returns:
      a non-null cache key string
    • getDisplayName

      @NonNull String getDisplayName()
      Returns a human-readable display name for this parameter set.
      Returns:
      a non-null display name
    • createResourceUrl

      @NonNull URL createResourceUrl()
      Creates a URL pointing to a resource associated with this configuration.
      Returns:
      a non-null URL to the resource
      Throws:
      RuntimeException - if the URL cannot be created