1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package net.sf.hermesftp.common;
26
27 /***
28 * General constants of the application.
29 *
30 * @author Lars Behnke
31 */
32 public interface FtpConstants {
33
34
35
36 /*** The key for customized good bye message. */
37 public static final String OPT_MSG_GOODBYE = "msg.goodbye";
38
39 /*** The key for customized welcome message. */
40 public static final String OPT_MSG_WELCOME = "msg.welcome";
41
42 /*** The key for data buffer size. */
43 public static final String OPT_BUFFER_SIZE = "buffer.size";
44
45 /*** The key for data maximum idle seconds until the session times out. */
46 public static final String OPT_MAX_IDLE_SECONDS = "max.idle.seconds";
47
48 /*** The key for the flag indicating unix/windows emulation. */
49 public static final String OPT_EMULATE_UNIX = "emulate.unix";
50
51 /*** The key for the client connection limit. */
52 public static final String OPT_MAX_CONNECTIONS = "max.connections";
53
54 /*** The key for the default remote directory. */
55 public static final String OPT_REMOTE_DIR = "ftp.root.dir";
56
57 /*** The key for the allowed passive ports. */
58 public static final String OPT_ALLOWED_PASSIVE_PORTS = "allowed.passive.ports";
59
60 /*** The key for the black list of ip v4 addresses. */
61 public static final String OPT_IPV4_BLACK_LIST = "ipv4.black.list";
62
63 /*** The key for the black list of ip v4 addresses. */
64 public static final String OPT_IPV6_BLACK_LIST = "ipv6.black.list";
65
66 /*** The key for the global maximum upload rate in KB/s. */
67 public static final String OPT_MAX_UPLOAD_RATE = "max.upload.rate";
68
69 /*** The key for the global maximum download rate in KB/s. */
70 public static final String OPT_MAX_DOWNLOAD_RATE = "max.download.rate";
71
72 /*** The key for the FTP port to be used (21 is default). */
73 public static final String OPT_FTP_PORT = "ftp.port";
74
75 /*** The key for the flag indicating forced SSL. */
76 public static final String OPT_SSL_FORCE = "ssl.force";
77
78 /*** The key for key store file. */
79 public static final String OPT_SSL_KEYSTORE_FILE = "ssl.keystore.file";
80
81 /*** The key for keystore password. */
82 public static final String OPT_SSL_KEYSTORE_PASS = "ssl.keystore.password";
83
84 /*** The key for a flag enabling explicit SSL. */
85 public static final String OPT_SSL_ALLOW_EXPLICIT = "ssl.allow.explicit";
86
87 /*** The key for a flag enabling implicit SSL. */
88 public static final String OPT_SSL_ALLOW_IMPLICIT = "ssl.allow.implicit";
89
90 /*** The key for port to be used is implicit SSL mode (default is 990). */
91 public static final String OPT_SSL_PORT_IMPLICIT = "ssl.port.implicit";
92
93 /*** The key for supported SSL cipher suites. "*" for all supported by system. */
94 public static final String OPT_SSL_CIPHER_SUITES = "ssl.cipher.suites";
95
96 /*** The EBCDIC character set to use. */
97 public static final String OPT_CHARSET_EBCDIC = "charset.ebcdic";
98
99 /*** The ASCII/ANSI character set to use. */
100 public static final String OPT_CHARSET_ASCII = "charset.ascii";
101
102
103
104 /*** Client name of a session (optionally transmitted to server). */
105 public static final String ATTR_CLIENT_NAME = "client_name";
106
107 /*** Name of the file currently renamed. */
108 public static final String ATTR_RENAME_FILE = "rename_file";
109
110 /*** Offset pointer of the transmitted file. */
111 public static final String ATTR_FILE_OFFSET = "file_offset";
112
113 /*** Time stamp of the user's authentication. */
114 public static final String ATTR_LOGIN_TIME = "login_time";
115
116 /*** Information about the authenticated user. */
117 public static final String ATTR_USER_DATA = "user_data";
118
119 /*** Information about the groups the authenticated belongs to. */
120 public static final String ATTR_GROUP_DATA = "group_data";
121
122 /*** Name of the file currently renamed. */
123 public static final String ATTR_SSL = "ssl";
124
125 /*** Data protection flag. */
126 public static final String ATTR_DATA_PROT = "data_protection";
127
128 /*** Boolean flag that enforces that output data is encoded in UTF-8 (as required by IE). */
129 public static final String ATTR_FORCE_UTF8 = "force_utf8";
130
131 /*** Container for the restart markers. */
132 public static final String ATTR_RESTART_MARKERS = "restart_markers";
133
134
135
136 /*** Konfiguration of the Spring application context. */
137 public static final String DEFAULT_BEAN_RES = "hermesftp-ctx.xml";
138
139 /*** Environment property key that points to the application's home directory. * */
140 public static final String HERMES_HOME = "HERMES_HOME";
141
142 /*** Default key store password. */
143 public static final String DEFAULT_KEYSTORE_PASS = "secret";
144
145 /*** Default key store resource file. */
146 public static final String DEFAULT_KEYSTORE = "/keystore";
147
148 /*** All supported data types. */
149 public static final String[] TYPE_NAMES = new String[] {"ASCII", "EBCDIC", "BINARY"};
150
151
152
153 /*** ASCII data type. */
154 public static final int DT_ASCII = 0;
155
156 /*** EBCDIX data type. */
157 public static final int DT_EBCDIC = 1;
158
159 /*** Binary data type. */
160 public static final int DT_BINARY = 2;
161
162
163
164 /*** Stream mode. */
165 public static final int MODE_STREAM = 0;
166
167 /*** Block mode. */
168 public static final int MODE_BLOCK = 1;
169
170 /*** Compressed mode. */
171 public static final int MODE_COMPRESS = 2;
172
173 /*** Zlib mode. */
174 public static final int MODE_ZIP = 3;
175
176
177
178 /*** Files based structure. */
179 public static final int STRUCT_FILE = 0;
180
181 /*** Record based structure (Mainframes). */
182 public static final int STRUCT_RECORD = 1;
183
184
185
186 /*** Default text separator. */
187 public static final String SEPARATOR = ",";
188
189 /*** Space. */
190 public static final String SPACE = " ";
191
192 /*** Wildcard. */
193 public static final String WILDCARD = "*";
194
195 /*** Masks a byte. */
196 public static final int BYTE_MASK = 0xff;
197
198 /*** Byte size. */
199 public static final int BYTE_LENGTH = 8;
200
201 /*** Number of milliseconds in a second. */
202 public static final int MILLI = 1000;
203
204
205
206 /*** No access allowed on a particular path. */
207 public static final int PRIV_NONE = 0;
208
209 /*** Read access allowed on a particular path. */
210 public static final int PRIV_READ = 1;
211
212 /*** Write access allowed on a particular path. */
213 public static final int PRIV_WRITE = 2;
214
215 /*** Read/Write access allowed on a particular path. */
216 public static final int PRIV_READ_WRITE = 3;
217
218
219
220 /*** Server has not been initialized. */
221 public static final int SERVER_STATUS_UNDEF = 0;
222
223 /*** Server is being initialized. */
224 public static final int SERVER_STATUS_INIT = 1;
225
226 /*** Server is ready to accept connections. */
227 public static final int SERVER_STATUS_READY = 2;
228
229 /*** Server was halted. */
230 public static final int SERVER_STATUS_HALTED = 3;
231
232
233
234 /*** Uploaded bytes limit. */
235 public static final String STAT_BYTES_UPLOADED = "Bytes uploaded";
236
237 /*** Uploaded file limit. */
238 public static final String STAT_FILES_UPLOADED = "Files uploaded";
239
240 /*** Downloaded bytes limit. */
241 public static final String STAT_BYTES_DOWNLOADED = "Bytes downloaded";
242
243 /*** Downloaded file limit. */
244 public static final String STAT_FILES_DOWNLOADED = "Files downloaded";
245
246 /*** Download rate (KB/s) limit. */
247 public static final String STAT_DOWNLOAD_RATE = "Download rate";
248
249 /*** Upload rate (KB/s) limit. */
250 public static final String STAT_UPLOAD_RATE = "Upload rate";
251
252
253
254 /*** FTP response message 150. */
255 public static final String MSG150 = "msg150";
256
257 /*** FTP response message 200. */
258 public static final String MSG200 = "msg200";
259
260 /*** FTP response message 200 (PBSZ). */
261 public static final String MSG200_PBSZ = "msg200_pbsz";
262
263 /*** FTP response message 200 (size). */
264 public static final String MSG200_SIZE = "msg200_size";
265
266 /*** FTP response message 200. */
267 public static final String MSG200_NOTED = "msg200_noted";
268
269 /*** FTP response message 202. */
270 public static final String MSG202 = "msg202";
271
272 /*** FTP response message 200. */
273 public static final String MSG200_TYPE = "msg200_type";
274
275 /*** FTP response message 211 header. */
276 public static final String MSG211_FEAT_HEADER = "msg211_feat_header";
277
278 /*** FTP response message 211 entry. */
279 public static final String MSG211_FEAT_ENTRY = "msg211_feat_entry";
280
281 /*** FTP response message 211 footer. */
282 public static final String MSG211_FEAT_FOOTER = "msg211_feat_footer";
283
284 /*** FTP response message 211. */
285 public static final String MSG211_STAT = "msg211_stat";
286
287 /*** FTP response message 213 (file size). */
288 public static final String MSG213_SIZE = "msg213_size";
289
290 /*** FTP response message 213 (file size). */
291 public static final String MSG213_TIME = "msg213_time";
292
293 /*** FTP response message 214. */
294 public static final String MSG214 = "msg214";
295
296 /*** FTP response message 220 (welcome text). */
297 public static final String MSG220_WEL = "msg220_wel";
298
299 /*** FTP response message 220. */
300 public static final String MSG220 = "msg220";
301
302 /*** FTP response message 226. */
303 public static final String MSG226 = "msg226";
304
305 /*** FTP response message 227. */
306 public static final String MSG227 = "msg227";
307
308 /*** FTP response message 229. */
309 public static final String MSG229 = "msg229";
310
311 /*** FTP response message 230. */
312 public static final String MSG230 = "msg230";
313
314 /*** FTP response message 234. */
315 public static final String MSG234 = "msg234";
316
317 /*** FTP response message 250. */
318 public static final String MSG250 = "msg250";
319
320 /*** FTP response message 257. */
321 public static final String MSG257 = "msg257";
322
323 /*** FTP response message 331. */
324 public static final String MSG331 = "msg331";
325
326 /*** FTP response message 350. */
327 public static final String MSG350 = "msg350";
328
329 /*** FTP response message 350. */
330 public static final String MSG350_REST = "msg350_rest";
331
332 /*** FTP response message 421 (Timeout). */
333 public static final String MSG421 = "msg421";
334
335 /*** FTP response message 425. */
336 public static final String MSG425 = "msg425";
337
338 /*** FTP response message 426. */
339 public static final String MSG426 = "msg426";
340
341 /*** FTP response message 431. */
342 public static final String MSG431 = "msg431";
343
344 /*** FTP response message 450. */
345 public static final String MSG450 = "msg450";
346
347 /*** FTP response message 451. */
348 public static final String MSG451 = "msg451";
349
350 /*** FTP response message 500. */
351 public static final String MSG500 = "msg500";
352
353 /*** FTP response message 500. */
354 public static final String MSG500_CMD = "msg500_cmd";
355
356 /*** FTP response message 501. */
357 public static final String MSG501 = "msg501";
358
359 /*** FTP response message 501. */
360 public static final String MSG501_PATH = "msg501_path";
361
362 /*** FTP response message 501. */
363 public static final String MSG501_SIZE = "msg501_size";
364
365 /*** FTP response message 503. */
366 public static final String MSG503 = "msg503";
367
368 /*** FTP response message 503. */
369 public static final String MSG503_USR = "msg503_usr";
370
371 /*** FTP response message 504. */
372 public static final String MSG504 = "msg504";
373
374 /*** FTP response message 530. */
375 public static final String MSG530 = "msg530";
376
377 /*** FTP response message 522. */
378 public static final String MSG522 = "msg522";
379
380 /*** FTP response message 530. */
381 public static final String MSG530_AUTH = "msg530_auth";
382
383 /*** FTP response message 534. */
384 public static final String MSG534 = "msg534";
385
386 /*** FTP response message 536. */
387 public static final String MSG536 = "msg536";
388
389 /*** FTP response message 550. */
390 public static final String MSG550 = "msg550";
391
392 /*** FTP response message 550 (customizable message). */
393 public static final String MSG550_MSG = "msg550_msg";
394
395 /*** FTP response message 550. */
396 public static final String MSG550_NOTEMPTY = "msg550_notempty";
397
398 /*** FTP response message 550. */
399 public static final String MSG550_EXISTS = "msg550_exists";
400
401 /*** FTP response message 550. */
402 public static final String MSG550_COMM = "msg550_comm";
403
404 /*** FTP response message 550. */
405 public static final String MSG550_PERM = "msg550_perm";
406
407 /*** FTP response message 553. */
408 public static final String MSG553 = "msg553";
409
410 /*** Resource: Print working directory. */
411 public static final String PWD = "pwd";
412
413 /*** Resource: goodbye message. */
414 public static final String MSG_GOODBYE = "msg.goodbye.default";
415
416 }