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 Object

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

Author:
$Author: coheigea $

Field Summary
protected  Map<String,String> properties
          Field properties
 
Constructor Summary
ResourceResolverSpi()
           
 
Method Summary
 void engineAddProperies(Map<String,String> newProperties)
           
abstract  boolean engineCanResolveURI(ResourceResolverContext context)
          This method helps the ResourceResolver to decide whether a ResourceResolverSpi is able to perform the requested action.
 String engineGetProperty(String key)
          Method engineGetProperty
 String[] engineGetPropertyKeys()
          Method engineGetPropertyKeys
 boolean engineIsThreadSafe()
          Tells if the implementation does can be reused by several threads safely.
abstract  XMLSignatureInput engineResolveURI(ResourceResolverContext context)
          This is the workhorse method used to resolve resources.
 void engineSetProperty(String key, String value)
          Method engineSetProperty
static String fixURI(String str)
          Fixes a platform dependent filename to standard URI form.
 boolean understandsProperty(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 Map<String,String> properties
Field properties

Constructor Detail

ResourceResolverSpi

public ResourceResolverSpi()
Method Detail

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 & 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.


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.