1/*
2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25/*
26 * $Id: KeyName.java,v 1.4 2005/05/10 16:35:35 mullan Exp $
27 */
28package javax.xml.crypto.dsig.keyinfo;
29
30import javax.xml.crypto.XMLStructure;
31
32/**
33 * A representation of the XML <code>KeyName</code> element as
34 * defined in the <a href="http://www.w3.org/TR/xmldsig-core/">
35 * W3C Recommendation for XML-Signature Syntax and Processing</a>.
36 * A <code>KeyName</code> object contains a string value which may be used
37 * by the signer to communicate a key identifier to the recipient. The
38 * XML Schema Definition is defined as:
39 *
40 * <pre>
41 * &lt;element name="KeyName" type="string"/&gt;
42 * </pre>
43 *
44 * A <code>KeyName</code> instance may be created by invoking the
45 * {@link KeyInfoFactory#newKeyName newKeyName} method of the
46 * {@link KeyInfoFactory} class, and passing it a <code>String</code>
47 * representing the name of the key; for example:
48 * <pre>
49 * KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
50 * KeyName keyName = factory.newKeyName("Alice");
51 * </pre>
52 *
53 * @author Sean Mullan
54 * @author JSR 105 Expert Group
55 * @since 1.6
56 * @see KeyInfoFactory#newKeyName(String)
57 */
58public interface KeyName extends XMLStructure {
59
60    /**
61     * Returns the name of this <code>KeyName</code>.
62     *
63     * @return the name of this <code>KeyName</code> (never
64     *    <code>null</code>)
65     */
66    String getName();
67}
68