View Javadoc
1   
2   package org.miloss.fgsms.services.interfaces.faults;
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   * <p>Java class for ServiceUnavailableFaultCodes.
11   * 
12   * <p>The following schema fragment specifies the expected content contained within this class.
13   * <p>
14   * <pre>
15   * &lt;simpleType name="ServiceUnavailableFaultCodes">
16   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
17   *     &lt;enumeration value="DataBasePermissionError"/>
18   *     &lt;enumeration value="UserPermissionError"/>
19   *     &lt;enumeration value="DataBaseUnavailable"/>
20   *     &lt;enumeration value="Misconfiguration"/>
21   *     &lt;enumeration value="UnexpectedError"/>
22   *     &lt;enumeration value="AgentsDisabledError"/>
23   *   &lt;/restriction>
24   * &lt;/simpleType>
25   * </pre>
26   * 
27   */
28  @XmlType(name = "ServiceUnavailableFaultCodes")
29  @XmlEnum
30  public enum ServiceUnavailableFaultCodes {
31  
32  
33      /**
34       * 
35       *              Happens when the supplied credentials cannot perform some kind of query in the database
36       *              
37       * 
38       */
39      @XmlEnumValue("DataBasePermissionError")
40      DATA_BASE_PERMISSION_ERROR("DataBasePermissionError"),
41  
42      /**
43       * 
44       *              Happens when the supplied user credentials does not have access to the requested resource or action.
45       *              
46       * 
47       */
48      @XmlEnumValue("UserPermissionError")
49      USER_PERMISSION_ERROR("UserPermissionError"),
50  
51      /**
52       * 
53       *              Happens when the database is either offline or access to the database was denied for the
54       *              specified credentials
55       *              
56       * 
57       */
58      @XmlEnumValue("DataBaseUnavailable")
59      DATA_BASE_UNAVAILABLE("DataBaseUnavailable"),
60  
61      /**
62       * 
63       *              Happens when the connection string is not present in the configuration file.
64       *              
65       * 
66       */
67      @XmlEnumValue("Misconfiguration")
68      MISCONFIGURATION("Misconfiguration"),
69  
70      /**
71       * 
72       *             A generic error message indicating an unhandled exception or fault.
73       *             
74       * 
75       */
76      @XmlEnumValue("UnexpectedError")
77      UNEXPECTED_ERROR("UnexpectedError"),
78  
79      /**
80       * Indicates that an agent has sent peformance data however the global settings have stated that all agent traffic should be disabled.
81       * 
82       */
83      @XmlEnumValue("AgentsDisabledError")
84      AGENTS_DISABLED_ERROR("AgentsDisabledError");
85      private final String value;
86  
87      ServiceUnavailableFaultCodes(String v) {
88          value = v;
89      }
90  
91      public String value() {
92          return value;
93      }
94  
95      public static ServiceUnavailableFaultCodes fromValue(String v) {
96          for (ServiceUnavailableFaultCodes c: ServiceUnavailableFaultCodes.values()) {
97              if (c.value.equals(v)) {
98                  return c;
99              }
100         }
101         throw new IllegalArgumentException(v);
102     }
103 
104 }