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.saml2.metadata;
18  
19  /**
20   * A type safe enumeration of contact types used by {@link org.opensaml.saml2.metadata.ContactPerson}.
21   */
22  public final class ContactPersonTypeEnumeration {
23  
24      /** "technical" contact type */
25      public static final ContactPersonTypeEnumeration TECHNICAL = new ContactPersonTypeEnumeration("technical");
26  
27      /** "support" contact type */
28      public static final ContactPersonTypeEnumeration SUPPORT = new ContactPersonTypeEnumeration("support");
29  
30      /** "administrative" contact type */
31      public static final ContactPersonTypeEnumeration ADMINISTRATIVE = new ContactPersonTypeEnumeration("administrative");
32  
33      /** "billing" contact type */
34      public static final ContactPersonTypeEnumeration BILLING = new ContactPersonTypeEnumeration("billing");
35  
36      /** "other" contact type */
37      public static final ContactPersonTypeEnumeration OTHER = new ContactPersonTypeEnumeration("other");
38  
39      /** the contact type */
40      private String type;
41  
42      /**
43       * Constructor
44       * 
45       * @param type the contact type
46       */
47      protected ContactPersonTypeEnumeration(String type) {
48          this.type = type;
49      }
50  
51      /**
52       * Gets the contact type as a string.
53       * 
54       * @return the contact type
55       */
56      public String toString() {
57          return type;
58      }
59  }