1   /*
2    * Copyright 2000-2001,2004 The Apache Software Foundation.
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.apache.wsrp4j.exception;
18  
19  public interface ErrorCodes {
20  
21      // Persistence
22      public static final int STORE_OBJECT_ERROR = 1000;
23  
24      public static final int RESTORE_OBJECT_ERROR = 1001;
25  
26      public static final int DELETE_OBJECT_ERROR = 1002;
27  
28      public static final int UNMARSHAL_ERROR = 1003;
29  
30      public static final int MARSHAL_ERROR = 1004;
31  
32      // Faults defined by the WSRP Specification
33      public static final int ACCESS_DENIED = 1100;
34  
35      public static final int INCONSISTENT_PARAMETERS = 1101;
36  
37      public static final int INVALID_REGISTRATION = 1102;
38  
39      public static final int INVALID_COOKIE = 1103;
40  
41      public static final int INVALID_HANDLE = 1104;
42  
43      public static final int INVALID_SESSION = 1105;
44  
45      public static final int INVALID_USER_CATEGORY = 1106;
46  
47      public static final int MISSING_PARAMETERS = 1107;
48  
49      public static final int OPERATION_FAILED = 1108;
50  
51      public static final int PORTLET_STATE_CHANGE_REQUIRED = 1109;
52  
53      public static final int UNSUPPORTED_LOCALE = 1110;
54  
55      public static final int UNSUPPORTED_MIME_TYPE = 1111;
56  
57      public static final int UNSUPPORTED_MODE = 1112;
58  
59      public static final int UNSUPPORTED_WINDOW_STATE = 1113;
60  
61      // Error Codes Producer
62  
63      // Access to factories
64      public static final int PROVIDER_FACTORY_NOT_FOUND = 2001;
65  
66      public static final int PROPERTY_FILE_NOT_FOUND = 2002;
67  
68      public static final int CONSUMER_REGISTRY_FACTORY_NOT_FOUND = 2003;
69  
70      public static final int PERSISTENT_FACTORY_NOT_FOUND = 2004;
71  
72      // Description Handler
73      public static final int SAVE_SERVICEDESCRIPTION_FAILED = 3000;
74  
75      public static final int LOAD_SERVICEDESCRIPTION_FAILED = 3001;
76  
77      public static final int MISSING_DEFAULT_LOCALE = 3002;
78  
79      public static final int MISSING_DEFAULT_LANGUAGE = 3003;
80  
81      public static final int NO_PORTLETDESCRIPTIONS_FOUND = 3004;
82  
83      public static final int MISSING_PORTLET_DEFINITION = 3005;
84  
85      public static final int PORTLET_PORTLET_NOT_FOUND = 3006;
86  
87      // Portlet Pool
88      public static final int GET_PORTLET_FAILED = 3020;
89  
90      // Portlet Invoker
91      public final static int SERVICE_CLASS_NOT_FOUND = 3030;
92  
93      public final static int INSTANTIATION_OF_SERVICE_FAILED = 3031;
94  
95      // URL Composer
96      public static final int UNKNOWN_TOKEN_IN_TEMPLATE = 3040;
97  
98      public static final int SYNTAX_ERROR_IN_TEMPLATE = 3041;
99  
100     // Error Codes Consumer
101     public static final int CONSUMER_PROPERTY_FILE_NOT_FOUND = 6000;
102 
103     public static final int INSTANTIATION_OF_CONSUMER_ENV_FAILED = 6001;
104 
105     public static final int COULD_NOT_ADD_REQUEST_PARAM = 6002;
106 
107     public static final int MISSING_SERVCICE_DESC_PORT = 6003;
108 
109     public static final int INIT_OF_SERVICE_DESC_PORT_FAILED = 6004;
110 
111     public static final int INVALID_URL_OF_SERVICE_DESC_PORT = 6005;
112 
113     public static final int INIT_OF_REGISTRATION_PORT_FAILED = 6006;
114 
115     public static final int INVALID_URL_OF_REGISTRATION_PORT = 6007;
116 
117     public static final int INVALID_LINK_WITHIN_MARKUP = 6008;
118 
119     public static final int NO_VALID_URL_TYPE_PARAM_FOUND = 6009;
120 
121     public static final int INVALID_PORTLET_HANDLE = 6010;
122 
123     public static final int INVALID_SERVICE_DESCRIPTION = 6011;
124 
125     public static final int COULD_NOT_FOLLOW_REDIRECT = 6012;
126 
127     public static final int PRODUCER_DOES_NOT_EXIST = 6013;
128 
129     public static final int INIT_OF_PORTLET_MGMT_PORT_FAILED = 6014;
130 
131     public static final int INVALID_URL_OF_PORTLET_MGMT_PORT = 6015;
132 
133     public static final int MISSING_MARKUP_PORT = 6016;
134 
135     public static final int INIT_OF_MARKUP_PORT_FAILED = 6017;
136 
137     public static final int INVALID_URL_OF_MARKUP_PORT = 6018;
138 
139     public static final int PORTLET_DESC_NOT_FOUND = 6019;
140 
141     public static final int USER_SESSION_NOT_FOUND = 6020;
142 
143     public static final int GROUP_SESSION_NOT_FOUND = 6021;
144 
145     public static final int PORTLET_SESSION_NOT_FOUND = 6022;
146 
147     public static final int WINDWOS_SESSION_NOT_FOUND = 6023;
148 }