001: /*--
002:
003: Copyright (C) 2002-2005 Adrian Price.
004: All rights reserved.
005:
006: Redistribution and use in source and binary forms, with or without
007: modification, are permitted provided that the following conditions
008: are met:
009:
010: 1. Redistributions of source code must retain the above copyright
011: notice, this list of conditions, and the following disclaimer.
012:
013: 2. Redistributions in binary form must reproduce the above copyright
014: notice, this list of conditions, and the disclaimer that follows
015: these conditions in the documentation and/or other materials
016: provided with the distribution.
017:
018: 3. The names "OBE" and "Open Business Engine" must not be used to
019: endorse or promote products derived from this software without prior
020: written permission. For written permission, please contact
021: adrianprice@sourceforge.net.
022:
023: 4. Products derived from this software may not be called "OBE" or
024: "Open Business Engine", nor may "OBE" or "Open Business Engine"
025: appear in their name, without prior written permission from
026: Adrian Price (adrianprice@users.sourceforge.net).
027:
028: THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
029: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
030: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
031: DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
032: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
033: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
034: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
035: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
036: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
037: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
038: POSSIBILITY OF SUCH DAMAGE.
039:
040: For more information on OBE, please see
041: <http://obe.sourceforge.net/>.
042:
043: */
044:
045: package org.obe.wfxml.model;
046:
047: import org.obe.util.AbstractEnum;
048:
049: import java.util.ArrayList;
050: import java.util.Collections;
051: import java.util.List;
052:
053: public final class ExceptionCode extends AbstractEnum {
054: private static final long serialVersionUID = -2572392200838043501L;
055: private static final List _values = new ArrayList();
056: public static final List VALUES = Collections
057: .unmodifiableList(_values);
058:
059: public static final int WF_PARSING_ERROR_TYPE = 100;
060: public static final int WF_EVENT_MISSING_TYPE = 101;
061: public static final int WF_INVALID_VERSION_TYPE = 102;
062: public static final int WF_INVALID_RESPONSE_REQUIRED_VALUE_TYPE = 103;
063: public static final int WF_INVALID_KEY_TYPE = 104;
064: public static final int WF_INVALID_OPERATION_SPECIFICATION_TYPE = 105;
065: public static final int WF_INVALID_REQUEST_ID_TYPE = 106;
066:
067: public static final int WF_INVALID_CONTEXT_DATA_TYPE = 201;
068: public static final int WF_INVALID_RESULT_DATA_TYPE = 202;
069: public static final int WF_INVALID_RESULT_DATA_SET_TYPE = 203;
070:
071: public static final int WF_NO_AUTHORIZATION_TYPE = 300;
072:
073: public static final int WF_OPERATION_FAILED_TYPE = 400;
074:
075: public static final int WF_NO_ACCESS_TO_RESOURCE_TYPE = 500;
076: public static final int WF_INVALID_PROCESS_DEFINITION_TYPE = 502;
077: public static final int WF_MISSING_PROCESS_INSTANCE_KEY_TYPE = 503;
078: public static final int WF_INVALID_PROCESS_INSTANCE_KEY_TYPE = 504;
079:
080: public static final int WF_INVALID_STATE_TRANSITION_TYPE = 600;
081: public static final int WF_INVALID_OBSERVER_FOR_RESOURCE_TYPE = 601;
082: public static final int WF_MISSING_NOTIFICATION_NAME_TYPE = 602;
083: public static final int WF_INVALID_NOTIFICATION_NAME_TYPE = 603;
084:
085: public static final int WF_OTHER_TYPE = 800;
086:
087: public static final ExceptionCode WF_PARSING_ERROR = new ExceptionCode(
088: "WF_PARSING_ERROR", WF_PARSING_ERROR_TYPE);
089: public static final ExceptionCode WF_EVENT_MISSING = new ExceptionCode(
090: "WF_EVENT_MISSING", WF_EVENT_MISSING_TYPE);
091: public static final ExceptionCode WF_INVALID_VERSION = new ExceptionCode(
092: "WF_INVALID_VERSION", WF_INVALID_VERSION_TYPE);
093: public static final ExceptionCode WF_INVALID_RESPONSE_REQUIRED_VALUE = new ExceptionCode(
094: "WF_INVALID_RESPONSE_REQUIRED_VALUE",
095: WF_INVALID_RESPONSE_REQUIRED_VALUE_TYPE);
096: public static final ExceptionCode WF_INVALID_KEY = new ExceptionCode(
097: "WF_INVALID_KEY", WF_INVALID_KEY_TYPE);
098: public static final ExceptionCode WF_INVALID_OPERATION_SPECIFICATION = new ExceptionCode(
099: "WF_INVALID_OPERATION_SPECIFICATION",
100: WF_INVALID_OPERATION_SPECIFICATION_TYPE);
101: public static final ExceptionCode WF_INVALID_REQUEST_ID = new ExceptionCode(
102: "WF_INVALID_REQUEST_ID", WF_INVALID_REQUEST_ID_TYPE);
103:
104: public static final ExceptionCode WF_INVALID_CONTEXT_DATA = new ExceptionCode(
105: "WF_INVALID_CONTEXT_DATA", WF_INVALID_CONTEXT_DATA_TYPE);
106: public static final ExceptionCode WF_INVALID_RESULT_DATA = new ExceptionCode(
107: "WF_INVALID_RESULT_DATA", WF_INVALID_RESULT_DATA_TYPE);
108: public static final ExceptionCode WF_INVALID_RESULT_DATA_SET = new ExceptionCode(
109: "WF_INVALID_RESULT_DATA_SET",
110: WF_INVALID_RESULT_DATA_SET_TYPE);
111:
112: public static final ExceptionCode WF_NO_AUTHORIZATION = new ExceptionCode(
113: "WF_NO_AUTHORIZATION", WF_NO_AUTHORIZATION_TYPE);
114:
115: public static final ExceptionCode WF_OPERATION_FAILED = new ExceptionCode(
116: "WF_OPERATION_FAILED", WF_OPERATION_FAILED_TYPE);
117:
118: public static final ExceptionCode WF_NO_ACCESS_TO_RESOURCE = new ExceptionCode(
119: "WF_NO_ACCESS_TO_RESOURCE", WF_NO_ACCESS_TO_RESOURCE_TYPE);
120: public static final ExceptionCode WF_INVALID_PROCESS_DEFINITION = new ExceptionCode(
121: "WF_INVALID_PROCESS_DEFINITION",
122: WF_INVALID_PROCESS_DEFINITION_TYPE);
123: public static final ExceptionCode WF_MISSING_PROCESS_INSTANCE_KEY = new ExceptionCode(
124: "WF_MISSING_PROCESS_INSTANCE_KEY",
125: WF_MISSING_PROCESS_INSTANCE_KEY_TYPE);
126: public static final ExceptionCode WF_INVALID_PROCESS_INSTANCE_KEY = new ExceptionCode(
127: "WF_INVALID_PROCESS_INSTANCE_KEY",
128: WF_INVALID_PROCESS_INSTANCE_KEY_TYPE);
129:
130: public static final ExceptionCode WF_INVALID_STATE_TRANSITION = new ExceptionCode(
131: "WF_INVALID_STATE_TRANSITION",
132: WF_INVALID_STATE_TRANSITION_TYPE);
133: public static final ExceptionCode WF_INVALID_OBSERVER_FOR_RESOURCE = new ExceptionCode(
134: "WF_INVALID_OBSERVER_FOR_RESOURCE",
135: WF_INVALID_OBSERVER_FOR_RESOURCE_TYPE);
136: public static final ExceptionCode WF_MISSING_NOTIFICATION_NAME = new ExceptionCode(
137: "WF_MISSING_NOTIFICATION_NAME",
138: WF_MISSING_NOTIFICATION_NAME_TYPE);
139: public static final ExceptionCode WF_INVALID_NOTIFICATION_NAME = new ExceptionCode(
140: "WF_INVALID_NOTIFICATION_NAME",
141: WF_INVALID_NOTIFICATION_NAME_TYPE);
142:
143: public static final ExceptionCode WF_OTHER = new ExceptionCode(
144: "WF_OTHER", WF_OTHER_TYPE);
145:
146: private ExceptionCode(String name, int value) {
147: super (name, value);
148: _values.add(this );
149: }
150:
151: public List family() {
152: return VALUES;
153: }
154: }
|