Package com.sun.appserv.management.config

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


        @HandlerOutput(name="sso", type=Boolean.class),
        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getVirtualServerSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                getDefaultVirtualServerAttributes(handlerCtx);
                return;
            }
            Map<String,VirtualServerConfig>vservers = config.getHTTPServiceConfig().getVirtualServerConfigMap();
            VirtualServerConfig vs = (VirtualServerConfig)vservers.get((String)handlerCtx.getInputValue("Name"));
           
            handlerCtx.setOutputValue("Hosts", vs.getHosts());
            handlerCtx.setOutputValue("StateOption", vs.getState());
            handlerCtx.setOutputValue("Http", vs.getHTTPListeners());
View Full Code Here


        @HandlerInput(name="accessLoggingFlag", type=String.class),
        @HandlerInput(name="sso",     type=Boolean.class)})
       
        public static void saveVirtualServerSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        Map newProps = (Map)handlerCtx.getInputValue("newProps");
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                Map convertedMap = AMXUtil.convertToPropertiesOptionMap(newProps, null);
                putOptionalValue((String) handlerCtx.getInputValue("accesslog"), convertedMap, "accesslog");
                putOptionalValue((String) handlerCtx.getInputValue("docroot"), convertedMap, "docroot");
                putOptionalValue((String) handlerCtx.getInputValue("accessLogBufferSize"), convertedMap, "accessLogBufferSize");
                putOptionalValue((String) handlerCtx.getInputValue("accessLogWriteInterval"), convertedMap, "accessLogWriteInterval");
                putOptionalValue(""+ handlerCtx.getInputValue("sso"), convertedMap, "sso-enabled");
                String accessLoggingFlag = (String)handlerCtx.getInputValue("accessLoggingFlag");
                if (!accessLoggingFlag.equals("off")){
                    putOptionalValue(accessLoggingFlag, convertedMap, "accessLoggingEnabled");
                }
               
                VirtualServerConfig server = config.getHTTPServiceConfig().createVirtualServerConfig(
                        (String)handlerCtx.getInputValue("Name"), ((String)handlerCtx.getInputValue("Hosts")), convertedMap);
               
                server.setHosts(((String)handlerCtx.getInputValue("Hosts")));
                server.setHTTPListeners(((String)handlerCtx.getInputValue("Http")));
                server.setDefaultWebModule(((String)handlerCtx.getInputValue("Web")));
                server.setLogFile(((String)handlerCtx.getInputValue("LogFile")));
                //server.setState(((String)handlerCtx.getInputValue("StateOption")));
                String tmp = (String)handlerCtx.getInputValue("StateOption");
                server.setState(tmp);
                return;
               
            }
            Map<String,VirtualServerConfig>vservers = config.getHTTPServiceConfig().getVirtualServerConfigMap();
            VirtualServerConfig vs = (VirtualServerConfig)vservers.get((String)handlerCtx.getInputValue("Name"));
            AMXUtil.updateProperties(vs, newProps, vsSkipPropsList);
           
            vs.setHosts(((String)handlerCtx.getInputValue("Hosts")));
            vs.setState(((String)handlerCtx.getInputValue("StateOption")));
View Full Code Here

        @HandlerOutput(name="PolicyConfig",  type=String.class),
        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getJaccProviderSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                getDefaultJaccProviderAttributes(handlerCtx);
                return;
            }
            Map<String,JACCProviderConfig>jaccProviders = config.getSecurityServiceConfig().getJACCProviderConfigMap();
            JACCProviderConfig jacc = (JACCProviderConfig)jaccProviders.get((String)handlerCtx.getInputValue("Name"));
            Map<String, String> props = jacc.getProperties();
            String jconfig = jacc.getPolicyConfigurationFactoryProvider();
            String policy = jacc.getPolicyProvider();
            handlerCtx.setOutputValue("PolicyConfig", jconfig);
View Full Code Here

        @HandlerInput(name="PolicyConfig",      type=String.class),
        @HandlerInput(name="PolicyProvider",  type=String.class)})
       
        public static void saveJaccProviderSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                Map optionalMap = AMXUtil.convertToPropertiesOptionMap((Map)handlerCtx.getInputValue("AddProps"), null);
                config.getSecurityServiceConfig().createJACCProviderConfig(
                        (String)handlerCtx.getInputValue("Name"), ((String)handlerCtx.getInputValue("PolicyProvider")), ((String)handlerCtx.getInputValue("PolicyConfig")), optionalMap);
                return;
            }
            Map<String,JACCProviderConfig>jaccProviders = config.getSecurityServiceConfig().getJACCProviderConfigMap();
            JACCProviderConfig jacc = (JACCProviderConfig)jaccProviders.get((String)handlerCtx.getInputValue("Name"));
            ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
            Map addProps = (Map)handlerCtx.getInputValue("AddProps");
            String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
            for(int i=0; i<remove.length; i++){
View Full Code Here

        @HandlerOutput(name="Classname",      type=String.class),
        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getAuditModuleSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                getDefaultAuditModuleAttributes(handlerCtx);
                return;
            }
            Map<String,AuditModuleConfig>auditModules = config.getSecurityServiceConfig().getAuditModuleConfigMap();
            AuditModuleConfig module = (AuditModuleConfig)auditModules.get((String)handlerCtx.getInputValue("Name"));
            Map<String, String> props = module.getProperties();
            String classname = module.getClassname();
            handlerCtx.setOutputValue("Classname", classname);
            handlerCtx.setOutputValue("Properties", props);
View Full Code Here

        @HandlerInput(name="RemoveProps", type=ArrayList.class),
        @HandlerInput(name="Classname",      type=String.class)})
       
        public static void saveAuditModuleSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                Map optionalMap = AMXUtil.convertToPropertiesOptionMap((Map)handlerCtx.getInputValue("AddProps"), null);
                config.getSecurityServiceConfig().createAuditModuleConfig(
                        (String)handlerCtx.getInputValue("Name"), ((String)handlerCtx.getInputValue("Classname")), true, optionalMap);
                return;
            }
            Map<String,AuditModuleConfig>modules = config.getSecurityServiceConfig().getAuditModuleConfigMap();
            AuditModuleConfig module = (AuditModuleConfig)modules.get((String)handlerCtx.getInputValue("Name"));
            ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
            Map addProps = (Map)handlerCtx.getInputValue("AddProps");
            String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
            for(int i=0; i<remove.length; i++){
View Full Code Here

        @HandlerOutput(name="predefinedClassname",     type=Boolean.class),
        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getRealmSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                getDefaultRealmAttributes(handlerCtx);
                return;
            }
            Map<String,AuthRealmConfig>realms = config.getSecurityServiceConfig().getAuthRealmConfigMap();
            AuthRealmConfig realm = (AuthRealmConfig)realms.get((String)handlerCtx.getInputValue("Name"));
            Map<String, String> props = realm.getProperties();
            String classname = realm.getClassname();
            String[] classnames = (String[])JMXUtil.invoke(
                "com.sun.appserv:category=config,config=server-config,type=security-service",
View Full Code Here

        @HandlerInput(name="ClassnameOption",     type=String.class),
        @HandlerInput(name="ClassnameInput",     type=String.class)})
       
        public static void saveRealmSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        String option = (String)handlerCtx.getInputValue("ClassnameOption");
        String classname = null;
        if(option.equals("predefine")){
            classname = (String)handlerCtx.getInputValue("Classname");
        } else {
            classname = (String)handlerCtx.getInputValue("ClassnameInput");           
        }
        try{
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                Map optionalMap = AMXUtil.convertToPropertiesOptionMap((Map)handlerCtx.getInputValue("AddProps"), null);
                config.getSecurityServiceConfig().createAuthRealmConfig(
                        (String)handlerCtx.getInputValue("Name"), classname, optionalMap);
                return;
            }
            Map<String,AuthRealmConfig>realms = config.getSecurityServiceConfig().getAuthRealmConfigMap();
            AuthRealmConfig realm = (AuthRealmConfig)realms.get((String)handlerCtx.getInputValue("Name"));
            ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
            Map addProps = (Map)handlerCtx.getInputValue("AddProps");
            String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
            for(int i=0; i<remove.length; i++){
View Full Code Here

    output={
        @HandlerOutput(name="ThreadPools",   type=SelectItem[].class)})
       
        public static void getThreadPools(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        Map threadPools = config.getThreadPoolConfigMap();
        String[] poolIds = (String[])threadPools.keySet().toArray(new String[threadPools.size()]);
        SelectItem[] options = getModOptions(poolIds);
       
        handlerCtx.setOutputValue("ThreadPools", options);
    }
View Full Code Here

            @HandlerInput(name="selectedRows", type=List.class)},
        output={
            @HandlerOutput(name="Result", type=java.util.List.class)}
     )
    public static void getThreadPoolsList(HandlerContext handlerCtx){
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));     
        Iterator iter = config.getThreadPoolConfigMap().values().iterator();
        List<Map> selectedList = (List)handlerCtx.getInputValue("selectedRows");
        boolean hasOrig = (selectedList == null || selectedList.size()==0) ? false: true;
      
        List result = new ArrayList();
        if (iter != null){
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.