continue;
}
ShareProperties props = (ShareProperties) shareModDefinition.getProperties();
try {
ShareDefinition shareDefinition = props.createShareDefinition(shareConfig);
shareDefinition.setOrigin(ShareDefinition.ORIGIN_WGACONFIG);
getLog().info("Initializing content share '" + shareConfig.getName() + "'");
shareDefinition.init(this);
newShares.put(shareConfig.getName(), shareDefinition);
}
catch (ShareInitException e) {
getLog().error("Unable to initialize content share '" + shareConfig.getName() + "' because of the following errors:");
Iterator msgs = e.getDetailMessages().iterator();
while (msgs.hasNext()) {
getLog().error("- " + msgs.next());
}
}
catch (Exception e) {
getLog().error("Exception initializing content share '" + shareConfig.getName() + "'", e);
}
}
// Add custom shares that were added to the previous share configs
if (_shares != null) {
Iterator<Map.Entry<String,ShareDefinition>> previousConfigs = _shares.entrySet().iterator();
while (previousConfigs.hasNext()) {
Map.Entry<String,ShareDefinition> shareEntry = previousConfigs.next();
ShareDefinition config = (ShareDefinition) shareEntry.getValue();
if (config.getOrigin() == ShareDefinition.ORIGIN_CUSTOM) {
newShares.put(shareEntry.getKey(), config);
}
}
}