Class ResourceResolverSpi

java.lang.Object
org.apache.xml.security.utils.resolver.ResourceResolverSpi
Direct Known Subclasses:
ResolverAnonymous, ResolverDirectHTTP, ResolverFragment, ResolverLocalFilesystem, ResolverXPointer

public abstract class ResourceResolverSpi extends Object
During reference validation, we have to retrieve resources from somewhere.
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • properties

      protected Map<String,String> properties
      Field properties
  • Constructor Details

    • ResourceResolverSpi

      public ResourceResolverSpi()
  • Method Details

    • engineResolveURI

      public abstract XMLSignatureInput engineResolveURI(ResourceResolverContext context) throws ResourceResolverException
      This is the workhorse method used to resolve resources.
      Parameters:
      context - Context to use to resolve resources.
      Returns:
      the resource wrapped around a XMLSignatureInput
      Throws:
      ResourceResolverException
    • engineSetProperty

      public void engineSetProperty(String key, String value)
      Method engineSetProperty
      Parameters:
      key -
      value -
    • engineGetProperty

      public String engineGetProperty(String key)
      Method engineGetProperty
      Parameters:
      key -
      Returns:
      the value of the property
    • engineAddProperies

      public void engineAddProperies(Map<String,String> newProperties)
      Parameters:
      newProperties -
    • engineIsThreadSafe

      public boolean engineIsThreadSafe()
      Tells if the implementation does can be reused by several threads safely. It normally means that the implementation does not have any member, or there is member change between engineCanResolve and engineResolve invocations. Or it maintains all member info in ThreadLocal methods.
    • engineCanResolveURI

      public abstract boolean engineCanResolveURI(ResourceResolverContext context)
      This method helps the ResourceResolver to decide whether a ResourceResolverSpi is able to perform the requested action.
      Parameters:
      context - Context in which to do resolution.
      Returns:
      true if the engine can resolve the uri
    • engineGetPropertyKeys

      public String[] engineGetPropertyKeys()
      Method engineGetPropertyKeys
      Returns:
      the property keys
    • understandsProperty

      public boolean understandsProperty(String propertyToTest)
      Method understandsProperty
      Parameters:
      propertyToTest -
      Returns:
      true if understands the property
    • fixURI

      public static String fixURI(String str)
      Fixes a platform dependent filename to standard URI form.
      Parameters:
      str - The string to fix.
      Returns:
      Returns the fixed URI string.