View Javadoc
1   /*
2    * Copyright 2017 the original author or authors.
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  package org.openehealth.ipf.commons.ihe.hpd.stub.dsmlv2;
17  
18  import javax.xml.bind.annotation.XmlEnum;
19  import javax.xml.bind.annotation.XmlEnumValue;
20  import javax.xml.bind.annotation.XmlType;
21  
22  
23  /**
24   * <p>Java class for LDAPResultCode.
25   * 
26   * <p>The following schema fragment specifies the expected content contained within this class.
27   * <p>
28   * <pre>
29   * &lt;simpleType name="LDAPResultCode">
30   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
31   *     &lt;enumeration value="success"/>
32   *     &lt;enumeration value="operationsError"/>
33   *     &lt;enumeration value="protocolError"/>
34   *     &lt;enumeration value="timeLimitExceeded"/>
35   *     &lt;enumeration value="sizeLimitExceeded"/>
36   *     &lt;enumeration value="compareFalse"/>
37   *     &lt;enumeration value="compareTrue"/>
38   *     &lt;enumeration value="authMethodNotSupported"/>
39   *     &lt;enumeration value="strongAuthRequired"/>
40   *     &lt;enumeration value="referral"/>
41   *     &lt;enumeration value="adminLimitExceeded"/>
42   *     &lt;enumeration value="unavailableCriticalExtension"/>
43   *     &lt;enumeration value="confidentialityRequired"/>
44   *     &lt;enumeration value="saslBindInProgress"/>
45   *     &lt;enumeration value="noSuchAttribute"/>
46   *     &lt;enumeration value="undefinedAttributeType"/>
47   *     &lt;enumeration value="inappropriateMatching"/>
48   *     &lt;enumeration value="constraintViolation"/>
49   *     &lt;enumeration value="attributeOrValueExists"/>
50   *     &lt;enumeration value="invalidAttributeSyntax"/>
51   *     &lt;enumeration value="noSuchObject"/>
52   *     &lt;enumeration value="aliasProblem"/>
53   *     &lt;enumeration value="invalidDNSyntax"/>
54   *     &lt;enumeration value="aliasDerefencingProblem"/>
55   *     &lt;enumeration value="inappropriateAuthentication"/>
56   *     &lt;enumeration value="invalidCredentials"/>
57   *     &lt;enumeration value="insufficientAccessRights"/>
58   *     &lt;enumeration value="busy"/>
59   *     &lt;enumeration value="unavailable"/>
60   *     &lt;enumeration value="unwillingToPerform"/>
61   *     &lt;enumeration value="loopDetect"/>
62   *     &lt;enumeration value="namingViolation"/>
63   *     &lt;enumeration value="objectClassViolation"/>
64   *     &lt;enumeration value="notAllowedOnNonLeaf"/>
65   *     &lt;enumeration value="notAllowedOnRDN"/>
66   *     &lt;enumeration value="entryAlreadyExists"/>
67   *     &lt;enumeration value="objectClassModsProhibited"/>
68   *     &lt;enumeration value="affectMultipleDSAs"/>
69   *     &lt;enumeration value="other"/>
70   *   &lt;/restriction>
71   * &lt;/simpleType>
72   * </pre>
73   * 
74   */
75  @XmlType(name = "LDAPResultCode")
76  @XmlEnum
77  public enum LDAPResultCode {
78  
79      @XmlEnumValue("success")
80      SUCCESS("success"),
81      @XmlEnumValue("operationsError")
82      OPERATIONS_ERROR("operationsError"),
83      @XmlEnumValue("protocolError")
84      PROTOCOL_ERROR("protocolError"),
85      @XmlEnumValue("timeLimitExceeded")
86      TIME_LIMIT_EXCEEDED("timeLimitExceeded"),
87      @XmlEnumValue("sizeLimitExceeded")
88      SIZE_LIMIT_EXCEEDED("sizeLimitExceeded"),
89      @XmlEnumValue("compareFalse")
90      COMPARE_FALSE("compareFalse"),
91      @XmlEnumValue("compareTrue")
92      COMPARE_TRUE("compareTrue"),
93      @XmlEnumValue("authMethodNotSupported")
94      AUTH_METHOD_NOT_SUPPORTED("authMethodNotSupported"),
95      @XmlEnumValue("strongAuthRequired")
96      STRONG_AUTH_REQUIRED("strongAuthRequired"),
97      @XmlEnumValue("referral")
98      REFERRAL("referral"),
99      @XmlEnumValue("adminLimitExceeded")
100     ADMIN_LIMIT_EXCEEDED("adminLimitExceeded"),
101     @XmlEnumValue("unavailableCriticalExtension")
102     UNAVAILABLE_CRITICAL_EXTENSION("unavailableCriticalExtension"),
103     @XmlEnumValue("confidentialityRequired")
104     CONFIDENTIALITY_REQUIRED("confidentialityRequired"),
105     @XmlEnumValue("saslBindInProgress")
106     SASL_BIND_IN_PROGRESS("saslBindInProgress"),
107     @XmlEnumValue("noSuchAttribute")
108     NO_SUCH_ATTRIBUTE("noSuchAttribute"),
109     @XmlEnumValue("undefinedAttributeType")
110     UNDEFINED_ATTRIBUTE_TYPE("undefinedAttributeType"),
111     @XmlEnumValue("inappropriateMatching")
112     INAPPROPRIATE_MATCHING("inappropriateMatching"),
113     @XmlEnumValue("constraintViolation")
114     CONSTRAINT_VIOLATION("constraintViolation"),
115     @XmlEnumValue("attributeOrValueExists")
116     ATTRIBUTE_OR_VALUE_EXISTS("attributeOrValueExists"),
117     @XmlEnumValue("invalidAttributeSyntax")
118     INVALID_ATTRIBUTE_SYNTAX("invalidAttributeSyntax"),
119     @XmlEnumValue("noSuchObject")
120     NO_SUCH_OBJECT("noSuchObject"),
121     @XmlEnumValue("aliasProblem")
122     ALIAS_PROBLEM("aliasProblem"),
123     @XmlEnumValue("invalidDNSyntax")
124     INVALID_DN_SYNTAX("invalidDNSyntax"),
125     @XmlEnumValue("aliasDerefencingProblem")
126     ALIAS_DEREFENCING_PROBLEM("aliasDerefencingProblem"),
127     @XmlEnumValue("inappropriateAuthentication")
128     INAPPROPRIATE_AUTHENTICATION("inappropriateAuthentication"),
129     @XmlEnumValue("invalidCredentials")
130     INVALID_CREDENTIALS("invalidCredentials"),
131     @XmlEnumValue("insufficientAccessRights")
132     INSUFFICIENT_ACCESS_RIGHTS("insufficientAccessRights"),
133     @XmlEnumValue("busy")
134     BUSY("busy"),
135     @XmlEnumValue("unavailable")
136     UNAVAILABLE("unavailable"),
137     @XmlEnumValue("unwillingToPerform")
138     UNWILLING_TO_PERFORM("unwillingToPerform"),
139     @XmlEnumValue("loopDetect")
140     LOOP_DETECT("loopDetect"),
141     @XmlEnumValue("namingViolation")
142     NAMING_VIOLATION("namingViolation"),
143     @XmlEnumValue("objectClassViolation")
144     OBJECT_CLASS_VIOLATION("objectClassViolation"),
145     @XmlEnumValue("notAllowedOnNonLeaf")
146     NOT_ALLOWED_ON_NON_LEAF("notAllowedOnNonLeaf"),
147     @XmlEnumValue("notAllowedOnRDN")
148     NOT_ALLOWED_ON_RDN("notAllowedOnRDN"),
149     @XmlEnumValue("entryAlreadyExists")
150     ENTRY_ALREADY_EXISTS("entryAlreadyExists"),
151     @XmlEnumValue("objectClassModsProhibited")
152     OBJECT_CLASS_MODS_PROHIBITED("objectClassModsProhibited"),
153     @XmlEnumValue("affectMultipleDSAs")
154     AFFECT_MULTIPLE_DS_AS("affectMultipleDSAs"),
155     @XmlEnumValue("other")
156     OTHER("other");
157     private final String value;
158 
159     LDAPResultCode(String v) {
160         value = v;
161     }
162 
163     public String value() {
164         return value;
165     }
166 
167     public static LDAPResultCode fromValue(String v) {
168         for (LDAPResultCode c: LDAPResultCode.values()) {
169             if (c.value.equals(v)) {
170                 return c;
171             }
172         }
173         throw new IllegalArgumentException(v);
174     }
175 
176 }