throw new Exception("No descriptor named " + ((ApplicationShortcut) resource).getApplication());
}
for (Iterator i = des.getParametersAndDefaults().entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
ApplicationParameterDefinition def = (ApplicationParameterDefinition) entry.getValue();
if (!def.isHidden()) {
try {
String value = (String) ((ApplicationShortcut) resource).getParameters().get(def.getName());
if (value == null) {
value = def.getDefaultValue();
}
ShortcutParameterItem item = new ShortcutParameterItem(des, def, value, locale);
if (log.isDebugEnabled())
log.debug("Adding item " + item.getName());
parameterItems.add(item);
} catch (Exception e) {
log.warn("Failed to create shortcut parameter for " + def.getName()
+ ". Probably a problem with the extension descriptor.", e);
}
}
}
Collections.sort(parameterItems);