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 KeyResolverSpiField _resolverSpiprotected StorageResolverField _storage -
Method Summary
Modifier and TypeMethodDescriptionbooleancanResolve(Element element, String BaseURI, StorageResolver storage) Method canResolvestatic final KeyResolvergetInstance(Element element, String BaseURI, StorageResolver storage) Method getInstancegetProperty(String key) Method getPropertyString[]Method getPropertyKeysstatic voidinit()The init() function is called by org.apache.xml.security.Init.init()static KeyResolveritem(int i) Method itemstatic intlength()Method lengthstatic voidThis method is used for registeringKeyResolverSpis which are available to allKeyInfoobjects.static voidregisterAtStart(String className) This method is used for registeringKeyResolverSpis which are available to allKeyInfoobjects.resolvePublicKey(Element element, String BaseURI, StorageResolver storage) Method resolveMethod resolverClassNameresolveSecretKey(Element element, String BaseURI, StorageResolver storage) static PublicKeyresolveStatic(Element element, String BaseURI, StorageResolver storage) Method resolveStaticresolveX509Certificate(Element element, String BaseURI, StorageResolver storage) Method resolveX509CertificatevoidsetProperty(String key, String value) Method setPropertybooleanunderstandsProperty(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 registeringKeyResolverSpis which are available to allKeyInfoobjects. This means that personalizedKeyResolverSpis should only be registered directly to theKeyInfousingKeyInfo.registerInternalKeyResolver(org.apache.xml.security.keys.keyresolver.KeyResolverSpi).- Parameters:
className-- Throws:
InstantiationExceptionIllegalAccessExceptionClassNotFoundException
-
registerAtStart
This method is used for registeringKeyResolverSpis which are available to allKeyInfoobjects. This means that personalizedKeyResolverSpis should only be registered directly to theKeyInfousingKeyInfo.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.
-