Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.ConfigConfig


                if (sprops.existsSystemProperty(pn)) {
                    return sprops.getSystemPropertyValue(pn);
                }
            }
        }
        ConfigConfig config = AMXUtil.getConfig(configName);
        return config.getSystemPropertyValue(pn);
    }
View Full Code Here


        boolean hasOrig = (selectedList == null || selectedList.size()==0) ? false: true;
        Iterator iter = AMXUtil.getDomainConfig().getConfigConfigMap().values().iterator();
        List result = new ArrayList();
        if (iter != null){
            while(iter.hasNext()){
                ConfigConfig config = (ConfigConfig) iter.next();
                HashMap oneRow = new HashMap();
                String name = config.getName();
                oneRow.put("name", name);
                oneRow.put("selected", (hasOrig)? ConnectorsHandlers.isSelected(name, selectedList): false);
                result.add(oneRow);
            }
        }
View Full Code Here

        @HandlerOutput(name="DynamicReconfig",  type=Boolean.class),
        @HandlerOutput(name="Properties",       type=java.util.Map.class),
        @HandlerOutput(name="TableList",        type=java.util.List.class) })
    public static void getSystemProperties(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getDomainConfig().getConfigConfigMap().get(configName);
       
        handlerCtx.setOutputValue("DynamicReconfig", config.getDynamicReconfigurationEnabled());
        List data = new ArrayList();
        Map<String, String> props = config.getSystemProperties()
        if(props != null ){
            for(String key : props.keySet()){
                HashMap oneRow = new HashMap();
                Object value = props.get(key);
                String valString = (value==null)? "" : value.toString();
View Full Code Here

        @HandlerInput(name="ConfigName",        type=String.class, required=true),
        @HandlerInput(name="DynamicReconfig",   type=Boolean.class),
        @HandlerInput(name="AddProps",          type=Map.class)})
    public static void saveSystemProperties(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getDomainConfig().getConfigConfigMap().get(configName);
        config.setDynamicReconfigurationEnabled(((Boolean)handlerCtx.getInputValue("DynamicReconfig")).booleanValue());
        Map<String,String> addProps = (Map)handlerCtx.getInputValue("AddProps");
        AMXUtil.updateSystemProperties(config, addProps);
    }
View Full Code Here

        @HandlerInput(name="PropertyName",     type=String.class, required=true)},
    output={
        @HandlerOutput(name="InstancesList",        type=java.util.List.class) })
    public static void getInstancevalues(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getDomainConfig().getConfigConfigMap().get(configName);
        String propName = (String) handlerCtx.getInputValue("PropertyName");
        Vector instances = getReferencedInstances(configName);
        List data = new ArrayList();
        for(int i=0; i<instances.size(); i++){
            HashMap oneRow = new HashMap();
            ServerConfig servConfig = (ServerConfig)instances.get(i);
            String name = servConfig.getName();
            String propValue = ""; //NOI18N
            if(Arrays.asList(servConfig.getSystemPropertyNames()).contains(propName)){
                propValue = servConfig.getSystemPropertyValue(propName);
            }
            if(servConfig instanceof ClusteredServerConfig){
                ClusteredServerConfig conf = (ClusteredServerConfig)servConfig;
                String clusterName = getClusterForServer(name);
                oneRow.put("clusterName", clusterName);
                oneRow.put("isCluster", true);
            } else {
                oneRow.put("clusterName", "");
                oneRow.put("isCluster", false);               
            }
            oneRow.put("name", name);
            oneRow.put("value", propValue);
            oneRow.put("defaultValue", config.getSystemPropertyValue(propName));
            data.add(oneRow);
        }
        handlerCtx.setOutputValue("InstancesList", data);
    }
View Full Code Here

            @HandlerInput(name="selectedRows", type=List.class)},
        output={
            @HandlerOutput(name="Result", type=java.util.List.class)}
    )
    public static void getMgmtRulesList(HandlerContext handlerCtx){
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
       
        Iterator iter = config.getManagementRulesConfig().getManagementRuleConfigMap().values().iterator();
       
        List<Map> selectedList = (List)handlerCtx.getInputValue("selectedRows");
        boolean hasOrig = (selectedList == null || selectedList.size()==0) ? false: true;
       
        List result = new ArrayList();
View Full Code Here

       
        public static void getManagementRuleValues(HandlerContext handlerCtx) {
        try{
            String configName = (String) handlerCtx.getInputValue("ConfigName");
            String ruleName = (String) handlerCtx.getInputValue("RuleName");
            ConfigConfig config = AMXUtil.getConfig(configName);
            ManagementRuleConfig mgRuleConfig = config.getManagementRulesConfig().getManagementRuleConfigMap().get(ruleName);
            handlerCtx.setOutputValue("Status", mgRuleConfig.getEnabled());
            handlerCtx.setOutputValue("RuleDesc", mgRuleConfig.getDescription());
            handlerCtx.setOutputValue("RecordEvent", mgRuleConfig.getEventConfig().getRecordEvent());
            handlerCtx.setOutputValue("LogLevel", mgRuleConfig.getEventConfig().getLevel());
            handlerCtx.setOutputValue("EventDesc", mgRuleConfig.getEventConfig().getDescription());
View Full Code Here

       
        public static void getCommonEventValues(HandlerContext handlerCtx) {
        try{
            String configName = (String) handlerCtx.getInputValue("ConfigName"); //NOI18N
            String ruleName = (String) handlerCtx.getInputValue("RuleName"); //NOI18N
            ConfigConfig config = AMXUtil.getConfig(configName);
            ManagementRuleConfig mgRuleConfig = config.getManagementRulesConfig().getManagementRuleConfigMap().get(ruleName);
            Map<String,String> propMap = mgRuleConfig.getEventConfig().getProperties();
            SelectItem[] events = null;
            String type = mgRuleConfig.getEventConfig().getType();
            if(type.equals("lifecycle")){
                events = ConfigurationHandlers.getOptions(lifeCycleEvents);
View Full Code Here

       
        public static void saveCommonEventValues(HandlerContext handlerCtx) {
        try{
            String configName = (String) handlerCtx.getInputValue("ConfigName"); //NOI18N
            String ruleName = (String) handlerCtx.getInputValue("RuleName"); //NOI18N
            ConfigConfig config = AMXUtil.getConfig(configName);
            ManagementRuleConfig mgRuleConfig = config.getManagementRulesConfig().getManagementRuleConfigMap().get(ruleName);
            String type = mgRuleConfig.getEventConfig().getType();
            mgRuleConfig.setEnabled(((Boolean)handlerCtx.getInputValue("Status")).booleanValue());
            mgRuleConfig.setDescription((String)handlerCtx.getInputValue("RuleDesc"));
            mgRuleConfig.getEventConfig().setRecordEvent(((Boolean)handlerCtx.getInputValue("RecordEvent")).booleanValue());
            mgRuleConfig.getEventConfig().setLevel((String)handlerCtx.getInputValue("LogLevel"));
View Full Code Here

       
        public static void getNotifEventValues(HandlerContext handlerCtx) {
        try{
            String configName = (String) handlerCtx.getInputValue("ConfigName"); //NOI18N
            String ruleName = (String) handlerCtx.getInputValue("RuleName"); //NOI18N
            ConfigConfig config = AMXUtil.getConfig(configName);
            ManagementRuleConfig mgRuleConfig = config.getManagementRulesConfig().getManagementRuleConfigMap().get(ruleName);
            Map<String,String> propMap = mgRuleConfig.getEventConfig().getProperties();
            String mbeanName = propMap.get("sourceobjectname"); //NOI18N
            String[] beanNames = getSourceMbeansNames("notification", configName);
            if(Arrays.asList(beanNames).contains(mbeanName)){
                handlerCtx.setOutputValue("SrcGroup", "1"); //NOI18N
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.ConfigConfig

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.