01: /*
02: * Project: AMODA - Abstract Modeled Application
03: * Class: de.gulden.framework.amoda.model.core.Application
04: * Version: snapshot-beautyj-1.1
05: *
06: * Date: 2004-09-29
07: *
08: * This is a snapshot version of the AMODA 0.2 development branch,
09: * it is not released as a seperate version.
10: * For AMODA, see http://amoda.berlios.de/.
11: *
12: * This is licensed under the GNU Lesser General Public License (LGPL)
13: * and comes with NO WARRANTY.
14: *
15: * Author: Jens Gulden
16: * Email: amoda@jensgulden.de
17: */
18:
19: package de.gulden.framework.amoda.model.core;
20:
21: import de.gulden.framework.amoda.model.behaviour.*;
22: import de.gulden.framework.amoda.model.behaviour.event.*;
23: import de.gulden.framework.amoda.model.metadata.*;
24: import de.gulden.framework.amoda.model.option.*;
25: import java.lang.*;
26: import java.util.*;
27:
28: /**
29: * Class Application.
30: *
31: * @author Jens Gulden
32: * @version snapshot-beautyj-1.1
33: */
34: public interface Application extends ApplicationModule {
35:
36: // ------------------------------------------------------------------------
37: // --- methods ---
38: // ------------------------------------------------------------------------
39:
40: public void init(ApplicationEnvironment environment);
41:
42: public ApplicationEnvironment getEnvironment();
43:
44: /**
45: *
46: * @return the application's Workspace, or null if the application
47: * environment does not provide a workspace (e.g. when running in a
48: * CommandLineApplicationEnvironment)
49: */
50: public Workspace getWorkspace();
51:
52: public void message(String text);
53:
54: public void error(String text, Throwable throwable);
55:
56: public void fatalError(String text, Throwable throwable);
57:
58: public void log(String text, Object source);
59:
60: public boolean confirm(String text);
61:
62: public String question(String text, String answers);
63:
64: public void error(String text);
65:
66: public void log(String text);
67:
68: public void status(String text);
69:
70: public void error(Throwable throwable);
71:
72: public boolean isVerbose();
73:
74: public boolean isQuiet();
75:
76: public void exit();
77:
78: public void addApplicationListener(ApplicationListener l);
79:
80: public void removeApplicationListener(ApplicationListener l);
81:
82: public Collection getApplicationListeners();
83:
84: } // end Application
|