Package com.sun.appserv.management.config

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


        @HandlerOutput(name="Directory",        type=String.class),
        @HandlerOutput(name="Properties",       type=Map.class) })
       
        public static void getWebStoreProps(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        SessionConfig sessionConfig = config.getWebContainerConfig().getSessionConfig();
        Map <String, String> props = new HashMap();
        if(sessionConfig != null){
            SessionManagerConfig sessMgrConfig = sessionConfig.getSessionManagerConfig();
            if(sessMgrConfig != null){
                StorePropertiesConfig storePropConfig = sessMgrConfig.getStorePropertiesConfig();
View Full Code Here


        @HandlerInput(name="AddProps",         type=Map.class),
        @HandlerInput(name="RemoveProps",      type=ArrayList.class) })

        public static void saveWebStoreProps(HandlerContext handlerCtx) {
            String configName = (String) handlerCtx.getInputValue("ConfigName");
            ConfigConfig config = AMXUtil.getConfig(configName);
            SessionConfig sessionConfig = config.getWebContainerConfig().getSessionConfig();
            try{
                String reapInterval = (String)handlerCtx.getInputValue("ReapInterval");
                String directory = (String)handlerCtx.getInputValue("Directory");
                if((sessionConfig != null) && (sessionConfig.getSessionManagerConfig() != null)
                    && (sessionConfig.getSessionManagerConfig().getStorePropertiesConfig() != null)) {
                        StorePropertiesConfig storePropConfig = sessionConfig.getSessionManagerConfig().getStorePropertiesConfig();
                        storePropConfig.setReapIntervalInSeconds(reapInterval);
                        storePropConfig.setDirectory(directory);
                        AMXUtil.editProperties(handlerCtx, storePropConfig);
                }else{
                    String objName = "com.sun.appserv:type=configs,category=config";
                    String opername = "createStoreProperties";
                    String[] signature = {"javax.management.AttributeList", "java.util.Properties", "java.lang.String"};

                    AttributeList attrList = new AttributeList();
                    attrList.add(new Attribute("reap-interval-in-seconds", reapInterval));
                    attrList.add(new Attribute("directory", directory));

                    Properties props = new Properties();
                    Object[] params = {attrList, props, configName};
                    JMXUtil.invoke(objName, opername, params, signature);
                    sessionConfig = config.getWebContainerConfig().getSessionConfig();
                    StorePropertiesConfig storePropConfig = sessionConfig.getSessionManagerConfig().getStorePropertiesConfig();
                    AMXUtil.editProperties(handlerCtx, storePropConfig);
                }
            }catch(Exception ex){
                GuiUtil.handleException(handlerCtx, ex);
View Full Code Here

        sessionMap.put("reqInt", GuiUtil.getMessage("msg.JS.enterIntegerValue"));
        sessionMap.put("reqNum", GuiUtil.getMessage("msg.JS.enterNumericValue"));
        sessionMap.put("reqPort", GuiUtil.getMessage("msg.JS.enterPortValue"));
        sessionMap.put("_SESSION_INITIALIZED","TRUE");
       
        ConfigConfig config = AMXUtil.getConfig("server-config");
        DASConfig dConfig = config.getAdminServiceConfig().getDASConfig();
        String timeOut = dConfig.getAdminSessionTimeoutInMinutes();

    if((timeOut != null) && (!timeOut.equals(""))) {
      try {
        int time = new Integer(timeOut).intValue();
View Full Code Here

            @HandlerOutput(name="ShutdownTimeout",   type=String.class)})
       
        public static void getConnectorServiceAttributes(HandlerContext handlerCtx) {
       
        String configName = (String) handlerCtx.getInputValue("cName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        ConnectorServiceConfig connService = config.getConnectorServiceConfig();
        if(connService != null){
            String shutdTimeout = connService.getShutdownTimeoutInSeconds();
            handlerCtx.setOutputValue("ShutdownTimeout", shutdTimeout);
        }
    }
View Full Code Here

        @HandlerInput(name="cName", type=String.class, required=true),
        @HandlerInput(name="ShutdownTimeout",    type=String.class)})
       
    public static void saveConnectorServiceAttributes(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("cName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        try{
            ConnectorServiceConfig connService = config.getConnectorServiceConfig();
            if(connService != null){
                connService.setShutdownTimeoutInSeconds((String)handlerCtx.getInputValue("ShutdownTimeout"));
            }else{
                connService = config.createConnectorServiceConfig();
                connService.setShutdownTimeoutInSeconds((String)handlerCtx.getInputValue("ShutdownTimeout"));
            }
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
View Full Code Here

    output={
        @HandlerOutput(name="Jacc", type=SelectItem[].class)})

        public static void getJaccs(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        SecurityServiceConfig sConfig = config.getSecurityServiceConfig();
        Map<String,JACCProviderConfig>jacc = sConfig.getJACCProviderConfigMap();
        String[] jProvider = (String[])jacc.keySet().toArray(new String[jacc.size()]);
        SelectItem[] options = getOptions(jProvider);
  handlerCtx.setOutputValue("Jacc", options);
    }
View Full Code Here

    output={
        @HandlerOutput(name="Hosts", type=SelectItem[].class)})

        public static void getJmsHosts(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JMSServiceConfig jConfig = config.getJMSServiceConfig();
        Map<String,JMSHostConfig>hosts = jConfig.getJMSHostConfigMap();
        String[] jHosts = (String[])hosts.keySet().toArray(new String[hosts.size()]);
        SelectItem[] options = getOptions(jHosts);
  handlerCtx.setOutputValue("Hosts", options);
    }
View Full Code Here

    output={
        @HandlerOutput(name="AuditModules", type=SelectItem[].class)})

        public static void getAuditModules(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        SecurityServiceConfig sConfig = config.getSecurityServiceConfig();
        Map<String,AuditModuleConfig>modules = sConfig.getAuditModuleConfigMap();
        String[] aModules = (String[])modules.keySet().toArray(new String[modules.size()]);
        SelectItem[] options = getOptions(aModules);
        handlerCtx.setOutputValue("AuditModules", options);
    }
View Full Code Here

        @HandlerOutput(name="Jacc", type=String.class),
        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getSecuritySettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        SecurityServiceConfig sConfig = config.getSecurityServiceConfig();
        boolean audit = sConfig.getAuditEnabled();
        String principal = sConfig.getDefaultPrincipal();
        String password = sConfig.getDefaultPrincipalPassword();
        boolean roleMapping = sConfig.getActivateDefaultPrincipalToRoleMapping();
        String mapped = sConfig.getMappedPrincipalClass();
View Full Code Here

        @HandlerInput(name="Modules",    type=String.class),
        @HandlerInput(name="Realms",      type=String.class),
        @HandlerInput(name="AddProps", type=Map.class),
        @HandlerInput(name="RemoveProps", type=ArrayList.class)})   
    public static void saveSecuritySettings(HandlerContext handlerCtx) {
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        SecurityServiceConfig sConfig = config.getSecurityServiceConfig();
        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++){
            sConfig.removeProperty(remove[i]);
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.