|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.rsa.swsj.Reference
This class is used by the application to identify the element on which to
perform the security operation. This class handles URI processing to
identify input data and transformations on that input data. For security
operations of type XMLSignature, the SigReference
type of reference must be used.
| Field Summary | |
static java.lang.String |
ALG_TRANSFORM_BASE64
Specifies the Base64 transform algorithm. |
static java.lang.String |
ALG_TRANSFORM_C14N
Specifies the canonicalization without comments transform. |
static java.lang.String |
ALG_TRANSFORM_C14N_WITH_COMMENTS
Specifies the canonicalization with comments transform. |
static java.lang.String |
ALG_TRANSFORM_ENVELOPED_SIGNATURE
Specifies the Enveloped-Signature transform algorithm. |
static java.lang.String |
ALG_TRANSFORM_EXCLC14N
Specifies the exclusive canonicalization transform. |
static java.lang.String |
ALG_TRANSFORM_EXCLC14N_WITH_COMMENTS
Specifies the exclusive canonicalization with comments transform. |
static java.lang.String |
ALG_TRANSFORM_XPATH
Specifies the XPath transform algorithm. |
| Constructor Summary | |
Reference(SWSJContext context)
The default constructor that creates an empty |
|
Reference(SWSJContext context,
java.lang.String uri)
Creates a |
|
| Method Summary | |
void |
addTransform(java.lang.String transform,
java.lang.Object param)
Adds a transformation to this reference object by appending the
|
getContext()
Gets the SWSJContext, that is used to carry a number of common parameters and state variables. |
|
java.lang.String |
getId()
Returns the Id of this Reference as a |
java.lang.Object[] |
getTransformParams()
Get the array of transformation parameters. |
java.lang.String[] |
getTransforms()
Gets the array of transform algorithms. |
java.lang.String |
getURI()
Returns the URI of this reference. |
void |
setId(java.lang.String id)
Sets the optional Id of this Reference to id. |
void |
setURI(java.lang.String uri)
Sets the URI of this reference to the given value. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ALG_TRANSFORM_BASE64
public static final java.lang.String ALG_TRANSFORM_C14N
public static final java.lang.String ALG_TRANSFORM_C14N_WITH_COMMENTS
public static final java.lang.String ALG_TRANSFORM_EXCLC14N
public static final java.lang.String ALG_TRANSFORM_EXCLC14N_WITH_COMMENTS
public static final java.lang.String ALG_TRANSFORM_XPATH
Basic XML
Concepts section of the online Reference.
public static final java.lang.String ALG_TRANSFORM_ENVELOPED_SIGNATURE
| Constructor Detail |
public Reference(SWSJContext context)
throws InvalidParameterException
Reference
object that is initialized only with context.
context - An object that collects a number of common parameters and
state variables; for example, JCE provider.
InvalidParameterException - If context is invalid.
public Reference(SWSJContext context,
java.lang.String uri)
throws InvalidParameterException
Reference object and sets the URI setting to
uri.
context - An object that collects a number of common parameters and
state variables; for example, JCE provider.uri - A String containing the URI that identifies the
data object.
InvalidParameterException - If any paramter is invalid.| Method Detail |
public SWSJContext getContext()
public void setURI(java.lang.String uri)
uri - A String value that contains the URI.public java.lang.String getURI()
String of this Reference.
public void addTransform(java.lang.String transform,
java.lang.Object param)
throws InvalidParameterException
transform to the existing transformations.
Transformations describe how the signer obtained the data object that
was digested. This argument is optional. There can be any number of
transforms. The output of each transform (octets/nodesets) serves as
input to the next transform. The input for the first transform is the
source data. The output from the last transform is the input to the
digest algorithm (in case of XMLSignature).
Each transform consists of the name of the algorithm to perform and
content parameters, if any, appropriate for the given algorithm.
Examples of transforms include Base64 encoding, canonicalization, and
XPath filtering.
Note: The order of tranformers in the transformation list is
critical. If the tranformation list contains an enveloped signature
transform, it must appear before any canonicalization and Base64
transforms, as it requires the original node-set to which the URI
points as its input.
String array in
the following format:
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
The following example fills an array for the params
parameter with one namespace and an XPath expression:
new String [] {
"xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"",
"ancestor-or-self::ds:X509Data[attribute::Id='rsa_X509Certificate']"
};
String of white space delimited list of namespace
prefixes, where #default indicates the default namespace."dsig soap #default" is an example.
transform - The name of transform algorithm.param - The parameter for this transform algorithm. For
an XPATH transform pass an array of String
expressions as described above. Pass null if this
algorithm does not take any parameters.
InvalidParameterException - If the specified transform
algorithm is null or not supported.public java.lang.String[] getTransforms()
public java.lang.Object[] getTransformParams()
public java.lang.String getId()
String object.
String object.public void setId(java.lang.String id)
id - A String object containing the ID for this
Reference object.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||