Revision 33743 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/InstallerManager.java
InstallerManager.java | ||
---|---|---|
28 | 28 |
package org.gvsig.installer.lib.api; |
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 |
import java.text.MessageFormat; |
|
31 | 32 |
|
32 | 33 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageService; |
33 | 34 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
... | ... | |
87 | 88 |
*/ |
88 | 89 |
public interface InstallerManager extends Manager { |
89 | 90 |
|
91 |
/** |
|
92 |
* Package state default values. |
|
93 |
*/ |
|
90 | 94 |
public static interface STATE { |
91 | 95 |
|
92 |
public static final String DEVEL = "devel";
|
|
93 |
public static final String TESTING = "testing";
|
|
94 |
public static final String PILOT = "pilot";
|
|
95 |
public static final String PROTOTYPE = "prototype";
|
|
96 |
public static final String ALPHA = "alpha";
|
|
97 |
public static final String BETA = "beta";
|
|
98 |
public static final String RC = "RC";
|
|
99 |
public static final String FINAL = "final";
|
|
96 |
static final String DEVEL = "devel"; |
|
97 |
static final String TESTING = "testing"; |
|
98 |
static final String PILOT = "pilot"; |
|
99 |
static final String PROTOTYPE = "prototype"; |
|
100 |
static final String ALPHA = "alpha"; |
|
101 |
static final String BETA = "beta"; |
|
102 |
static final String RC = "RC"; |
|
103 |
static final String FINAL = "final"; |
|
100 | 104 |
} |
101 | 105 |
|
106 |
/** |
|
107 |
* Supported operating system default values. |
|
108 |
*/ |
|
102 | 109 |
public static interface OS { |
103 | 110 |
|
104 |
public static final String ALL = "all";
|
|
105 |
public static final String LINUX = "lin";
|
|
106 |
public static final String WINDOWS = "win";
|
|
107 |
public static final String OSX_10_4 = "osx_10_4";
|
|
108 |
public static final String OSX_10_5 = "osx_10_5";
|
|
109 |
public static final String OSX_10_6 = "osx_10_6";
|
|
111 |
static final String ALL = "all"; |
|
112 |
static final String LINUX = "lin"; |
|
113 |
static final String WINDOWS = "win"; |
|
114 |
static final String OSX_10_4 = "osx_10_4"; |
|
115 |
static final String OSX_10_5 = "osx_10_5"; |
|
116 |
static final String OSX_10_6 = "osx_10_6"; |
|
110 | 117 |
} |
111 | 118 |
|
119 |
/** |
|
120 |
* Supported architecture default values. |
|
121 |
*/ |
|
112 | 122 |
public static interface ARCH { |
113 | 123 |
|
114 |
public static final String ALL = "all";
|
|
115 |
public static final String X86 = "x86";
|
|
116 |
public static final String X86_64 = "x86_64";
|
|
124 |
static final String ALL = "all"; |
|
125 |
static final String X86 = "x86"; |
|
126 |
static final String X86_64 = "x86_64"; |
|
117 | 127 |
} |
118 | 128 |
|
129 |
/** |
|
130 |
* Supported Java virtual machine version default values. |
|
131 |
*/ |
|
119 | 132 |
public static interface JVM { |
120 | 133 |
|
121 |
public static final String J1_5 = "j1_5";
|
|
122 |
public static final String J1_6 = "j1_6";
|
|
134 |
static final String J1_5 = "j1_5"; |
|
135 |
static final String J1_6 = "j1_6"; |
|
123 | 136 |
} |
124 | 137 |
|
125 | 138 |
/** |
139 |
* Fields into the bundle file name message format. |
|
140 |
* |
|
141 |
* @see InstallerManager#getPackageBundleNameFormat() |
|
142 |
* @see InstallerManager#setPackageBundleNameFormat(String) |
|
143 |
*/ |
|
144 |
public static interface BUNDLE_FILE_NAME_FIELDS { |
|
145 |
|
|
146 |
static final int GVSIG_VERSION = 0; |
|
147 |
static final int NAME = 1; |
|
148 |
static final int VERSION = 2; |
|
149 |
static final int BUILD = 3; |
|
150 |
static final int STATE = 4; |
|
151 |
static final int OS = 5; |
|
152 |
static final int ARCH = 6; |
|
153 |
static final int JVM = 7; |
|
154 |
} |
|
155 |
|
|
156 |
/** |
|
126 | 157 |
* It registers a class that implements the service for the creation of |
127 | 158 |
* bundle that contains inside a package of type plugin. The registered |
128 | 159 |
* class |
... | ... | |
148 | 179 |
public MakePluginPackageService getMakePluginPackageService( |
149 | 180 |
File pluginsDirectory) throws MakePluginPackageServiceException; |
150 | 181 |
|
182 |
/** |
|
183 |
* Returns a list of package infos for the already installed plugins. |
|
184 |
* |
|
185 |
* @param pluginsDirectory |
|
186 |
* where to look for the installed plugins |
|
187 |
* @return the list of package infos for the already installed plugins |
|
188 |
* @throws MakePluginPackageServiceException |
|
189 |
* if there is an error loading |
|
190 |
* the information of the installed plugins |
|
191 |
*/ |
|
192 |
public PackageInfo[] getInstalledPackages(File pluginsDirectory) |
|
193 |
throws MakePluginPackageServiceException; |
|
194 |
|
|
195 |
/** |
|
196 |
* Returns the package bundle file name format. |
|
197 |
* <p> |
|
198 |
* The string has to use a suitable {@link MessageFormat} format, and the |
|
199 |
* available field numbers are the ones defined in the |
|
200 |
* BUNDLE_FILE_NAME_FIELDS interface. |
|
201 |
* </p> |
|
202 |
* |
|
203 |
* @return the package bundle file name format. |
|
204 |
*/ |
|
151 | 205 |
public String getPackageBundleNameFormat(); |
152 | 206 |
|
207 |
/** |
|
208 |
* Sets the package bundle file name format. |
|
209 |
* |
|
210 |
* @see InstallerManager#getPackageBundleNameFormat() |
|
211 |
* @param packageBundleNameFormat |
|
212 |
* the package bundle file name format. |
|
213 |
*/ |
|
153 | 214 |
public void setPackageBundleNameFormat(String packageBundleNameFormat); |
154 | 215 |
|
216 |
/** |
|
217 |
* Returns the name of the package bundle file for a given package info. |
|
218 |
* |
|
219 |
* @param info |
|
220 |
* of the plugin |
|
221 |
* @return the name of the package bundle file |
|
222 |
*/ |
|
155 | 223 |
public String getPackageBundleFileName(PackageInfo info); |
156 | 224 |
|
157 | 225 |
/** |
Also available in: Unified diff