KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > installer > PanelAutomation


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/
5  * http://developer.berlios.de/projects/izpack/
6  *
7  * Copyright 2003 Jonathan Halliday
8  *
9  * 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     /**
41      * Asks the panel to set its own XML data that can be brought back for an automated installation
42      * process. Use it as a blackbox if your panel needs to do something even in automated mode.
43      *
44      * @param installData The installation data
45      * @param panelRoot The XML root element of the panels blackbox tree.
46      */

47     public void makeXMLData(AutomatedInstallData installData, 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, XMLElement panelRoot);
59 }
60
Popular Tags