1 package org.webdocwf.util.loader;
2
3
4 /***
5 ReturnCode - If some element of loadjobs fails, the java.exe has to return
6 a ReturnCode to the environment.
7
8 Copyright (C) 2002-2003 Together
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
24 ReturnCode.java
25 Date: 01.03.2003.
26 Author: Milosevic Sinisa sinisa@prozone.co.yu
27 @version 1.0.0
28 */
29
30
31 /***
32 ReturnCode - If some element of loadjobs fails, the java.exe has to return
33 a ReturnCode to the environment.
34 */
35 public class ReturnCode {
36
37 private static int returnError=1;
38 private static int defaultReturnError=1;
39 private static int returnOK=0;
40 public static boolean isParameter=false;
41
42
43 /***
44 * Read return code for normal end of java program
45 * @return int return code
46 */
47 public static int getOKReturnCode() {
48 return returnOK;
49 }
50
51
52 /***
53 * Set return code for normal end of program.
54 * @param int new value of return code.
55 */
56 public static void setOKReturnCode(int code) {
57 returnOK=code;
58 }
59
60
61 /***
62 * Read current error return code
63 * @return int return code
64 */
65 public static int getErrorReturnCode() {
66 return returnError;
67 }
68
69
70 /***
71 * Set current error return code.
72 * @param int new value of return code.
73 */
74 public static void setErrorReturnCode(int code) {
75 returnError=code;
76 }
77
78
79 /***
80 * Read default error return code
81 * @return int return code
82 */
83 public static int getDefaultErrorReturnCode() {
84 return defaultReturnError;
85 }
86
87
88 /***
89 * Set default error return code.
90 * @param int new value of default return code.
91 */
92 public static void setDefaultErrorReturnCode(int code) {
93 defaultReturnError=code;
94 }
95
96 }
This page automatically generated by Maven