This project has retired. For details please refer to its
Attic page.
EnumServiceException xref
1
2 package org.apache.chemistry.opencmis.commons.impl.jaxb;
3
4 import javax.xml.bind.annotation.XmlEnum;
5 import javax.xml.bind.annotation.XmlEnumValue;
6 import javax.xml.bind.annotation.XmlType;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 @XmlType(name = "enumServiceException")
36 @XmlEnum
37 public enum EnumServiceException {
38
39 @XmlEnumValue("constraint")
40 CONSTRAINT("constraint"),
41 @XmlEnumValue("nameConstraintViolation")
42 NAME_CONSTRAINT_VIOLATION("nameConstraintViolation"),
43 @XmlEnumValue("contentAlreadyExists")
44 CONTENT_ALREADY_EXISTS("contentAlreadyExists"),
45 @XmlEnumValue("filterNotValid")
46 FILTER_NOT_VALID("filterNotValid"),
47 @XmlEnumValue("invalidArgument")
48 INVALID_ARGUMENT("invalidArgument"),
49 @XmlEnumValue("notSupported")
50 NOT_SUPPORTED("notSupported"),
51 @XmlEnumValue("objectNotFound")
52 OBJECT_NOT_FOUND("objectNotFound"),
53 @XmlEnumValue("permissionDenied")
54 PERMISSION_DENIED("permissionDenied"),
55 @XmlEnumValue("runtime")
56 RUNTIME("runtime"),
57 @XmlEnumValue("storage")
58 STORAGE("storage"),
59 @XmlEnumValue("streamNotSupported")
60 STREAM_NOT_SUPPORTED("streamNotSupported"),
61 @XmlEnumValue("updateConflict")
62 UPDATE_CONFLICT("updateConflict"),
63 @XmlEnumValue("versioning")
64 VERSIONING("versioning");
65 private final String value;
66
67 EnumServiceException(String v) {
68 value = v;
69 }
70
71 public String value() {
72 return value;
73 }
74
75 public static EnumServiceException fromValue(String v) {
76 for (EnumServiceException c: EnumServiceException.values()) {
77 if (c.value.equals(v)) {
78 return c;
79 }
80 }
81 throw new IllegalArgumentException(v);
82 }
83
84 }