Class KeyResolver
java.lang.Object
org.apache.xml.security.keys.keyresolver.KeyResolver
KeyResolver is factory class for subclass of KeyResolverSpi that
represent child element of KeyInfo.
- Version:
- %I%, %G%
- Author:
- $Author$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected KeyResolverSpi
Field _resolverSpiprotected StorageResolver
Field _storage -
Method Summary
Modifier and TypeMethodDescriptionboolean
canResolve
(Element element, String BaseURI, StorageResolver storage) Method canResolvestatic final KeyResolver
getInstance
(Element element, String BaseURI, StorageResolver storage) Method getInstancegetProperty
(String key) Method getPropertyString[]
Method getPropertyKeysstatic void
init()
The init() function is called by org.apache.xml.security.Init.init()static KeyResolver
item
(int i) Method itemstatic int
length()
Method lengthstatic void
This method is used for registeringKeyResolverSpi
s which are available to allKeyInfo
objects.static void
registerAtStart
(String className) This method is used for registeringKeyResolverSpi
s which are available to allKeyInfo
objects.resolvePublicKey
(Element element, String BaseURI, StorageResolver storage) Method resolveMethod resolverClassNameresolveSecretKey
(Element element, String BaseURI, StorageResolver storage) static PublicKey
resolveStatic
(Element element, String BaseURI, StorageResolver storage) Method resolveStaticresolveX509Certificate
(Element element, String BaseURI, StorageResolver storage) Method resolveX509Certificatevoid
setProperty
(String key, String value) Method setPropertyboolean
understandsProperty
(String propertyToTest) Method understandsProperty
-
Field Details
-
_resolverSpi
Field _resolverSpi -
_storage
Field _storage
-
-
Method Details
-
length
public static int length()Method length- Returns:
- the length of resolvers registed
-
item
Method item- Parameters:
i
-- Returns:
- the number i resolver registerd
- Throws:
KeyResolverException
-
getInstance
public static final KeyResolver getInstance(Element element, String BaseURI, StorageResolver storage) throws KeyResolverException Method getInstance- Parameters:
element
-BaseURI
-storage
-- Returns:
- the instance that happends to implement the thing.
- Throws:
KeyResolverException
-
init
public static void init()The init() function is called by org.apache.xml.security.Init.init() -
register
public static void register(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException This method is used for registeringKeyResolverSpi
s which are available to allKeyInfo
objects. This means that personalizedKeyResolverSpi
s should only be registered directly to theKeyInfo
usingKeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.- Parameters:
className
-- Throws:
InstantiationException
IllegalAccessException
ClassNotFoundException
-
registerAtStart
This method is used for registeringKeyResolverSpi
s which are available to allKeyInfo
objects. This means that personalizedKeyResolverSpi
s should only be registered directly to theKeyInfo
usingKeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi)
.- Parameters:
className
-
-
resolveStatic
public static PublicKey resolveStatic(Element element, String BaseURI, StorageResolver storage) throws KeyResolverException Method resolveStatic- Parameters:
element
-BaseURI
-storage
-- Returns:
- resolve from the static register an element
- Throws:
KeyResolverException
-
resolvePublicKey
public PublicKey resolvePublicKey(Element element, String BaseURI, StorageResolver storage) throws KeyResolverException Method resolve- Parameters:
element
-BaseURI
-storage
-- Returns:
- resolved public key from the registered from the elements
- Throws:
KeyResolverException
-
resolveX509Certificate
public X509Certificate resolveX509Certificate(Element element, String BaseURI, StorageResolver storage) throws KeyResolverException Method resolveX509Certificate- Parameters:
element
-BaseURI
-storage
-- Returns:
- resolved X509certificate key from the registered from the elements
- Throws:
KeyResolverException
-
resolveSecretKey
public SecretKey resolveSecretKey(Element element, String BaseURI, StorageResolver storage) throws KeyResolverException - Parameters:
element
-BaseURI
-storage
-- Returns:
- resolved SecretKey key from the registered from the elements
- Throws:
KeyResolverException
-
setProperty
Method setProperty- Parameters:
key
-value
-
-
getProperty
Method getProperty- Parameters:
key
-- Returns:
- the property setted for this resolver
-
getPropertyKeys
Method getPropertyKeys- Returns:
- the properties key registerd in this resolver
-
understandsProperty
Method understandsProperty- Parameters:
propertyToTest
-- Returns:
- true if the resolver understands property propertyToTest
-
canResolve
Method canResolve- Parameters:
element
-BaseURI
-storage
-- Returns:
- true if can resolve the key in the element
-
resolverClassName
Method resolverClassName- Returns:
- the name of the resolver.
-