Class GlobalConfigurationResolver

    • Constructor Detail

      • GlobalConfigurationResolver

        public GlobalConfigurationResolver()
    • Method Detail

      • 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,
                                                             ApplicationArtifact container,
                                                             LinkingType linkingType,
                                                             HttpServletRequest request)
        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.
        request - the current HTTP request.
        Returns:
        an empty Optional if no Global Configuration is being used; the traced reference otherwise.
        Throws:
        OslcWebApplicationException - if the Global Configuration cannot be determined.