Package org.rhq.enterprise.server.xmlschema.generated.serverplugin.alert

Examples of org.rhq.enterprise.server.xmlschema.generated.serverplugin.alert.CustomUi


        // and store the info
        //

        String uiSnippetPath;
        String beanName;
        CustomUi customUI = type.getCustomUi();
        if (customUI != null) {
            uiSnippetPath = customUI.getUiSnippetName();

            try {
                URL uiSnippetUrl = env.getPluginClassLoader().getResource(uiSnippetPath);
                log.info("UI snipped for " + shortName + " is at " + uiSnippetUrl);
            }
            catch (Exception e) {
                log.error("No valid ui snippet provided, but <custom-ui> given for sender plugin " + shortName +
                        "Error is " + e.getMessage());
                return false;
            }

            // Get the backing bean class
            className = customUI.getBackingBeanClass();
            if (!className.contains(".")) {
                className = type.getPackage() + "." + className;
            }
            try {
                Class.forName(className, true, env.getPluginClassLoader());
View Full Code Here


            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;
                }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.xmlschema.generated.serverplugin.alert.CustomUi

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.