01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2003 Jonathan Halliday
08: *
09: * Licensed under the Apache License, Version 2.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.apache.org/licenses/LICENSE-2.0
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: */
21:
22: package com.izforge.izpack.installer;
23:
24: import net.n3.nanoxml.XMLElement;
25:
26: /**
27: * Defines the Interface that must be implemented for running Panels in automated (or "silent",
28: * "headless") install mode.
29: *
30: * Implementing classes MUST NOT link against awt/swing classes. Thus the Panels cannot implement
31: * this interface directly, they should use e.g. helper classes instead.
32: *
33: * @see AutomatedInstaller
34: * @author Jonathan Halliday
35: * @author Julien Ponge
36: */
37: public interface PanelAutomation {
38:
39: /**
40: * Asks the panel to set its own XML data that can be brought back for an automated installation
41: * process. Use it as a blackbox if your panel needs to do something even in automated mode.
42: *
43: * @param installData The installation data
44: * @param panelRoot The XML root element of the panels blackbox tree.
45: */
46: public void makeXMLData(AutomatedInstallData installData,
47: XMLElement panelRoot);
48:
49: /**
50: * Makes the panel work in automated mode. Default is to do nothing, but any panel doing
51: * something 'effective' during the installation process should implement this method.
52: *
53: * @param installData The installation data
54: * @param panelRoot The XML root element of the panels blackbox tree.
55: *
56: * @return true if the automated work was performed successful, false if it failed critically.
57: */
58: public boolean runAutomated(AutomatedInstallData installData,
59: XMLElement panelRoot);
60: }
|