org.apache.xml.security.utils.resolver
Class ResourceResolverSpi

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

public abstract class ResourceResolverSpi
extends java.lang.Object

During reference validation, we have to retrieve resources from somewhere.

Author:
$Author: coheigea $

Field Summary
protected  java.util.Map<java.lang.String,java.lang.String> properties
          Field properties
protected  boolean secureValidation
           
 
Constructor Summary
ResourceResolverSpi()
           
 
Method Summary
 void engineAddProperies(java.util.Map<java.lang.String,java.lang.String> newProperties)
           
abstract  boolean engineCanResolve(org.w3c.dom.Attr uri, java.lang.String BaseURI)
          This method helps the ResourceResolver to decide whether a ResourceResolverSpi is able to perform the requested action.
 java.lang.String engineGetProperty(java.lang.String key)
          Method engineGetProperty
 java.lang.String[] engineGetPropertyKeys()
          Method engineGetPropertyKeys
 boolean engineIsThreadSafe()
          Tells if the implementation does can be reused by several threads safely.
abstract  XMLSignatureInput engineResolve(org.w3c.dom.Attr uri, java.lang.String BaseURI)
          This is the workhorse method used to resolve resources.
 void engineSetProperty(java.lang.String key, java.lang.String value)
          Method engineSetProperty
static java.lang.String fixURI(java.lang.String str)
          Fixes a platform dependent filename to standard URI form.
 boolean understandsProperty(java.lang.String propertyToTest)
          Method understandsProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Map<java.lang.String,java.lang.String> properties
Field properties


secureValidation

protected boolean secureValidation
Constructor Detail

ResourceResolverSpi

public ResourceResolverSpi()
Method Detail

engineResolve

public abstract XMLSignatureInput engineResolve(org.w3c.dom.Attr uri,
                                                java.lang.String BaseURI)
                                         throws ResourceResolverException
This is the workhorse method used to resolve resources.

Parameters:
uri -
BaseURI -
Returns:
the resource wrapped around a XMLSignatureInput
Throws:
ResourceResolverException

engineSetProperty

public void engineSetProperty(java.lang.String key,
                              java.lang.String value)
Method engineSetProperty

Parameters:
key -
value -

engineGetProperty

public java.lang.String engineGetProperty(java.lang.String key)
Method engineGetProperty

Parameters:
key -
Returns:
the value of the property

engineAddProperies

public void engineAddProperies(java.util.Map<java.lang.String,java.lang.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 & engineResolve invocations. Or it maintains all member info in ThreadLocal methods.


engineCanResolve

public abstract boolean engineCanResolve(org.w3c.dom.Attr uri,
                                         java.lang.String BaseURI)
This method helps the ResourceResolver to decide whether a ResourceResolverSpi is able to perform the requested action.

Parameters:
uri -
BaseURI -
Returns:
true if the engine can resolve the uri

engineGetPropertyKeys

public java.lang.String[] engineGetPropertyKeys()
Method engineGetPropertyKeys

Returns:
the property keys

understandsProperty

public boolean understandsProperty(java.lang.String propertyToTest)
Method understandsProperty

Parameters:
propertyToTest -
Returns:
true if understands the property

fixURI

public static java.lang.String fixURI(java.lang.String str)
Fixes a platform dependent filename to standard URI form.

Parameters:
str - The string to fix.
Returns:
Returns the fixed URI string.