Class ResourceResolver


  • public class ResourceResolver
    extends java.lang.Object
    During reference validation, we have to retrieve resources from somewhere. This is done by retrieving a Resolver. The resolver needs two arguments: The URI in which the link to the new resource is defined and the baseURI of the file/entity in which the URI occurs (the baseURI is the same as the SystemId).
    • Field Detail

      • LOG

        private static final java.lang.System.Logger LOG
      • resolverList

        private static final java.util.List<ResourceResolverSpi> resolverList
        these are the system-wide resolvers
      • defaultResolversAdded

        private static final java.util.concurrent.atomic.AtomicBoolean defaultResolversAdded
    • Constructor Detail

      • ResourceResolver

        public ResourceResolver()
    • Method Detail

      • register

        public static void register​(java.lang.String className)
                             throws java.lang.ClassNotFoundException,
                                    java.lang.IllegalAccessException,
                                    java.lang.InstantiationException
        Registers a ResourceResolverSpi class.
        Parameters:
        className - the name of the ResourceResolverSpi class to be registered
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
        java.lang.SecurityException - if a security manager is installed and the caller does not have permission to register a resource resolver
      • registerAtStart

        public static void registerAtStart​(java.lang.String className)
                                    throws java.lang.ClassNotFoundException,
                                           java.lang.IllegalAccessException,
                                           java.lang.InstantiationException
        Registers a ResourceResolverSpi class at the beginning of the provider list.
        Parameters:
        className - the name of the ResourceResolverSpi class to be registered
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
        java.lang.SecurityException - if a security manager is installed and the caller does not have permission to register a resource resolver
      • register

        public static void register​(ResourceResolverSpi resourceResolverSpi,
                                    boolean start)
        Registers a ResourceResolverSpi instance.
        Parameters:
        resourceResolverSpi -
        start -
        Throws:
        java.lang.SecurityException - if a security manager is installed and the caller does not have permission to register a resource resolver
      • registerClassNames

        public static void registerClassNames​(java.util.List<java.lang.String> classNames)
                                       throws java.lang.ClassNotFoundException,
                                              java.lang.IllegalAccessException,
                                              java.lang.InstantiationException
        Registers a list of ResourceResolverSpi classes.
        Parameters:
        classNames -
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
        java.lang.SecurityException - if a security manager is installed and the caller does not have permission to register the key resolver
      • registerDefaultResolvers

        public static void registerDefaultResolvers()
        This method registers the default resolvers.