Package com.sun.appserv.management.config

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


    }
   
        public static LifecycleModuleConfig
  ensureDefaultInstance( final DomainConfig domainConfig )
  {
      LifecycleModuleConfig   result  =
          domainConfig.getLifecycleModuleConfigMap().get( getDefaultInstanceName() );
     
      if ( result == null )
      {
          result  = createInstance(
View Full Code Here


      final boolean  isFailureFatal = false;
      final boolean  enabled = true;
      final String   classpath = "/test";
      final String   description = null;
     
      final LifecycleModuleConfig life    =
        domainConfig.createLifecycleModuleConfigname,
                            description,
                              classname,
                              classpath,
                              "" + loadOrder,
View Full Code Here

            @HandlerOutput(name="properties", type=java.util.Map.class)
  })
    public static void getLifecycleModuleInfo(HandlerContext handlerCtx) {
       
        String name = (String) handlerCtx.getInputValue("name");
  LifecycleModuleConfig module = AMXUtil.getDomainConfig().getLifecycleModuleConfigMap().get(name);
  if (module == null){
      GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchLifecycle"));
      return;
  }
  handlerCtx.setOutputValue("classname", module.getClassname());
        handlerCtx.setOutputValue("classpath", module.getClasspath());
        handlerCtx.setOutputValue("loadOrder", module.getLoadOrder());
  handlerCtx.setOutputValue("description", module.getDescription());
  handlerCtx.setOutputValue("isFailureFatal", module.getIsFailureFatal());
        if(AMXUtil.isEE())
            handlerCtx.setOutputValue("enabledString", TargetUtil.getEnabledStatus(module, true));
        else
            handlerCtx.setOutputValue("enabled", TargetUtil.isApplicationEnabled(module, "server" ));
        Map<String, String> props = module.getProperties();
        handlerCtx.setOutputValue("properties", props);    
    }
View Full Code Here

            @HandlerInput(name="AddProps",    type=Map.class),
            @HandlerInput(name="RemoveProps", type=ArrayList.class)
        })
    public static void saveLifecycleModuleInfo(HandlerContext handlerCtx) {
        String name = (String) handlerCtx.getInputValue("name");
  LifecycleModuleConfig module = AMXUtil.getDomainConfig().getLifecycleModuleConfigMap().get(name);
 
        if (module == null){
            GuiUtil.handleError(handlerCtx,  GuiUtil.getMessage("msg.NoSuchLifecycle"));
  }
       
        module.setDescription((String)handlerCtx.getInputValue("description"));
        module.setClassname((String)handlerCtx.getInputValue("classname"));
        module.setClasspath((String)handlerCtx.getInputValue("classpath"));
        module.setLoadOrder((String)handlerCtx.getInputValue("loadOrder"));
        module.setIsFailureFatal((Boolean)handlerCtx.getInputValue("isFailureFatal"));
        if (! AMXUtil.isEE()){
            Boolean enabled = (Boolean) handlerCtx.getInputValue("enabled");
            TargetUtil.setApplicationEnabled(module, "server", enabled);
        }
        AMXUtil.editProperties(handlerCtx, module);
View Full Code Here

            String[] types = new String[]{"java.lang.String", "java.lang.String"};
            String defaultTarget = (AMXUtil.isEE() ? "domain": "server");
            for(int i=0; i< selectedRows.size(); i++){
                Map oneRow = (Map) selectedRows.get(i);
                String name = (String)oneRow.get("name");
                LifecycleModuleConfig module = AMXUtil.getDomainConfig().getLifecycleModuleConfigMap().get(name);
                deleteLifecycleReferences(module);
                Object[] params = new Object[]{ name , defaultTarget};
                JMXUtil.invoke(
                    "com.sun.appserv:type=applications,category=config",
                    "removeLifecycleModuleByName",
View Full Code Here

    public static void getDeployedLifecycleInfo(HandlerContext handlerCtx){
       
        Iterator<LifecycleModuleConfig> iter = AMXUtil.getDomainConfig().getLifecycleModuleConfigMap().values().iterator();
        List result = new ArrayList();
        while(iter.hasNext()){
            LifecycleModuleConfig appConfig = iter.next();
            try{
              if (ObjectTypeValues.USER.equals(appConfig.getObjectType())){
                HashMap oneRow = new HashMap();
                oneRow.put("name", appConfig.getName());
                oneRow.put("enabled", TargetUtil.getEnabledStatus(appConfig, true));
                oneRow.put("loadOrder", GuiUtil.notNull(appConfig.getLoadOrder()));
                oneRow.put("selected", false);
                oneRow.put("hasLaunch", false);
                result.add(oneRow);
              }
            }catch(Exception ex){
View Full Code Here

TOP

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

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.