Home » openjdk-7 » javax » xml » crypto » [javadoc | source]
javax.xml.crypto
public interface: XMLCryptoContext [javadoc | source]

All Known Implementing Classes:
    DOMSignContext, DOMValidateContext, XMLSignContext, DOMCryptoContext, XMLValidateContext

Contains common context information for XML cryptographic operations.

This interface contains methods for setting and retrieving properties that affect the processing of XML signatures or XML encrypted structures.

Note that XMLCryptoContext instances can contain information and state specific to the XML cryptographic structure it is used with. The results are unpredictable if an XMLCryptoContext is used with multiple structures (for example, you should not use the same javax.xml.crypto.dsig.XMLValidateContext instance to validate two different javax.xml.crypto.dsig.XMLSignature objects).

Method from javax.xml.crypto.XMLCryptoContext Summary:
get,   getBaseURI,   getDefaultNamespacePrefix,   getKeySelector,   getNamespacePrefix,   getProperty,   getURIDereferencer,   put,   putNamespacePrefix,   setBaseURI,   setDefaultNamespacePrefix,   setKeySelector,   setProperty,   setURIDereferencer
Method from javax.xml.crypto.XMLCryptoContext Detail:
 public Object get(Object key)
    Returns the value to which this context maps the specified key.

    More formally, if this context contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

    This method is useful for retrieving arbitrary information that is specific to the cryptographic operation that this context is used for.

 public String getBaseURI()
    Returns the base URI.
 public String getDefaultNamespacePrefix()
    Returns the default namespace prefix. The default namespace prefix is the prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
 public KeySelector getKeySelector()
    Returns the key selector for finding a key.
 public String getNamespacePrefix(String namespaceURI,
    String defaultPrefix)
    Returns the namespace prefix that the specified namespace URI is associated with. Returns the specified default prefix if the specified namespace URI has not been bound to a prefix. To bind a namespace URI to a prefix, call the putNamespacePrefix method.
 public Object getProperty(String name)
    Returns the value of the specified property.
 public URIDereferencer getURIDereferencer()
    Returns a URIDereferencer that is used to dereference URIReference s.
 public Object put(Object key,
    Object value)
    Associates the specified value with the specified key in this context. If the context previously contained a mapping for this key, the old value is replaced by the specified value.

    This method is useful for storing arbitrary information that is specific to the cryptographic operation that this context is used for.

 public String putNamespacePrefix(String namespaceURI,
    String prefix)
    Maps the specified namespace URI to the specified prefix. If there is already a prefix associated with the specified namespace URI, the old prefix is replaced by the specified prefix.
 public  void setBaseURI(String baseURI)
    Sets the base URI.
 public  void setDefaultNamespacePrefix(String defaultPrefix)
    Sets the default namespace prefix. This sets the namespace prefix for all namespace URIs not explicitly set by the putNamespacePrefix method.
 public  void setKeySelector(KeySelector ks)
    Sets the key selector for finding a key.
 public Object setProperty(String name,
    Object value)
    Sets the specified property.
 public  void setURIDereferencer(URIDereferencer dereferencer)
    Sets a URIDereferencer that is used to dereference URIReference s. The specified URIDereferencer is used in place of an implementation's default URIDereferencer.