8224767: Add String constants for Canonical XML 1.1 URIs

Reviewed-by: xuelei
This commit is contained in:
Sean Mullan 2019-05-30 09:24:13 -04:00
parent 087c3a9c3a
commit 8ac3b68688
2 changed files with 53 additions and 8 deletions
src/java.xml.crypto/share/classes/javax/xml/crypto/dsig

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,6 +89,24 @@ public interface CanonicalizationMethod extends Transform {
final static String EXCLUSIVE_WITH_COMMENTS =
"http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
/**
* The <a href="https://www.w3.org/TR/xml-c14n11/">Canonical XML 1.1
* (without comments)</a> canonicalization method algorithm URI.
*
* @since 13
*/
final static String INCLUSIVE_11 = "http://www.w3.org/2006/12/xml-c14n11";
/**
* The <a href="https://www.w3.org/TR/xml-c14n11/#WithComments">
* Canonical XML 1.1 with comments</a> canonicalization method algorithm
* URI.
*
* @since 13
*/
final static String INCLUSIVE_11_WITH_COMMENTS =
"http://www.w3.org/2006/12/xml-c14n11#WithComments";
/**
* Returns the algorithm-specific input parameters associated with this
* <code>CanonicalizationMethod</code>.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -141,9 +141,18 @@ public abstract class TransformService implements Transform {
* may be different than the order of providers returned by
* {@link Security#getProviders() Security.getProviders()}.
*
* @param algorithm the URI of the algorithm
* @param algorithm the URI of the algorithm. See the
* {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-transform-transformservice-algorithms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard transform algorithms.
* @param mechanismType the type of the XML processing mechanism and
* representation
* representation. See the {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-xmlsignaturefactorykeyinfofactorytransformservice-mechanisms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard mechanism types.
* @return a new <code>TransformService</code>
* @throws NullPointerException if <code>algorithm</code> or
* <code>mechanismType</code> is <code>null</code>
@ -193,9 +202,18 @@ public abstract class TransformService implements Transform {
* <code>Provider</code> object does not have to be registered in the
* provider list.
*
* @param algorithm the URI of the algorithm
* @param algorithm the URI of the algorithm. See the
* {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-transform-transformservice-algorithms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard transform algorithms.
* @param mechanismType the type of the XML processing mechanism and
* representation
* representation. See the {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-xmlsignaturefactorykeyinfofactorytransformservice-mechanisms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard mechanism types.
* @param provider the <code>Provider</code> object
* @return a new <code>TransformService</code>
* @throws NullPointerException if <code>provider</code>,
@ -246,9 +264,18 @@ public abstract class TransformService implements Transform {
* <p>Note that the list of registered providers may be retrieved via
* the {@link Security#getProviders() Security.getProviders()} method.
*
* @param algorithm the URI of the algorithm
* @param algorithm the URI of the algorithm. See the
* {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-transform-transformservice-algorithms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard transform algorithms.
* @param mechanismType the type of the XML processing mechanism and
* representation
* representation. See the {@code TransformService} section in the
* <a href=
* "{@docRoot}/../specs/security/standard-names.html#xml-signature-xmlsignaturefactorykeyinfofactorytransformservice-mechanisms">
* Java Security Standard Algorithm Names Specification</a> for a list of
* standard mechanism types.
* @param provider the string name of the provider
* @return a new <code>TransformService</code>
* @throws NoSuchProviderException if the specified provider is not