KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > event > NativeInstallerListener


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 2004 Klaus Bartz
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.event;
23
24 import com.izforge.izpack.installer.AutomatedInstallData;
25 import com.izforge.izpack.util.AbstractUIProgressHandler;
26 import com.izforge.izpack.util.os.WrappedNativeLibException;
27
28 /**
29  * This class implements some methods which are needed by installer custom actions with native
30  * parts.
31  *
32  * @author Klaus Bartz
33  *
34  */

35 public class NativeInstallerListener extends SimpleInstallerListener
36 {
37
38     /**
39      * Default constructor
40      */

41     public NativeInstallerListener()
42     {
43         super();
44     }
45
46     /**
47      * Constructs a native installer listener. If useSpecHelper is true, a specification helper will
48      * be created.
49      *
50      * @param useSpecHelper
51      *
52      */

53     public NativeInstallerListener(boolean useSpecHelper)
54     {
55         super(useSpecHelper);
56     }
57
58     /*
59      * (non-Javadoc)
60      *
61      * @see com.izforge.izpack.compiler.InstallerListener#beforePacks(com.izforge.izpack.installer.AutomatedInstallData,
62      * int, com.izforge.izpack.util.AbstractUIProgressHandler)
63      */

64     public void beforePacks(AutomatedInstallData idata, Integer JavaDoc npacks,
65             AbstractUIProgressHandler handler) throws Exception JavaDoc
66     {
67         super.beforePacks(idata, npacks, handler);
68
69         if (SimpleInstallerListener.langpack != null)
70         { // Initialize WrappedNativeLibException with the langpack for error messages.
71
WrappedNativeLibException.setLangpack(SimpleInstallerListener.langpack);
72         }
73
74     }
75
76 }
77
Popular Tags