Path: blob/master/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Manifest.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: Manifest.java,v 1.7 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>Manifest</code> element as defined in34* 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>{@code38* <element name="Manifest" type="ds:ManifestType"/>39* <complexType name="ManifestType">40* <sequence>41* <element ref="ds:Reference" maxOccurs="unbounded"/>42* </sequence>43* <attribute name="Id" type="ID" use="optional"/>44* </complexType>45* }</pre>46*47* A <code>Manifest</code> instance may be created by invoking48* one of the {@link XMLSignatureFactory#newManifest newManifest}49* methods of the {@link XMLSignatureFactory} class; for example:50*51* <pre>52* XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");53* Reference ref = factory.newReference("#reference-1", DigestMethod.SHA1);54* List<Reference> references = Collections.singletonList(ref);55* Manifest manifest = factory.newManifest(references, "manifest-1");56* </pre>57*58* @author Sean Mullan59* @author JSR 105 Expert Group60* @since 1.661* @see XMLSignatureFactory#newManifest(List)62* @see XMLSignatureFactory#newManifest(List, String)63*/64public interface Manifest extends XMLStructure {6566/**67* URI that identifies the <code>Manifest</code> element (this can be68* specified as the value of the <code>type</code> parameter of the69* {@link Reference} class to identify the referent's type).70*/71static final String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest";7273/**74* Returns the Id of this <code>Manifest</code>.75*76* @return the Id of this <code>Manifest</code> (or <code>null</code>77* if not specified)78*/79String getId();8081/**82* Returns an {@link java.util.Collections#unmodifiableList unmodifiable83* list} of one or more {@link Reference}s that are contained in this84* <code>Manifest</code>.85*86* @return an unmodifiable list of one or more <code>Reference</code>s87*/88List<Reference> getReferences();89}909192