Path: blob/master/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureProperty.java
41161 views
/*1* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24/*25* $Id: SignatureProperty.java,v 1.4 2005/05/10 16:03:46 mullan Exp $26*/27package javax.xml.crypto.dsig;2829import javax.xml.crypto.XMLStructure;30import java.util.List;3132/**33* A representation of the XML <code>SignatureProperty</code> element as34* defined in the <a href="http://www.w3.org/TR/xmldsig-core/">35* W3C Recommendation for XML-Signature Syntax and Processing</a>.36* The XML Schema Definition is defined as:37* <pre><code>38*<element name="SignatureProperty" type="ds:SignaturePropertyType"/>39* <complexType name="SignaturePropertyType" mixed="true">40* <choice maxOccurs="unbounded">41* <any namespace="##other" processContents="lax"/>42* <!-- (1,1) elements from (1, unbounded) namespaces -->43* </choice>44* <attribute name="Target" type="anyURI" use="required"/>45* <attribute name="Id" type="ID" use="optional"/>46* </complexType>47* </code></pre>48*49* A <code>SignatureProperty</code> instance may be created by invoking the50* {@link XMLSignatureFactory#newSignatureProperty newSignatureProperty}51* method of the {@link XMLSignatureFactory} class; for example:52*53* <pre>54* XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");55* SignatureProperty property = factory.newSignatureProperty56* (Collections.singletonList(content), "#Signature-1", "TimeStamp");57* </pre>58*59* @author Sean Mullan60* @author JSR 105 Expert Group61* @since 1.662* @see XMLSignatureFactory#newSignatureProperty(List, String, String)63* @see SignatureProperties64*/65public interface SignatureProperty extends XMLStructure {6667/**68* Returns the target URI of this <code>SignatureProperty</code>.69*70* @return the target URI of this <code>SignatureProperty</code> (never71* <code>null</code>)72*/73String getTarget();7475/**76* Returns the Id of this <code>SignatureProperty</code>.77*78* @return the Id of this <code>SignatureProperty</code> (or79* <code>null</code> if not specified)80*/81String getId();8283/**84* Returns an {@link java.util.Collections#unmodifiableList unmodifiable85* list} of one or more {@link XMLStructure}s that are contained in86* this <code>SignatureProperty</code>. These represent additional87* information items concerning the generation of the {@link XMLSignature}88* (i.e. date/time stamp or serial numbers of cryptographic hardware used89* in signature generation).90*91* @return an unmodifiable list of one or more <code>XMLStructure</code>s92*/93List<XMLStructure> getContent();94}959697