KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > interfaces > Constants


1 package hero.interfaces;
2
3 /*
4 *
5 * Constants.java -
6 * Copyright (C) 2002 Ecoo Team
7 * charoy@loria.fr
8 * valdes@loria.fr
9 *
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */

25
26 public interface Constants {
27
28     public static final String JavaDoc ADMIN = "admin";
29     public static final String JavaDoc SECURITY_ROLE = "SuperAdmin";
30     public static final String JavaDoc USER_SECURITY_ROLE = "BONITAUSER";
31     public static final String JavaDoc INITIALROLE = "InitialRole";
32     public static final int CONDITION_FALSE = 0;
33     public static final int CONDITION_TRUE = 1;
34     public static final int AND = 1;
35     public static final int OR = 2;
36     
37     
38     // JMX Config
39
public static final String JavaDoc PURGE = "Purge";
40     public static final String JavaDoc TRANSFER = "Transfer";
41     public static final String JavaDoc DEBUG = "Debug";
42     public static final String JavaDoc INFO = "Info";
43     public static final String JavaDoc ERROR = "Error";
44     
45     public interface Hook {
46         public static final int JAVA=0;
47         public static final int JYTHON=1;
48         public static final int EXTERNAL=2;
49         public static final int CLIENT =3;
50         public static final int TCL =4;
51         public static final int BEANSHELL =5;
52         public static final int BSINTERACTIVE =6;
53     }
54     
55     public interface Mapper {
56         public static final int LDAP=0;
57         public static final int PROPERTIES=1;
58         public static final int CUSTOM=2;
59         
60         public static final String JavaDoc LDAPMAPPER = "LDAP";
61         public static final String JavaDoc PROPERTIESMAPPER = "Properties";
62         public static final String JavaDoc CUSTOMMAPPER = "Custom";
63         
64     }
65     
66     public interface PerformerAssigment {
67         public static final int CALLBACK=0;
68         public static final int PROPERTIES=1;
69         
70         public static final String JavaDoc CALLBACKPA = "Callback";
71         public static final String JavaDoc PROPERTIESPA = "Property";
72         
73     }
74
75     public interface Pj {
76         public static final int INITIAL = 0;
77         public static final int STARTED = 1;
78         public static final int TERMINATED = 2;
79         
80         // Process status
81
public static final String JavaDoc ACTIVE = "Active";
82         public static final String JavaDoc HIDDEN = "Hidden";
83         
84         // Process Type
85

86         public static final String JavaDoc MODEL = "Model";
87         public static final String JavaDoc COOPERATIVE = "Cooperative";
88         public static final String JavaDoc INSTANCE = "Instance";
89
90         public static final String JavaDoc[] projectStateName =
91             { "INITIAL", "STARTED", "TERMINATED" };
92
93     }
94
95     // BnEdge constants
96
public interface Ed {
97         public static final int INITIAL = 0;
98         public static final int ACTIVE = 1;
99         public static final int ANTICIPATING = 2;
100         public static final int DEAD = 3;
101
102         public static final String JavaDoc[] edgeStateName =
103             { "INITIAL", "ACTIVE", "ANTICIPATING", "DEAD" };
104
105     }
106
107     // BnAgent constants
108
public interface Ag {
109         public static final int INACTIVE = 0;
110         public static final int ACTIVE = 1;
111
112         public static final String JavaDoc[] agentStateName =
113             { "INACTIVE", "ACTIVE"};
114
115         public static final int ALARM = 0;
116
117     }
118
119     // BnNode constants
120
public interface Nd {
121
122         // BnNode states
123
public static final int INITIAL = 0;
124         public static final int READY = 1;
125         public static final int DEAD = 2;
126         public static final int ANTICIPABLE = 3;
127         public static final int EXPIRED = 4;
128         public static final int ANTICIPATING = 5;
129         public static final int EXECUTING = 6;
130         public static final int EXECUTED = 7;
131         public static final int INERROR = 8;
132         public static final int FINISHED = 9;
133         public static final int TERMINATED = 10;
134         public static final int CHECKEDOUT = 11;
135         public static final int ANT_SUSPENDED = 12;
136         public static final int EXEC_SUSPENDED = 13;
137         public static final int BAD_TRANSITION = 14;
138
139         public static final String JavaDoc[] nodeStateName =
140             {
141                 "INITIAL",
142                 "READY",
143                 "DEAD",
144                 "ANTICIPABLE",
145                 "EXPIRED",
146                 "ANTICIPATING",
147                 "EXECUTING",
148                 "EXECUTED",
149                 "INERROR",
150                 "FINISHED",
151                 "TERMINATED",
152                 "CHECKEDOUT",
153                 "ANT_SUSPENDED",
154                 "EXEC_SUSPENDED",
155                 "BAD_TRANSITION" };
156
157         // BnNode types
158

159         public static final int AND_JOIN_NODE = 1;
160         public static final int OR_JOIN_NODE = 2;
161         public static final int AND_JOIN_AUTOMATIC_NODE = 3;
162         public static final int OR_JOIN_AUTOMATIC_NODE = 4;
163         public static final int SUB_PROCESS_NODE = 5;
164
165         public static final String JavaDoc[] nodeTypeName =
166             {
167                 "NULL_NODE",
168                 "AND_JOIN_NODE",
169                 "OR_JOIN_NODE",
170                 "AND_JOIN_AUTOMATIC_NODE",
171                 "OR_JOIN_AUTOMATIC_NODE",
172                 "SUB_PROCESS_NODE",
173                 };
174
175         // Operations
176

177         public static final int START = 0;
178         public static final int TERMINATE = 1;
179         public static final int SUSPEND = 2;
180         public static final int RESUME = 3;
181         public static final int EDGEINITIAL = 4;
182         public static final int ANTACTIVE = 5;
183         public static final int ACTIVE = 6;
184         public static final int CANCEL = 7;
185
186         public static final String JavaDoc[] operationName =
187             {
188                 "START",
189                 "TERMINATE",
190                 "SUSPEND",
191                 "RESUME",
192                 "EDGEINITIAL",
193                 "ANTACTIVE",
194                 "ACTIVE",
195                 "CANCEL" };
196
197         // Events
198
public static final String JavaDoc BEFORESTART = "beforeStart";
199         public static final String JavaDoc AFTERSTART = "afterStart";
200         public static final String JavaDoc BEFORETERMINATE = "beforeTerminate";
201         public static final String JavaDoc AFTERTERMINATE = "afterTerminate";
202         public static final String JavaDoc ONCANCEL = "onCancel";
203         public static final String JavaDoc ANTICIPATE = "anticipate";
204         public static final String JavaDoc ONDEADLINE = "onDeadline";
205         public static final String JavaDoc ONREADY = "onReady";
206
207         // Operations mode
208

209         public static final int AUTOMATIC = 0;
210         public static final int NO_AUTOMATIC = 1;
211
212         public static final String JavaDoc[] operationMode =
213             { "AUTOMATIC", "NO_AUTOMATIC" };
214
215         // BnNode property
216
public static final int TRADITIONAL = 0;
217         public static final int FLEXIBLE = 1;
218
219         public static final String JavaDoc[] executionMode =
220             { "TRADITIONAL", "FLEXIBLE" };
221     }
222
223     public static int[][] edgeTransition = {
224         {
225         Ed.DEAD, // DEAD
226
Ed.DEAD, // DEAD
227
Ed.DEAD, // DEAD
228
Ed.DEAD, // DEAD
229
Ed.DEAD, // DEAD
230
Ed.DEAD, // DEAD
231
Ed.DEAD, // DEAD
232
Ed.DEAD, // DEAD
233
Ed.DEAD, // DEAD
234
Ed.DEAD, // DEAD
235
Ed.DEAD, // DEAD
236
Ed.DEAD, // DEAD
237
Ed.DEAD, // DEAD
238
Ed.DEAD, // DEAD
239
},{
240         Ed.INITIAL, //INITIAL
241
Ed.INITIAL, // READY
242
Ed.DEAD, // DEAD
243
Ed.INITIAL, //ANTICIPABLE
244
Ed.DEAD, // EXPIRED
245
Ed.ANTICIPATING, // ANTICIPATING
246
Ed.ANTICIPATING, // EXECUTING
247
Ed.ACTIVE, // EXECUTED
248
Ed.DEAD, // INERROR
249
Ed.ACTIVE, // FINISHED
250
Ed.ACTIVE, // TERMINATED
251
Ed.ACTIVE, // CHECKEDOUT
252
Ed.ANTICIPATING, // ANT SUSPENDED
253
Ed.ANTICIPATING, // EXEC_SUSPENDED
254
}
255     };
256     public static final String JavaDoc AFTERSTART = "import hero.interfaces.*;\n"
257                                                                 + "import hero.interfaces.BnNodeLocal;\n"
258                                                                 + "afterStart (Object b,Object n) {\n\n\n"
259                                                                 + "}";
260     
261     public static final String JavaDoc BEFORESTART = "import hero.interfaces.*;\n"
262                                                                 + "import hero.interfaces.BnNodeLocal;\n"
263                                                                 + "beforeStart (Object b,Object n) {\n\n\n"
264                                                                 + "}";
265
266     public static final String JavaDoc AFTERTERMINATE = "import hero.interfaces.*;\n"
267                                                                 + "import hero.interfaces.BnNodeLocal;\n"
268                                                                 + "afterTerminate (Object b,Object n) {\n\n\n"
269                                                                 + "}";
270
271     public static final String JavaDoc BEFORETERMINATE = "import hero.interfaces.*;\n"
272                                                                 + "import hero.interfaces.BnNodeLocal;\n"
273                                                                 + "beforeTerminate (Object b,Object n) {\n\n\n"
274                                                                 + "}";
275
276     public static final String JavaDoc ONCANCEL = "import hero.interfaces.*;\n"
277                                                                 + "import hero.interfaces.BnNodeLocal;\n"
278                                                                 + "onCancel (Object b,Object n) {\n\n\n"
279                                                                 + "}";
280
281     public static final String JavaDoc ANTICIPATE = "import hero.interfaces.*;\n"
282                                                                 + "import hero.interfaces.BnNodeLocal;\n"
283                                                                 + "anticipate (Object b,Object n) {\n\n\n"
284                                                                 + "}";
285     
286     public static final String JavaDoc ONDEADLINE = "import hero.interfaces.*;\n"
287         + "import hero.interfaces.BnNodeLocal;\n"
288         + "onDeadline (Object b,Object n) {\n\n\n"
289         + "}";
290     
291     public static final String JavaDoc ONREADY = "import hero.interfaces.*;\n"
292         + "import hero.interfaces.BnNodeLocal;\n"
293         + "onReady (Object b,Object n) {\n\n\n"
294         + "}";
295 }
296
Free Books   Free Magazines  
Popular Tags