View Javadoc

1   /*
2    * Copyright 2005 University Corporation for Advanced Internet Development, Inc.
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  package org.opensaml.saml1.core;
18  
19  import javax.xml.namespace.QName;
20  
21  import org.opensaml.common.SAMLObject;
22  import org.opensaml.common.xml.SAMLConstants;
23  
24  /** Interface to define how a NameIdentifier element behaves. */
25  public interface NameIdentifier extends SAMLObject {
26  
27      /** Element name, no namespace. */
28      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "NameIdentifier";
29  
30      /** Default element name. */
31      public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML1_NS, DEFAULT_ELEMENT_LOCAL_NAME,
32              SAMLConstants.SAML1_PREFIX);
33  
34      /** Local name of the XSI type. */
35      public static final String TYPE_LOCAL_NAME = "NameIdentifierType";
36  
37      /** QName of the XSI type. */
38      public static final QName TYPE_NAME = new QName(SAMLConstants.SAML1_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML1_PREFIX);
39  
40      /** Name for the attribute which defines Name Qualifier. */
41      public static final String NAMEQUALIFIER_ATTRIB_NAME = "NameQualifier";
42  
43      /** Name for the attribute which defines Name Qualifier. */
44      public static final String FORMAT_ATTRIB_NAME = "Format";
45  
46      /** URI for unspecified name format. */
47      public static final String UNSPECIFIED = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified";
48  
49      /** URI for email name format. */
50      public static final String EMAIL = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress";
51  
52      /** URI for X509 subject name format. */
53      public static final String X509_SUBJECT = "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName";
54  
55      /** URI for windows domain qualified name name format. */
56      public static final String WIN_DOMAIN_QUALIFIED = "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName";
57  
58      /**
59       * Gets the name qualifier for this identifier.
60       * 
61       * @return name qualifier for this identifier
62       */
63      public String getNameQualifier();
64  
65      /**
66       * Sets the name qualifier for this identifier.
67       * 
68       * @param nameQualifier name qualifier for this identifier
69       */
70      public void setNameQualifier(String nameQualifier);
71  
72      /**
73       * Gets the format of this identifier.
74       * 
75       * @return format of this identifier
76       */
77      public String getFormat();
78  
79      /**
80       * Sets the format of this identifier.
81       * 
82       * @param format format of this identifier
83       */
84      public void setFormat(String format);
85  
86      /**
87       * Gets the identifier.
88       * 
89       * @return the identifier
90       */
91      public String getNameIdentifier();
92  
93      /**
94       * Sets the identifier.
95       * 
96       * @param nameIdentifier the identifier.
97       */
98      public void setNameIdentifier(String nameIdentifier);
99  }