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 java.lang.Object
During reference validation, we have to retrieve resources from somewhere.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOG
protected java.util.Map<java.lang.String,java.lang.String>
properties
Field properties
-
Constructor Summary
Constructors Constructor Description ResourceResolverSpi()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
engineAddProperies(java.util.Map<java.lang.String,java.lang.String> newProperties)
abstract boolean
engineCanResolveURI(ResourceResolverContext context)
This method helps theResourceResolver
to decide whether aResourceResolverSpi
is able to perform the requested action.java.lang.String
engineGetProperty(java.lang.String key)
Method engineGetPropertyjava.lang.String[]
engineGetPropertyKeys()
Method engineGetPropertyKeysboolean
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(java.lang.String key, java.lang.String value)
Method engineSetPropertystatic 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
-
-
-
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(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 and engineResolve invocations. Or it maintains all member info in ThreadLocal methods.
-
engineCanResolveURI
public abstract boolean engineCanResolveURI(ResourceResolverContext context)
This method helps theResourceResolver
to decide whether aResourceResolverSpi
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 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.
-
-