~ubuntu-branches/ubuntu/karmic/libxml-security-java/karmic

« back to all changes in this revision

Viewing changes to src/javax/xml/crypto/dsig/SignatureProperty.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-01-18 14:56:26 UTC
  • Revision ID: james.westby@ubuntu.com-20080118145626-makoebepbd9mb0jf
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2005 The Apache Software Foundation.
 
3
 *
 
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
 
5
 *  you may not use this file except in compliance with the License.
 
6
 *  You may obtain a copy of the License at
 
7
 *
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 *  Unless required by applicable law or agreed to in writing, software
 
11
 *  distributed under the License is distributed on an "AS IS" BASIS,
 
12
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 *  See the License for the specific language governing permissions and
 
14
 *  limitations under the License.
 
15
 *
 
16
 */
 
17
/*
 
18
 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
 
19
 */
 
20
/*
 
21
 * $Id: SignatureProperty.java 375655 2006-02-07 18:35:54 +0000 (Tue, 07 Feb 2006) mullan $
 
22
 */
 
23
package javax.xml.crypto.dsig;
 
24
 
 
25
import javax.xml.crypto.XMLStructure;
 
26
import java.util.List;
 
27
 
 
28
/**
 
29
 * A representation of the XML <code>SignatureProperty</code> element as 
 
30
 * defined in the <a href="http://www.w3.org/TR/xmldsig-core/">
 
31
 * W3C Recommendation for XML-Signature Syntax and Processing</a>.
 
32
 * The XML Schema Definition is defined as:
 
33
 * <pre><code>
 
34
 *&lt;element name="SignatureProperty" type="ds:SignaturePropertyType"/&gt; 
 
35
 *   &lt;complexType name="SignaturePropertyType" mixed="true"&gt;
 
36
 *     &lt;choice maxOccurs="unbounded"&gt; 
 
37
 *       &lt;any namespace="##other" processContents="lax"/&gt;
 
38
 *       &lt;!-- (1,1) elements from (1, unbounded) namespaces --&gt;
 
39
 *     &lt;/choice&gt;
 
40
 *     &lt;attribute name="Target" type="anyURI" use="required"/&gt; 
 
41
 *     &lt;attribute name="Id" type="ID" use="optional"/&gt; 
 
42
 *   &lt;/complexType&gt;
 
43
 * </code></pre>
 
44
 *
 
45
 * A <code>SignatureProperty</code> instance may be created by invoking the
 
46
 * {@link XMLSignatureFactory#newSignatureProperty newSignatureProperty} 
 
47
 * method of the {@link XMLSignatureFactory} class; for example: 
 
48
 *
 
49
 * <pre>
 
50
 *   XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
 
51
 *   SignatureProperty property = factory.newSignatureProperty
 
52
 *      (Collections.singletonList(content), "#Signature-1", "TimeStamp");
 
53
 * </pre>
 
54
 *
 
55
 * @author Sean Mullan
 
56
 * @author JSR 105 Expert Group
 
57
 * @see XMLSignatureFactory#newSignatureProperty(List, String, String)
 
58
 * @see SignatureProperties
 
59
 */
 
60
public interface SignatureProperty extends XMLStructure {
 
61
 
 
62
    /**
 
63
     * Returns the target URI of this <code>SignatureProperty</code>.
 
64
     *
 
65
     * @return the target URI of this <code>SignatureProperty</code> (never 
 
66
     *    <code>null</code>)
 
67
     */
 
68
    String getTarget();
 
69
 
 
70
    /**
 
71
     * Returns the Id of this <code>SignatureProperty</code>.
 
72
     *
 
73
     * @return the Id of this <code>SignatureProperty</code> (or 
 
74
     *    <code>null</code> if not specified)
 
75
     */
 
76
    String getId();
 
77
    
 
78
    /**
 
79
     * Returns an {@link java.util.Collections#unmodifiableList unmodifiable 
 
80
     * list} of one or more {@link XMLStructure}s that are contained in 
 
81
     * this <code>SignatureProperty</code>. These represent additional
 
82
     * information items concerning the generation of the {@link XMLSignature}
 
83
     * (i.e. date/time stamp or serial numbers of cryptographic hardware used
 
84
     * in signature generation).
 
85
     *
 
86
     * @return an unmodifiable list of one or more <code>XMLStructure</code>s 
 
87
     */
 
88
    List getContent();
 
89
}