public class KeyResolver extends Object
Modifier and Type | Method and Description |
---|---|
String |
getProperty(String key)
Method getProperty
|
static PublicKey |
getPublicKey(Element element,
String baseURI,
StorageResolver storage)
Method getPublicKey
|
static X509Certificate |
getX509Certificate(Element element,
String baseURI,
StorageResolver storage)
Method getX509Certificate
|
static Iterator<KeyResolverSpi> |
iterator() |
static int |
length()
Method length
|
static void |
register(KeyResolverSpi keyResolverSpi,
boolean start)
This method is used for registering
KeyResolverSpi s which are
available to all KeyInfo objects. |
static void |
register(String className,
boolean globalResolver)
This method is used for registering
KeyResolverSpi s which are
available to all KeyInfo objects. |
static void |
registerAtStart(String className,
boolean globalResolver)
This method is used for registering
KeyResolverSpi s which are
available to all KeyInfo objects. |
static void |
registerClassNames(List<String> classNames)
This method is used for registering
KeyResolverSpi s which are
available to all KeyInfo objects. |
static void |
registerDefaultResolvers()
This method registers the default resolvers.
|
PublicKey |
resolvePublicKey(Element element,
String baseURI,
StorageResolver storage)
Method resolvePublicKey
|
String |
resolverClassName()
Method resolverClassName
|
SecretKey |
resolveSecretKey(Element element,
String baseURI,
StorageResolver storage) |
X509Certificate |
resolveX509Certificate(Element element,
String baseURI,
StorageResolver storage)
Method resolveX509Certificate
|
void |
setProperty(String key,
String value)
Method setProperty
|
boolean |
understandsProperty(String propertyToTest)
Method understandsProperty
|
public static int length()
public static final X509Certificate getX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
element
- baseURI
- storage
- KeyResolverException
public static final PublicKey getPublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
element
- baseURI
- storage
- KeyResolverException
public static void register(String className, boolean globalResolver) throws ClassNotFoundException, IllegalAccessException, InstantiationException
KeyResolverSpi
s which are
available to all KeyInfo
objects. This means that
personalized KeyResolverSpi
s should only be registered directly
to the KeyInfo
using
KeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.
Please note that this method will create a new copy of the underlying array, as the
underlying collection is a CopyOnWriteArrayList.className
- globalResolver
- Whether the KeyResolverSpi is a global resolver or notInstantiationException
IllegalAccessException
ClassNotFoundException
public static void registerAtStart(String className, boolean globalResolver)
KeyResolverSpi
s which are
available to all KeyInfo
objects. This means that
personalized KeyResolverSpi
s should only be registered directly
to the KeyInfo
using
KeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.
Please note that this method will create a new copy of the underlying array, as the
underlying collection is a CopyOnWriteArrayList.className
- globalResolver
- Whether the KeyResolverSpi is a global resolver or notpublic static void register(KeyResolverSpi keyResolverSpi, boolean start)
KeyResolverSpi
s which are
available to all KeyInfo
objects. This means that
personalized KeyResolverSpi
s should only be registered directly
to the KeyInfo
using
KeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.
Please note that this method will create a new copy of the underlying array, as the
underlying collection is a CopyOnWriteArrayList.keyResolverSpi
- a KeyResolverSpi instance to registerstart
- whether to register the KeyResolverSpi at the start of the list or notpublic static void registerClassNames(List<String> classNames) throws ClassNotFoundException, IllegalAccessException, InstantiationException
KeyResolverSpi
s which are
available to all KeyInfo
objects. This means that
personalized KeyResolverSpi
s should only be registered directly
to the KeyInfo
using
KeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.
The KeyResolverSpi instances are not registered as a global resolver.classNames
- InstantiationException
IllegalAccessException
ClassNotFoundException
public static void registerDefaultResolvers()
public PublicKey resolvePublicKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
element
- baseURI
- storage
- KeyResolverException
public X509Certificate resolveX509Certificate(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
element
- baseURI
- storage
- KeyResolverException
public SecretKey resolveSecretKey(Element element, String baseURI, StorageResolver storage) throws KeyResolverException
element
- baseURI
- storage
- KeyResolverException
public void setProperty(String key, String value)
key
- value
- public String getProperty(String key)
key
- public boolean understandsProperty(String propertyToTest)
propertyToTest
- public String resolverClassName()
public static Iterator<KeyResolverSpi> iterator()
Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.