APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.security.keys.keyresolver

public Class KeyResolver

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, java.security.PublicKey, java.security.cert.X509Certificate, java.util.ArrayList, .Iterator, .List, java.util.concurrent.CopyOnWriteArrayList, java.util.concurrent.atomic.AtomicBoolean, com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DEREncodedKeyValueResolver, .DSAKeyValueResolver, .ECKeyValueResolver, .KeyInfoReferenceResolver, .RSAKeyValueResolver, .RetrievalMethodResolver, .X509CertificateResolver, .X509DigestResolver, .X509IssuerSerialResolver, .X509SKIResolver, .X509SubjectNameResolver, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver, com.sun.org.apache.xml.internal.security.utils.JavaUtils, org.w3c.dom.Element, .Node

KeyResolver is factory class for subclass of KeyResolverSpi that represent child element of KeyInfo.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
KeyResolver.ResolverIterator

Iterate over the KeyResolverSpi instances

Field Summary

Modifier and TypeField and Description
private static final AtomicBoolean
private static final Logger
private static List<KeyResolverSpi>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final PublicKey

Returns:

the public key contained in the element
getPublicKey
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method getPublicKey

public static final X509Certificate

Returns:

The certificate represented by the element.
getX509Certificate
(Element element, String baseURI, StorageResolver storage, boolean secureValidation)

Method getX509Certificate

public static Iterator<KeyResolverSpi>
public static int

Returns:

the length of resolvers registered
length
()

Method length

public static void
register(String className)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects.

public static void
register(KeyResolverSpi
a KeyResolverSpi instance to register
keyResolverSpi
,
boolean
whether to register the KeyResolverSpi at the start of the list or not
start
)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects.

public static void
registerAtStart(String className)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects.

public static void
registerClassNames(List<String> classNames)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects.

public static void
registerDefaultResolvers()

This method registers the default resolvers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultResolversAddedback to summary
private static final AtomicBoolean defaultResolversAdded
LOGback to summary
private static final Logger LOG
resolverListback to summary
private static List<KeyResolverSpi> resolverList

Constructor Detail

KeyResolverback to summary
public KeyResolver()

Method Detail

getPublicKeyback to summary
public static final PublicKey getPublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method getPublicKey

Returns:PublicKey

the public key contained in the element

getX509Certificateback to summary
public static final X509Certificate getX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException

Method getX509Certificate

Returns:X509Certificate

The certificate represented by the element.

iteratorback to summary
public static Iterator<KeyResolverSpi> iterator()
lengthback to summary
public static int length()

Method length

Returns:int

the length of resolvers registered

registerback to summary
public static void register(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects. This means that personalized KeyResolverSpis should only be registered directly to the com.sun.org.apache.xml.internal.security.keys.KeyInfo using com.sun.org.apache.xml.internal.security.keys.KeyInfo#registerInternalKeyResolver. Please note that this method will create a new copy of the underlying array, as the underlying collection is a CopyOnWriteArrayList.

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the key resolver
registerback to summary
public static void register(KeyResolverSpi keyResolverSpi, boolean start)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects. This means that personalized KeyResolverSpis should only be registered directly to the com.sun.org.apache.xml.internal.security.keys.KeyInfo using com.sun.org.apache.xml.internal.security.keys.KeyInfo#registerInternalKeyResolver. Please note that this method will create a new copy of the underlying array, as the underlying collection is a CopyOnWriteArrayList.

Parameters
keyResolverSpi:KeyResolverSpi

a KeyResolverSpi instance to register

start:boolean

whether to register the KeyResolverSpi at the start of the list or not

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the key resolver
registerAtStartback to summary
public static void registerAtStart(String className)

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects. This means that personalized KeyResolverSpis should only be registered directly to the com.sun.org.apache.xml.internal.security.keys.KeyInfo using com.sun.org.apache.xml.internal.security.keys.KeyInfo#registerInternalKeyResolver. Please note that this method will create a new copy of the underlying array, as the underlying collection is a CopyOnWriteArrayList.

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the key resolver
registerClassNamesback to summary
public static void registerClassNames(List<String> classNames) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException

This method is used for registering KeyResolverSpis which are available to all com.sun.org.apache.xml.internal.security.keys.KeyInfo objects. This means that personalized KeyResolverSpis should only be registered directly to the com.sun.org.apache.xml.internal.security.keys.KeyInfo using com.sun.org.apache.xml.internal.security.keys.KeyInfo#registerInternalKeyResolver. The KeyResolverSpi instances are not registered as a global resolver.

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the key resolver
registerDefaultResolversback to summary
public static void registerDefaultResolvers()

This method registers the default resolvers.

com.sun.org.apache.xml.internal.security.keys.keyresolver back to summary

pack-priv Class KeyResolver.ResolverIterator

extends Object
implements Iterator<KeyResolverSpi>
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver.ResolverIterator
All Implemented Interfaces
java.util.Iterator

Iterate over the KeyResolverSpi instances

Field Summary

Modifier and TypeField and Description
private Iterator<KeyResolverSpi>
private List<KeyResolverSpi>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public KeyResolverSpi
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

itback to summary
private Iterator<KeyResolverSpi> it
resback to summary
private List<KeyResolverSpi> res

Constructor Detail

ResolverIteratorback to summary
public ResolverIterator(List<KeyResolverSpi> list)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Annotations
@Override
nextback to summary
public KeyResolverSpi next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override