001: /*
002: * (C) Copyright 2003 Nabh Information Systems, Inc.
003: *
004: * All copyright notices regarding Nabh's products MUST remain
005: * intact in the scripts and in the outputted HTML.
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public License
008: * as published by the Free Software Foundation; either version 2.1
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package com.nabhinc.core;
023:
024: /**
025: * Defines generic constants.
026: *
027: * @author Padmanabh Dabke
028: * (c) 2001 Nabh Information Systems, Inc. All Rights Reserved.
029: */
030: public abstract class Constants {
031:
032: /**
033: * Administrator role. All access is allowed to the
034: * administrator role.
035: */
036: public static String ADMIN_ROLE = "sb-admin";
037:
038: /**
039: * Represents a set of all users allowed to access a Web app.
040: */
041: public static String USER_ROLE = "sb-user";
042:
043: /**
044: * Index number of the USER_ROLE
045: */
046: public static int USER_ROLE_ID = 1;
047:
048: /**
049: * Author role. This role is allowed to create
050: * processes and beans in the catalog.
051: */
052: public static String AUTHOR_ROLE = "sb-author";
053:
054: /**
055: * This role is allowed to
056: * and execute processes.
057: */
058: public static String RUNNER_ROLE = "sb-runner";
059:
060: /**
061: * Constant indicating passive state. Used by net.nabh.remote.RemoteService
062: * and net.nabh.process.engine.Operation.
063: */
064: public static final int STATE_PASSIVE = 0;
065:
066: /**
067: * Constant indicating running state. Used by net.nabh.remote.RemoteService
068: * and net.nabh.process.engine.Operation.
069: */
070: public static final int STATE_RUNNING = 1;
071:
072: /**
073: * Constant indicating paused state. Used by net.nabh.remote.RemoteService
074: * and net.nabh.process.engine.Operation.
075: */
076: public static final int STATE_PAUSED = 2;
077:
078: /**
079: * Constant indicating shutdown state. Used by net.nabh.remote.RemoteService
080: * and net.nabh.process.engine.Operation.
081: */
082: public static final int STATE_DEAD = 3;
083:
084: /**
085: * Constant indicating error state. Used by net.nabh.remote.RemoteService
086: * and net.nabh.process.engine.Operation.
087: */
088: public static final int STATE_ERROR = 4;
089:
090: /**
091: * Number of characters in a VARCHAR field that is a primary key.
092: */
093: public static int PRIMARY_KEY_FIELD_LENGTH = 30;
094:
095: /**
096: * Number of characters in a VARCHAR field used to store user names, etc.
097: */
098: public static int NAME_FIELD_LENGTH = 50;
099:
100: /**
101: * Number of characters in a VARCHAR field used to store news headlines,
102: * email subjects, etc.
103: */
104: public static int DESCR_FIELD_LENGTH = 100;
105:
106: /**
107: * Number of characters in a VARCHAR field used to store one page
108: * text. E.g., meeting notes.
109: */
110: public static int MEMO_FIELD_LENGTH = 4000;
111:
112: /**
113: * Number of characters in a VARCHAR field used to store (user) ID.
114: */
115: public static int ID_FIELD_LENGTH = 30;
116:
117: /**
118: * Number of characters in VARCHAR fields used to store mini-memos like
119: * a user signature.
120: */
121: public static int SHORT_MEMO_LENGTH = 255;
122:
123: /**
124: * Read Access
125: */
126: public static final int READ_ACCESS = 0;
127:
128: /**
129: * Write Access
130: */
131: public static final int WRITE_ACCESS = 1;
132:
133: /**
134: * Execute Access
135: */
136: public static final int EXECUTE_ACCESS = 2;
137:
138: /**
139: * Access to delete a resource
140: */
141: public static final int DELETE_ACCESS = 3;
142:
143: /**
144: * Password field minimum length
145: */
146: public static int PASSWORD_MIN_LENGTH = 4;
147:
148: /**
149: * Password field maximum length
150: */
151: public static int PASSWORD_MAX_LENGTH = 20;
152:
153: /**
154: * Text field maximum length
155: */
156: public static int TEXT_FIELD_MAX_LENGTH = 255;
157:
158: /**
159: * Parameter name indicates the form is submitted
160: */
161: public static final String FORM_SUBMIT_PARAMETER = "is_submit";
162: }
|