|
Lines 31-37
Link Here
|
| 31 |
private String newPath; |
31 |
private String newPath; |
| 32 |
|
32 |
|
| 33 |
// for abort |
33 |
// for abort |
| 34 |
private List /* of SiteFilePluginContentConsumer */ |
34 |
private List /* of ContentConsumer */ |
| 35 |
contentConsumers; |
35 |
contentConsumers; |
| 36 |
private List /*of path as String */ |
36 |
private List /*of path as String */ |
| 37 |
installedFiles; |
37 |
installedFiles; |
|
Lines 77-88
Link Here
|
| 77 |
ContentConsumer cons; |
77 |
ContentConsumer cons; |
| 78 |
if(pluginEntry instanceof PluginEntryModel && !((PluginEntryModel)pluginEntry).isUnpack()){ |
78 |
if(pluginEntry instanceof PluginEntryModel && !((PluginEntryModel)pluginEntry).isUnpack()){ |
| 79 |
// plugin can run from a jar |
79 |
// plugin can run from a jar |
| 80 |
cons = new SiteFilePackedPluginContentConsumer(pluginEntry, getSite()); |
80 |
cons = new SiteFilePackedPluginContentConsumer(pluginEntry, getSite()); |
| 81 |
} else{ |
81 |
} else{ |
| 82 |
// plugin must be unpacked |
82 |
// plugin must be unpacked |
| 83 |
cons = new SiteFilePluginContentConsumer(pluginEntry, getSite()); |
83 |
cons = new SiteFilePluginContentConsumer(pluginEntry, getSite()); |
| 84 |
} |
84 |
} |
| 85 |
addContentConsumers(cons); |
85 |
addContentConsumer(cons); |
| 86 |
return cons; |
86 |
return cons; |
| 87 |
} |
87 |
} |
| 88 |
|
88 |
|
|
Lines 206-213
Link Here
|
| 206 |
if (contentConsumers != null) { |
206 |
if (contentConsumers != null) { |
| 207 |
Iterator iter = contentConsumers.iterator(); |
207 |
Iterator iter = contentConsumers.iterator(); |
| 208 |
while (iter.hasNext()) { |
208 |
while (iter.hasNext()) { |
| 209 |
SiteFilePluginContentConsumer element = (SiteFilePluginContentConsumer) iter.next(); |
209 |
Object element = iter.next(); |
| 210 |
element.abort(); |
210 |
if( element instanceof SiteFilePluginContentConsumer ) { |
|
|
211 |
SiteFilePluginContentConsumer cons = (SiteFilePluginContentConsumer) element; |
| 212 |
cons.abort(); |
| 213 |
} else if( element instanceof SiteFilePackedPluginContentConsumer ) { |
| 214 |
SiteFilePackedPluginContentConsumer cons = ( SiteFilePackedPluginContentConsumer )element; |
| 215 |
cons.abort(); |
| 216 |
} |
| 211 |
} |
217 |
} |
| 212 |
} |
218 |
} |
| 213 |
contentConsumers = null; |
219 |
contentConsumers = null; |
|
Lines 294-300
Link Here
|
| 294 |
/* |
300 |
/* |
| 295 |
* Adds a SiteFilePluginContentConsumer to the list |
301 |
* Adds a SiteFilePluginContentConsumer to the list |
| 296 |
*/ |
302 |
*/ |
| 297 |
private void addContentConsumers(ContentConsumer cons) { |
303 |
private void addContentConsumer(ContentConsumer cons) { |
| 298 |
if (contentConsumers == null) |
304 |
if (contentConsumers == null) |
| 299 |
contentConsumers = new ArrayList(); |
305 |
contentConsumers = new ArrayList(); |
| 300 |
contentConsumers.add(cons); |
306 |
contentConsumers.add(cons); |