Class GlobalConfigurationResolver

java.lang.Object
com.sodius.oslc.server.process.GlobalConfigurationResolver
Direct Known Subclasses:
DeliverableGlobalConfigurationResolver

public abstract class GlobalConfigurationResolver extends Object
Allows to resolve Global Configurations used by application artifacts and to determine the Global Configuration awareness of a container.
Since:
3.7.0
  • Constructor Details

    • GlobalConfigurationResolver

      public GlobalConfigurationResolver()
  • Method Details

    • getInstance

      public static GlobalConfigurationResolver getInstance()
      Gets the GC resolver implementation.
      Returns:
      the application GC resolver implementation if specified; otherwise, the default implementation which always resolves an empty Optional.
    • setInstance

      public static void setInstance(GlobalConfigurationResolver resolver)
      Sets the application GC resolver implementation. Applications not using a GC are not required to call this method, an implementation, which always resolves an empty Optional, is set by default.
      Parameters:
      resolver - application GC resolver.
    • resolve

      public abstract Optional<ConfigurationTrace> resolve(ApplicationArtifact artifact, ApplicationContainer container, LinkingType linkingType)
      Resolves (if any) the (traced) Global Configuration used (URI and title), by an application artifact, for linking.
      Parameters:
      artifact - the application artifact.
      container - the application artifact container.
      linkingType - the linking type.
      Returns:
      an empty Optional if no Global Configuration is being used; the traced reference otherwise.
      Throws:
      OslcWebApplicationException - if the Global Configuration cannot be determined.
      Since:
      3.8.0
    • getGlobalConfigurationAware

      public GlobalConfigurationAware getGlobalConfigurationAware(ApplicationContainer container, URI domain)
      Determines the Global Configuration awareness of an application container.
      Parameters:
      container - the application artifact container.
      domain - the domain URI of the application artifact container.
      Returns:
      the Global Configuration awareness of the container.
      Since:
      3.8.0