01: package net.firstpartners.nounit.ui.common;
02:
03: /**
04: * Title: NoUnit - Identify Classes that are not being unit Tested
05: *
06: * Copyright (C) 2001 Paul Browne , FirstPartners.net
07: *
08: *
09: * This program is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU General Public License
11: * as published by the Free Software Foundation; either version 2
12: * of the License, or (at your option) any later version.
13: *
14: * This program is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: * GNU General Public License for more details.
18: *
19: * You should have received a copy of the GNU General Public License
20: * along with this program; if not, write to the Free Software
21: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22: *
23: * @author Paul Browne
24: * @version 0.7
25: */
26:
27: /**
28: * Holds all the relevant information from Command Line / Gui so that the
29: * bulk of the system does not have to use these objects. <BR>
30: * Enables system to be developed and run independently as Command_line,
31: * Gui , Web Server etc<BR>
32: * The naming convention is that any constant beginning with "KEY..."
33: */
34: public class CommandPackage extends AbstractPackage {
35:
36: /**
37: * Start directory (Base Directory of Project)
38: */
39: public static final String START_DIR = "start_dir";
40:
41: /**
42: * Output directory
43: */
44: public static final String OUTPUT_DIR = "output_dir";
45:
46: /**
47: * Report Class
48: */
49: public static final String REPORT_CLASS = "report_class";
50:
51: /**
52: * Message to be shown to the user
53: */
54: public static final String USER_MESSAGE = "user_message";
55:
56: public static final String XML_OUTPUT_NAME = "xml_output_name";
57:
58: /**
59: * Default constructor
60: */
61: public CommandPackage() {
62: super ();
63: }
64:
65: /**
66: * Constructor that adds an Array of Value pairs , after initialising with defaults.
67: * <BR> Package Level Access - Factory method in this package should call!!
68: * @param inValues - Array to add to Value pairs e.g. key1 , value1, key2 , value2
69: * @exception NoUnitException if Values are incompatible with what needs to be stored
70: */
71:
72: public CommandPackage(String[] inValues) {
73: //Create the new Internal Store etc by calling default constructor
74: this ();
75:
76: //Call the addvalues method
77: this .addValues(inValues);
78: }
79:
80: /**
81: * Overridden toString function to provide summary of info held in this class
82: *
83: * @return String description of internal values
84: */
85: public String toString() {
86:
87: //Get parent's String
88: StringBuffer stringBuffer = new StringBuffer(super .toString());
89: stringBuffer.append("\n");
90:
91: //Add Values Specific to this Class
92:
93: //Convert and return
94: return stringBuffer.toString();
95: }
96:
97: }
|