|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.xml.crypto.dsig
|
Field Summary |
---|
Fields inherited from interface javax.xml.crypto.dsig.Transform |
---|
BASE64, ENVELOPED, XPATH, XPATH2, XSLT |
Constructor Summary | |
---|---|
protected |
TransformService()
Default constructor, for invocation by subclasses. |
Method Summary | |
---|---|
String |
getAlgorithm()
Returns the URI of the algorithm supported by this TransformService . |
static TransformService |
getInstance(String algorithm,
String mechanismType)
Returns a TransformService that supports the specified
algorithm URI (ex: Transform.XPATH2 ) and mechanism type
(ex: DOM). |
static TransformService |
getInstance(String algorithm,
String mechanismType,
Provider provider)
Returns a TransformService that supports the specified
algorithm URI (ex: Transform.XPATH2 ) and mechanism type
(ex: DOM) as supplied by the specified provider. |
static TransformService |
getInstance(String algorithm,
String mechanismType,
String provider)
Returns a TransformService that supports the specified
algorithm URI (ex: Transform.XPATH2 ) and mechanism type
(ex: DOM) as supplied by the specified provider. |
String |
getMechanismType()
Returns the mechanism type supported by this TransformService . |
Provider |
getProvider()
Returns the provider of this TransformService . |
abstract void |
init(TransformParameterSpec params)
Initializes this TransformService with the specified
parameters. |
abstract void |
init(XMLStructure parent,
XMLCryptoContext context)
Initializes this TransformService with the specified
parameters and document context. |
abstract void |
marshalParams(XMLStructure parent,
XMLCryptoContext context)
Marshals the algorithm-specific parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.crypto.dsig.Transform |
---|
getParameterSpec, transform, transform |
Methods inherited from interface javax.xml.crypto.XMLStructure |
---|
isFeatureSupported |
Constructor Detail |
---|
protected TransformService()
Method Detail |
---|
public static TransformService getInstance(String algorithm, String mechanismType) throws NoSuchAlgorithmException
TransformService
that supports the specified
algorithm URI (ex: Transform.XPATH2
) and mechanism type
(ex: DOM).
This method uses the standard JCA provider lookup mechanism to
locate and instantiate a TransformService
implementation
of the desired algorithm and MechanismType
service
attribute. It traverses the list of registered security
Provider
s, starting with the most preferred
Provider
. A new TransformService
object
from the first Provider
that supports the specified
algorithm and mechanism type is returned.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
algorithm
- the URI of the algorithmmechanismType
- the type of the XML processing mechanism and
representation
TransformService
NullPointerException
- if algorithm
or
mechanismType
is null
NoSuchAlgorithmException
- if no Provider
supports a
TransformService
implementation for the specified
algorithm and mechanism typeProvider
public static TransformService getInstance(String algorithm, String mechanismType, Provider provider) throws NoSuchAlgorithmException
TransformService
that supports the specified
algorithm URI (ex: Transform.XPATH2
) and mechanism type
(ex: DOM) as supplied by the specified provider. Note that the specified
Provider
object does not have to be registered in the
provider list.
algorithm
- the URI of the algorithmmechanismType
- the type of the XML processing mechanism and
representationprovider
- the Provider
object
TransformService
NullPointerException
- if provider
,
algorithm
, or mechanismType
is
null
NoSuchAlgorithmException
- if a TransformService
implementation for the specified algorithm and mechanism type is not
available from the specified Provider
objectProvider
public static TransformService getInstance(String algorithm, String mechanismType, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
TransformService
that supports the specified
algorithm URI (ex: Transform.XPATH2
) and mechanism type
(ex: DOM) as supplied by the specified provider. The specified provider
must be registered in the security provider list.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
algorithm
- the URI of the algorithmmechanismType
- the type of the XML processing mechanism and
representationprovider
- the string name of the provider
TransformService
NoSuchProviderException
- if the specified provider is not
registered in the security provider list
NullPointerException
- if provider
,
mechanismType
, or algorithm
is
null
NoSuchAlgorithmException
- if a TransformService
implementation for the specified algorithm and mechanism type is not
available from the specified providerProvider
public final String getMechanismType()
TransformService
.
public final String getAlgorithm()
TransformService
.
getAlgorithm
in interface AlgorithmMethod
public final Provider getProvider()
TransformService
.
public abstract void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException
TransformService
with the specified
parameters.
If the parameters exist in XML form, the
init(XMLStructure, XMLCryptoContext)
method should be used to
initialize the TransformService
.
params
- the algorithm parameters (may be null
if
not required or optional)
InvalidAlgorithmParameterException
- if the specified parameters
are invalid for this algorithmpublic abstract void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException
parent
- a mechanism-specific structure containing the parent
node that the marshalled parameters should be appended tocontext
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)
ClassCastException
- if the type of parent
or
context
is not compatible with this
TransformService
NullPointerException
- if parent
is null
MarshalException
- if the parameters cannot be marshalledpublic abstract void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException
TransformService
with the specified
parameters and document context.
parent
- a mechanism-specific structure containing the parent
structurecontext
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)
ClassCastException
- if the type of parent
or
context
is not compatible with this
TransformService
NullPointerException
- if parent
is null
InvalidAlgorithmParameterException
- if the specified parameters
are invalid for this algorithm