1 23 24 29 30 package com.sun.enterprise.config; 31 32 import com.sun.enterprise.config.ConfigException; 33 import com.sun.enterprise.config.impl.ConfigAddImpl; 34 import com.sun.enterprise.config.impl.ConfigUpdateImpl; 35 import com.sun.enterprise.config.impl.ConfigSetImpl; 36 import com.sun.enterprise.config.impl.ConfigDeleteImpl; 37 38 import com.sun.enterprise.config.util.LoggerHelper; 39 40 55 public class ConfigChangeFactory { 56 57 67 public static ConfigAdd createConfigAdd(ConfigContext ctx, String xpath) throws ConfigException { 68 try { 69 return new ConfigAddImpl(ctx, xpath); 70 } catch(ConfigException ce) { 71 LoggerHelper.info("ConfigChangeFactory.createConfigAdd: Error creating config Add", ce); 72 throw ce; 73 } 74 } 75 76 85 public static ConfigAdd createConfigAdd(String parentXpath, 86 String childXpath, 87 String name, 88 ConfigBean cb) { 89 return new ConfigAddImpl(parentXpath, childXpath, name, cb); 90 } 91 92 100 public static ConfigUpdate createConfigUpdate(String xpath, 101 String attrName, 102 String oldValue, 103 String newValue) { 104 return new ConfigUpdateImpl(xpath, attrName, oldValue, newValue); 105 } 106 107 111 public static ConfigSet createConfigSet(String parentXpath, 112 String name, 113 Object cb, 114 Object [] cbArray) { 115 return new ConfigSetImpl(parentXpath, name, cb, cbArray); 116 } 117 118 121 public static ConfigDelete createConfigDelete(String xpath) { 122 return new ConfigDeleteImpl(xpath); 123 } 124 } 125 | Popular Tags |