Lines 1-7
Link Here
|
1 |
/* |
1 |
/* |
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 |
* |
3 |
* |
4 |
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved. |
4 |
* Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved. |
5 |
* |
5 |
* |
6 |
* Oracle and Java are registered trademarks of Oracle and/or its affiliates. |
6 |
* Oracle and Java are registered trademarks of Oracle and/or its affiliates. |
7 |
* Other names may be trademarks of their respective owners. |
7 |
* Other names may be trademarks of their respective owners. |
Lines 48-58
Link Here
|
48 |
import java.util.Locale; |
48 |
import java.util.Locale; |
49 |
import java.util.Set; |
49 |
import java.util.Set; |
50 |
import java.util.jar.Manifest; |
50 |
import java.util.jar.Manifest; |
|
|
51 |
import org.netbeans.modules.autoupdate.services.Trampoline; |
52 |
import org.netbeans.modules.autoupdate.updateprovider.FeatureItem; |
51 |
import org.netbeans.modules.autoupdate.updateprovider.LocalizationItem; |
53 |
import org.netbeans.modules.autoupdate.updateprovider.LocalizationItem; |
52 |
import org.netbeans.modules.autoupdate.updateprovider.FeatureItem; |
|
|
53 |
import org.netbeans.modules.autoupdate.updateprovider.ModuleItem; |
54 |
import org.netbeans.modules.autoupdate.updateprovider.ModuleItem; |
54 |
import org.netbeans.modules.autoupdate.updateprovider.NativeComponentItem; |
55 |
import org.netbeans.modules.autoupdate.updateprovider.NativeComponentItem; |
55 |
import org.netbeans.modules.autoupdate.services.Trampoline; |
|
|
56 |
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl; |
56 |
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl; |
57 |
|
57 |
|
58 |
/** Represents a item of content provider by <code>UpdateProvider</code>. These items are exposed to |
58 |
/** Represents a item of content provider by <code>UpdateProvider</code>. These items are exposed to |
Lines 69-74
Link Here
|
69 |
UpdateItem original; |
69 |
UpdateItem original; |
70 |
|
70 |
|
71 |
/** Creates a new instance of UpdateItem */ |
71 |
/** Creates a new instance of UpdateItem */ |
|
|
72 |
@SuppressWarnings("LeakingThisInConstructor") |
72 |
UpdateItem (UpdateItemImpl item) { |
73 |
UpdateItem (UpdateItemImpl item) { |
73 |
impl = item; |
74 |
impl = item; |
74 |
item.setUpdateItem (this); |
75 |
item.setUpdateItem (this); |
Lines 94-100
Link Here
|
94 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
95 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
95 |
* @return UpdateItem |
96 |
* @return UpdateItem |
96 |
*/ |
97 |
*/ |
97 |
public static final UpdateItem createModule ( |
98 |
public static UpdateItem createModule ( |
98 |
String codeName, |
99 |
String codeName, |
99 |
String specificationVersion, |
100 |
String specificationVersion, |
100 |
URL distribution, |
101 |
URL distribution, |
Lines 113-119
Link Here
|
113 |
ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, |
114 |
ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, |
114 |
author, publishDate, downloadSize, homepage, category, |
115 |
author, publishDate, downloadSize, homepage, category, |
115 |
manifest, isEager, isAutoload, |
116 |
manifest, isEager, isAutoload, |
116 |
needsRestart, isGlobal, targetCluster, license.impl); |
117 |
needsRestart, isGlobal, false, targetCluster, license.impl); |
|
|
118 |
return new UpdateItem (item); |
119 |
} |
120 |
|
121 |
/** Creates <code>UpdateItem/code> which represents NetBeans Module in Autoupdate infrastructure. |
122 |
* UpdateItem is identify by <code>codeName</code> and <code>specificationVersion<code>. |
123 |
* |
124 |
* @param codeName code name of module |
125 |
* @param specificationVersion specification version of module |
126 |
* @param distribution URL to NBM file |
127 |
* @param author name of module author or null |
128 |
* @param downloadSize size of NBM file in bytes |
129 |
* @param homepage homepage of module or null |
130 |
* @param publishDate date of publish of item, in date format "yyyy/MM/dd" |
131 |
* @param category name of category |
132 |
* @param manifest <code>java.util.jar.Manifest</code> describes the module in NetBeans module system |
133 |
* @param isEager says if the module is <code>eager</code> or not |
134 |
* @param isAutoload says if the module is <code>autoload</code> or not |
135 |
* @param needsRestart if true then IDE must be restarted after module installation |
136 |
* @param isGlobal control if the module will be installed into the installation directory or into user's dir |
137 |
* @param isPreferedUpdate if <code>true</code> will be handled in exclusive mode before other updates |
138 |
* @param targetCluster name of cluster where new module will be installed if installation isGlobal |
139 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
140 |
* @return UpdateItem |
141 |
* @since 1.33 |
142 |
*/ |
143 |
public static UpdateItem createModule ( |
144 |
String codeName, |
145 |
String specificationVersion, |
146 |
URL distribution, |
147 |
String author, |
148 |
String downloadSize, |
149 |
String homepage, |
150 |
String publishDate, |
151 |
String category, |
152 |
Manifest manifest, |
153 |
Boolean isEager, |
154 |
Boolean isAutoload, |
155 |
Boolean needsRestart, |
156 |
Boolean isGlobal, |
157 |
Boolean isPreferedUpdate, |
158 |
String targetCluster, |
159 |
UpdateLicense license) { |
160 |
ModuleItem item = new ModuleItem (codeName, specificationVersion, distribution, |
161 |
author, publishDate, downloadSize, homepage, category, |
162 |
manifest, isEager, isAutoload, |
163 |
needsRestart, isGlobal, isPreferedUpdate, targetCluster, license.impl); |
117 |
return new UpdateItem (item); |
164 |
return new UpdateItem (item); |
118 |
} |
165 |
} |
119 |
|
166 |
|
Lines 130-136
Link Here
|
130 |
* @param category name of category |
177 |
* @param category name of category |
131 |
* @return UpdateItem |
178 |
* @return UpdateItem |
132 |
*/ |
179 |
*/ |
133 |
public static final UpdateItem createFeature ( |
180 |
public static UpdateItem createFeature ( |
134 |
String codeName, |
181 |
String codeName, |
135 |
String specificationVersion, |
182 |
String specificationVersion, |
136 |
Set<String> dependencies, |
183 |
Set<String> dependencies, |
Lines 158-164
Link Here
|
158 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
205 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
159 |
* @return <code>UpdateItem</code> |
206 |
* @return <code>UpdateItem</code> |
160 |
*/ |
207 |
*/ |
161 |
public static final UpdateItem createNativeComponent ( |
208 |
public static UpdateItem createNativeComponent ( |
162 |
String codeName, |
209 |
String codeName, |
163 |
String specificationVersion, |
210 |
String specificationVersion, |
164 |
String downloadSize, |
211 |
String downloadSize, |
Lines 188-194
Link Here
|
188 |
* @param uninstaller <code>CustomUninstaller</code> call-back interface |
235 |
* @param uninstaller <code>CustomUninstaller</code> call-back interface |
189 |
* @return <code>UpdateItem</code> |
236 |
* @return <code>UpdateItem</code> |
190 |
*/ |
237 |
*/ |
191 |
public static final UpdateItem createInstalledNativeComponent ( |
238 |
public static UpdateItem createInstalledNativeComponent ( |
192 |
String codeName, |
239 |
String codeName, |
193 |
String specificationVersion, |
240 |
String specificationVersion, |
194 |
Set<String> dependencies, |
241 |
Set<String> dependencies, |
Lines 218-224
Link Here
|
218 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
265 |
* @param license <code>UpdateLicense</code> represents license name and text of license agreement |
219 |
* @return <code>UpdateItem</code> |
266 |
* @return <code>UpdateItem</code> |
220 |
*/ |
267 |
*/ |
221 |
public static final UpdateItem createLocalization ( |
268 |
public static UpdateItem createLocalization ( |
222 |
String codeName, |
269 |
String codeName, |
223 |
String specificationVersion, |
270 |
String specificationVersion, |
224 |
String moduleSpecificationVersion, |
271 |
String moduleSpecificationVersion, |