FileDocCategorySizeDatePackage
ConfigAddImpl.javaAPI DocGlassfish v2 API4764Fri May 04 22:31:18 BST 2007com.sun.enterprise.config.impl

ConfigAddImpl

public class ConfigAddImpl extends ConfigChangeImpl implements Serializable, com.sun.enterprise.config.ConfigAdd
A configuration change for an element. Holds xpath, list of changed attributes, their old and new values.

Fields Summary
private com.sun.enterprise.config.ConfigBean
cb
private String
name
Constructors Summary
public ConfigAddImpl(String parentXpath, String childXpath, String name, com.sun.enterprise.config.ConfigBean cb)


        this.xpath = childXpath;

        this.cb = cb;

        this.name = name;

        this.parentXpath = parentXpath;

    
public ConfigAddImpl(com.sun.enterprise.config.ConfigContext ctx, String xpath)

        //this.cb = (ConfigBean) ctx.getRootConfigBean().clone();
        this.cb = (ConfigBean) ctx.getRootConfigBean();
        this.xpath = xpath;
        this.name = ConfigXPathHelper.getLastNodeName(xpath); 
        this.parentXpath = ConfigXPathHelper.getParentXPath(xpath); 
    
Methods Summary
public com.sun.enterprise.config.ConfigBeangetConfigBean()


        return cb;

    
public java.lang.StringgetConfigChangeType()


        return TYPE_ADD;

    
public java.lang.StringgetName()


        return name;

    
private voidreadObject(java.io.ObjectInputStream in)
De-serializes this object in a synchronized block. This is necessary since schema2beans is not thread safe. Refer to bug: 6177778


        synchronized (this) {
            cb = (ConfigBean) in.readObject();
            name = (String) in.readObject();
        }
    
public java.lang.StringtoString()


        String ret = cb.toString() + ":add to xpath=" + getParentXPath() +"\n"

                        + "childXPath = " + getXPath();

        return ret;

    
private voidwriteObject(java.io.ObjectOutputStream out)
Serializes this object in a synchronized block. This is necessary since schema2beans is not thread safe. Refer to bug: 6177778


        synchronized (this) {
            out.writeObject(cb);
            out.writeObject(name);
        }