pluginClassByName.put(shortName, className);
// UI snippet path allows the plugin to inject user interface fragments to the alert pages
String uiSnippetPath = null;
URL uiSnippetUrl = null;
CustomUi customUI = type.getCustomUi();
if (customUI != null) {
uiSnippetPath = customUI.getUiSnippetName();
try {
uiSnippetUrl = env.getPluginClassLoader().getResource(uiSnippetPath);
if (uiSnippetUrl == null) {
throw new Exception("plugin is missing alert ui snippet named [" + uiSnippetPath + "]");
}
log.debug("Alert plugin UI snippet for [" + shortName + "] is at: " + uiSnippetUrl);
} catch (Exception e) {
log.error("Invalid alert UI snippet provided inside <custom-ui> for alert plugin [" + shortName
+ "]. Plugin will be ignored. Cause: " + ThrowableUtil.getAllMessages(e));
throw e;
}
className = customUI.getBackingBeanClass();
try {
loadPluginClass(env, className, true); // TODO how make this available to Seam and the Web-CL ?
backingBeanByName.put(shortName, className);
} catch (Throwable t) {
String errMsg = "Backing bean [" + className + "] not found for plugin [" + shortName + ']';
log.error(errMsg);
throw new Exception(errMsg, t);
}
String beanName = customUI.getBackingBeanName();
// Default to <backing-bean-class> value if name is not provided
if (beanName == null || beanName.length() == 0) {
beanName = className;
}