01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.tp23.antinstaller.runtime;
17:
18: import org.tp23.antinstaller.InstallException;
19:
20: /**
21: *
22: * <p>A Runner runs the user interaction screens, not ant.
23: * The base interface for TextRunner and SwingRunner </p>
24: * <p>Instances of this interface should have a constructor that takes
25: * an InstallerContext as an argument</p>
26: * Due to historic bad naming convention there exists an AntRunner which has
27: * no connection to this interface.
28: * <p>Copyright: Copyright (c) 2004</p>
29: * <p>Company: tp23</p>
30: * @author Paul Hinds
31: * @version $Id: Runner.java,v 1.2 2006/03/24 18:27:28 teknopaul Exp $
32: */
33:
34: public interface Runner {
35:
36: /**
37: * Renders the installer screens. This method should block until
38: * the UI has finished
39: * @throws InstallException
40: * @return boolean false implies user aborted
41: */
42: public boolean runInstaller() throws InstallException;
43:
44: /**
45: * Called after Ant has finished so the Runner can clean up or provide feedback
46: */
47: public void antFinished();
48:
49: /**
50: * Called if the install failed for some reason and can not continue;
51: *
52: */
53: public void fatalError();
54: }
|