public class JAXBCryptoContext extends Object implements XMLCryptoContext
| Constructor and Description |
|---|
JAXBCryptoContext()
Creates a new instance of JAXBCryptoContext
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object key)
Returns the value to which this context maps the specified key.
|
String |
getBaseURI()
Returns the base URI.
|
String |
getDefaultNamespacePrefix()
Returns the default namespace prefix.
|
KeySelector |
getKeySelector()
Returns the key selector for finding a key.
|
String |
getNamespacePrefix(String namespaceURI,
String defaultPrefix)
Returns the namespace prefix that the specified namespace URI is
associated with.
|
Object |
getProperty(String name)
Returns the value of the specified property.
|
URIDereferencer |
getURIDereferencer()
Returns a
URIDereferencer that is used to dereference
URIDereferencers. |
Object |
put(Object key,
Object value)
Associates the specified value with the specified key in this context.
|
String |
putNamespacePrefix(String namespaceURI,
String prefix)
Maps the specified namespace URI to the specified prefix.
|
void |
setBaseURI(String baseURI)
Sets the base URI.
|
void |
setDefaultNamespacePrefix(String defaultNamespacePrefix)
Sets the default namespace prefix.
|
void |
setKeySelector(KeySelector keySelector)
Sets the key selector for finding a key.
|
Object |
setProperty(String name,
Object value)
Sets the specified property.
|
void |
setURIDereferencer(URIDereferencer uriDereferencer)
Sets a
URIDereferencer that is used to dereference
URIDereferencers. |
public JAXBCryptoContext()
public String getBaseURI()
getBaseURI in interface XMLCryptoContextnull if not specifiedsetBaseURI(String)public void setBaseURI(String baseURI)
setBaseURI in interface XMLCryptoContextbaseURI - the base URI, or null to remove current
valueIllegalArgumentException - if baseURI is not RFC
2396 compliantgetBaseURI()public KeySelector getKeySelector()
getKeySelector in interface XMLCryptoContextnull if not specifiedsetKeySelector(KeySelector)public void setKeySelector(KeySelector keySelector)
setKeySelector in interface XMLCryptoContextkeySelector - the key selector, or null to remove the current
settinggetKeySelector()public URIDereferencer getURIDereferencer()
URIDereferencer that is used to dereference
URIDereferencers.getURIDereferencer in interface XMLCryptoContextURIDereferencer, or null if not
specifiedsetURIDereferencer(URIDereferencer)public void setURIDereferencer(URIDereferencer uriDereferencer)
URIDereferencer that is used to dereference
URIDereferencers. The specified URIDereferencer
is used in place of an implementation's default
URIDereferencer.setURIDereferencer in interface XMLCryptoContexturiDereferencer - the URIDereferencer, or
null to remove any current settinggetURIDereferencer()public String getNamespacePrefix(String namespaceURI, String defaultPrefix)
putNamespacePrefix
method.getNamespacePrefix in interface XMLCryptoContextnamespaceURI - a namespace URIdefaultPrefix - the prefix to be returned in the event that the
the specified namespace URI has not been bound to a prefix.defaultPrefix if the URI is not registered. If
the namespace URI is registered but has no prefix, an empty string
("") is returned.NullPointerException - if namespaceURI is
nullputNamespacePrefix(String, String)public String putNamespacePrefix(String namespaceURI, String prefix)
putNamespacePrefix in interface XMLCryptoContextnamespaceURI - a namespace URIprefix - a namespace prefix (or null to remove any
existing mapping). Specifying the empty string ("")
binds no prefix to the namespace URI.null if there was noneNullPointerException - if namespaceURI is
nullgetNamespacePrefix(String, String)public String getDefaultNamespacePrefix()
putNamespacePrefix method.getDefaultNamespacePrefix in interface XMLCryptoContextnull if none has
been set.setDefaultNamespacePrefix(String)public void setDefaultNamespacePrefix(String defaultNamespacePrefix)
putNamespacePrefix method.setDefaultNamespacePrefix in interface XMLCryptoContextdefaultNamespacePrefix - the default namespace prefix, or null
to remove the current setting. Specify the empty string
("") to bind no prefix.getDefaultNamespacePrefix()public Object setProperty(String name, Object value)
setProperty in interface XMLCryptoContextname - the name of the propertyvalue - the value of the property to be setnull if it did not have a valueNullPointerException - if name is nullgetProperty(String)public Object getProperty(String name)
getProperty in interface XMLCryptoContextname - the name of the propertynull if it does not have a valueNullPointerException - if name is nullsetProperty(String, Object)public Object get(Object 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.
get in interface XMLCryptoContextkey - the key whose associated value is to be returnednull if there is no mapping for the keyput(Object, Object)public Object put(Object key, Object value)
This method is useful for storing arbitrary information that is specific to the cryptographic operation that this context is used for.
put in interface XMLCryptoContextkey - key with which the specified value is to be associated withvalue - value to be associated with the specified keynull
if there was no mapping for the keyIllegalArgumentException - if some aspect of this key or value
prevents it from being stored in this contextget(Object)Copyright © 2005–2018 Oracle Corporation. All rights reserved.