Package org.jmanage.core.config

Examples of org.jmanage.core.config.MBeanConfig


        canAccessThisMBean(context, context.getObjectName());
    }
   
    private void canAccessThisMBean(ServiceContext context, ObjectName objectName){
        final ApplicationConfig config = context.getApplicationConfig();
        final MBeanConfig configuredMBean =
                config.findMBeanByObjectName(objectName.getCanonicalName());
        AccessController.checkAccess(context,
                ACLConstants.ACL_VIEW_APPLICATIONS);
        if(configuredMBean != null)
            AccessController.checkAccess(context,
View Full Code Here


    }

    public static String resolveMBeanName(ApplicationConfig appConfig,
                                          String mbeanName){
        /* check if the mbeanName is the configured mbean name */
        MBeanConfig mbeanConfig = appConfig.findMBean(mbeanName);
        if(mbeanConfig != null){
            mbeanName = mbeanConfig.getObjectName();
        }
        return mbeanName;
    }
View Full Code Here

            for(int mbeanCtr=0; mbeanCtr < objectNames.length; mbeanCtr++ ){
                final String configName = request.getParameter(objectNames[mbeanCtr]);
                if(GenericValidator.isBlankOrNull(configName) ||
                        applicationConfig.containsMBean(objectNames[mbeanCtr]))
                    continue;
                applicationConfig.addMBean(new MBeanConfig(configName,
                        objectNames[mbeanCtr]));
                ApplicationConfigManager.updateApplication(applicationConfig);

                if(mbeanConfigForm.isApplicationCluster()){
                    logMsg = "Added "+objectNames[mbeanCtr]+" to " +
                            "application cluster " + applicationConfig.getName();
                }else{
                    logMsg = "Added "+objectNames[mbeanCtr]+" to " +
                            "application " + applicationConfig.getName();
                }
                logMsg += "\n";
            }
        }else{
            final String configName = mbeanConfigForm.getName()[0];
            applicationConfig.addMBean(new MBeanConfig(configName,
                    mbeanConfigForm.getObjectName()));
            ApplicationConfigManager.updateApplication(applicationConfig);

            if(mbeanConfigForm.isApplicationCluster()){
                logMsg = "Added "+mbeanConfigForm.getObjectName()+" to " +
View Full Code Here

        /* setup the form to be used in the html form */
        MBeanConfigForm mbeanConfigForm = (MBeanConfigForm)actionForm;
        mbeanConfigForm.setObjectName(objectName.getCanonicalName());

        ApplicationConfig appConfig = context.getApplicationConfig();
        MBeanConfig mbeanConfig =
                appConfig.findMBeanByObjectName(objectName.getCanonicalName());
        if(mbeanConfig != null){
            if(appConfig.isCluster()){
                request.setAttribute("mbeanIncludedIn", "cluster");
            }else{
View Full Code Here

TOP

Related Classes of org.jmanage.core.config.MBeanConfig

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.