source: trunk/gli/src/org/greenstone/gatherer/shell/GShellEvent.java@ 4364

Last change on this file since 4364 was 4364, checked in by mdewsnip, 21 years ago

Fixed tabbing.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/**
2 *#########################################################################
3 *
4 * A component of the Gatherer application, part of the Greenstone digital
5 * library suite from the New Zealand Digital Library Project at the
6 * University of Waikato, New Zealand.
7 *
8 * <BR><BR>
9 *
10 * Author: John Thompson, Greenstone Digital Library, University of Waikato
11 *
12 * <BR><BR>
13 *
14 * Copyright (C) 1999 New Zealand Digital Library Project
15 *
16 * <BR><BR>
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * <BR><BR>
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * <BR><BR>
31 *
32 * You should have received a copy of the GNU General Public License
33 * along with this program; if not, write to the Free Software
34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35 *########################################################################
36 */
37
38
39
40
41
42
43package org.greenstone.gatherer.shell;
44/** Title: The Gatherer<br>
45 * Description: The Gatherer: a tool for gathering and enriching digital collections.<br>
46 * Copyright: Copyright (c) 2001<br>
47 * Company: The University of Waikato<br>
48 * Written: / /01<br>
49 * Revised: 12/05/02 - Commented<br>
50 * 29/05/02 - Moved into correct package<br>
51 * @author John Thompson, Greenstone Digital Libraries
52 * @version 2.1 */
53import java.awt.AWTEvent;
54/** This class encapsulates all the information created by an event within a <strong>GShell</strong> process. */
55public class GShellEvent
56 extends AWTEvent {
57 /** The status of the process at the completion of event. */
58 private int status = -1;
59 /** The process type (such as COPY, BUILD or IMPORT). */
60 private int type = -1;
61 /** Any message associated with this event. */
62 private String message = null;
63 /* Constructor.
64 * @param source The <strong>GShell</strong> that fired this message.
65 * @param id The event identifier as an <strong>int</strong>.
66 * @param type The process type as an <strong>int</strong>.
67 * @param message A <strong>String</strong> representing any message attatched with this event.
68 * @param status The status of the process post event, as an <strong>int</strong>.
69 */
70 public GShellEvent(Object source, int id, int type, String message,
71 int status) {
72 super(source, id);
73 this.message = message;
74 this.status = status;
75 this.type = type;
76 }
77 /** Gets the message associated with this event.
78 * @return The message as a <strong>String</strong> or <i>null</i>.
79 */
80 public String getMessage() {
81 return message;
82 }
83 /** Gets the status associated with this event. This status can then be matched back to the constants in <strong>GShell</strong>.
84 * @return An <strong>int</strong> signifying the process status.
85 */
86 public int getStatus() {
87 return status;
88 }
89 /** Gets the type associated with this event. This type can then be matched back to the constants in <strong>GShell</strong>.
90 * @return An <strong>int</strong> signifying the process type.
91 */
92 public int getType() {
93 return type;
94 }
95
96 public String toString() {
97 return "org.greenstone.gatherer.shell.GShellEvent[" + message + "," + status + "," + type + "]";
98 }
99}
Note: See TracBrowser for help on using the repository browser.