Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)
return this.addValue(COOKIE_PARAM, value);
|
public int | addExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)
return this.addValue(EXTRA_PARAM, value);
|
public int | addHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)
return this.addValue(HELPER_CLASS_PARAM, value);
|
public int | addJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)
return this.addValue(JSP_PARAM, value);
|
public int | addManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)
return this.addValue(MANAGER_PARAM, value);
|
public int | addPersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)
return this.addValue(PERSISTENCE_PARAM, value);
|
public int | addSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)
return this.addValue(SESSION_PARAM, value);
|
public int | addStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value)
return this.addValue(STORE_PARAM, value);
|
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppData | createGraph(org.w3c.dom.Node doc)
return new SunWebAppData(doc, Common.NO_DEFAULT_VALUES);
|
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppData | createGraph(java.io.InputStream in)
return createGraph(in, false);
|
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppData | createGraph(java.io.InputStream in, boolean validate)
Document doc = GraphManager.createXmlDocument(in, validate);
return createGraph(doc);
|
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppData | createGraph()
try {
return new SunWebAppData();
}
catch (Schema2BeansException e) {
throw new RuntimeException(e.getMessage());
}
|
public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("SessionParam["+this.sizeSessionParam()+"]"); // NOI18N
for(int i=0; i<this.sizeSessionParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSessionParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SESSION_PARAM, i, str, indent);
}
str.append(indent);
str.append("CookieParam["+this.sizeCookieParam()+"]"); // NOI18N
for(int i=0; i<this.sizeCookieParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getCookieParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(COOKIE_PARAM, i, str, indent);
}
str.append(indent);
str.append("JspParam["+this.sizeJspParam()+"]"); // NOI18N
for(int i=0; i<this.sizeJspParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getJspParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(JSP_PARAM, i, str, indent);
}
str.append(indent);
str.append("ExtraParam["+this.sizeExtraParam()+"]"); // NOI18N
for(int i=0; i<this.sizeExtraParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getExtraParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(EXTRA_PARAM, i, str, indent);
}
str.append(indent);
str.append("ManagerParam["+this.sizeManagerParam()+"]"); // NOI18N
for(int i=0; i<this.sizeManagerParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getManagerParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(MANAGER_PARAM, i, str, indent);
}
str.append(indent);
str.append("StoreParam["+this.sizeStoreParam()+"]"); // NOI18N
for(int i=0; i<this.sizeStoreParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getStoreParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(STORE_PARAM, i, str, indent);
}
str.append(indent);
str.append("PersistenceParam["+this.sizePersistenceParam()+"]"); // NOI18N
for(int i=0; i<this.sizePersistenceParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getPersistenceParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(PERSISTENCE_PARAM, i, str, indent);
}
str.append(indent);
str.append("HelperClassParam["+this.sizeHelperClassParam()+"]"); // NOI18N
for(int i=0; i<this.sizeHelperClassParam(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getHelperClassParam(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(HELPER_CLASS_PARAM, i, str, indent);
}
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("SunWebAppData\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public com.sun.enterprise.tools.common.dd.webapp.data.CookieParam | getCookieParam(int index)
return (CookieParam)this.getValue(COOKIE_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.CookieParam[] | getCookieParam()
return (CookieParam[])this.getValues(COOKIE_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam | getExtraParam(int index)
return (ExtraParam)this.getValue(EXTRA_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam[] | getExtraParam()
return (ExtraParam[])this.getValues(EXTRA_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam | getHelperClassParam(int index)
return (HelperClassParam)this.getValue(HELPER_CLASS_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam[] | getHelperClassParam()
return (HelperClassParam[])this.getValues(HELPER_CLASS_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.JspParam | getJspParam(int index)
return (JspParam)this.getValue(JSP_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.JspParam[] | getJspParam()
return (JspParam[])this.getValues(JSP_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam | getManagerParam(int index)
return (ManagerParam)this.getValue(MANAGER_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam[] | getManagerParam()
return (ManagerParam[])this.getValues(MANAGER_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam | getPersistenceParam(int index)
return (PersistenceParam)this.getValue(PERSISTENCE_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam[] | getPersistenceParam()
return (PersistenceParam[])this.getValues(PERSISTENCE_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.SessionParam[] | getSessionParam()
return (SessionParam[])this.getValues(SESSION_PARAM);
|
public com.sun.enterprise.tools.common.dd.webapp.data.SessionParam | getSessionParam(int index)
return (SessionParam)this.getValue(SESSION_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.StoreParam | getStoreParam(int index)
return (StoreParam)this.getValue(STORE_PARAM, index);
|
public com.sun.enterprise.tools.common.dd.webapp.data.StoreParam[] | getStoreParam()
return (StoreParam[])this.getValues(STORE_PARAM);
|
protected void | initFromNode(org.w3c.dom.Node doc, int options)
if (doc == null)
{
doc = GraphManager.createRootElementNode("sun-web-app-data"); // NOI18N
if (doc == null)
throw new Schema2BeansException(Common.getMessage(
"CantCreateDOMRoot_msg", "sun-web-app-data"));
}
Node n = GraphManager.getElementNode("sun-web-app-data", doc); // NOI18N
if (n == null)
throw new Schema2BeansException(Common.getMessage(
"DocRootNotInDOMGraph_msg", "sun-web-app-data", doc.getFirstChild().getNodeName()));
this.graphManager.setXmlDocument(doc);
// Entry point of the createBeans() recursive calls
this.createBean(n, this.graphManager());
this.initialize(options);
|
protected void | initOptions(int options)
// The graph manager is allocated in the bean root
this.graphManager = new GraphManager(this);
this.createRoot("sun-web-app-data", "SunWebAppData", // NOI18N
Common.TYPE_1 | Common.TYPE_BEAN, SunWebAppData.class);
// Properties (see root bean comments for the bean graph)
this.createProperty("session-param", // NOI18N
SESSION_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
SessionParam.class);
this.createProperty("cookie-param", // NOI18N
COOKIE_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
CookieParam.class);
this.createProperty("jsp-param", // NOI18N
JSP_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
JspParam.class);
this.createProperty("extra-param", // NOI18N
EXTRA_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ExtraParam.class);
this.createProperty("manager-param", // NOI18N
MANAGER_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ManagerParam.class);
this.createProperty("store-param", // NOI18N
STORE_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
StoreParam.class);
this.createProperty("persistence-param", // NOI18N
PERSISTENCE_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
PersistenceParam.class);
this.createProperty("helper-class-param", // NOI18N
HELPER_CLASS_PARAM,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
HelperClassParam.class);
this.initialize(options);
|
void | initialize(int options)
|
private void | readObject(java.io.ObjectInputStream in)
try{
init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
String strDocument = in.readUTF();
// System.out.println("strDocument='"+strDocument+"'");
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
Document doc = GraphManager.createXmlDocument(bais, false);
initOptions(Common.NO_DEFAULT_VALUES);
initFromNode(doc, Common.NO_DEFAULT_VALUES);
}
catch (Schema2BeansException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removeCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)
return this.removeValue(COOKIE_PARAM, value);
|
public int | removeExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)
return this.removeValue(EXTRA_PARAM, value);
|
public int | removeHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)
return this.removeValue(HELPER_CLASS_PARAM, value);
|
public int | removeJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)
return this.removeValue(JSP_PARAM, value);
|
public int | removeManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)
return this.removeValue(MANAGER_PARAM, value);
|
public int | removePersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)
return this.removeValue(PERSISTENCE_PARAM, value);
|
public int | removeSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)
return this.removeValue(SESSION_PARAM, value);
|
public int | removeStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value)
return this.removeValue(STORE_PARAM, value);
|
public void | setCookieParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)
this.setValue(COOKIE_PARAM, index, value);
|
public void | setCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam[] value)
this.setValue(COOKIE_PARAM, value);
|
public void | setExtraParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)
this.setValue(EXTRA_PARAM, index, value);
|
public void | setExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam[] value)
this.setValue(EXTRA_PARAM, value);
|
public void | setHelperClassParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)
this.setValue(HELPER_CLASS_PARAM, index, value);
|
public void | setHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam[] value)
this.setValue(HELPER_CLASS_PARAM, value);
|
public void | setJspParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)
this.setValue(JSP_PARAM, index, value);
|
public void | setJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam[] value)
this.setValue(JSP_PARAM, value);
|
public void | setManagerParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)
this.setValue(MANAGER_PARAM, index, value);
|
public void | setManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam[] value)
this.setValue(MANAGER_PARAM, value);
|
public void | setPersistenceParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)
this.setValue(PERSISTENCE_PARAM, index, value);
|
public void | setPersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam[] value)
this.setValue(PERSISTENCE_PARAM, value);
|
public void | setSessionParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)
this.setValue(SESSION_PARAM, index, value);
|
public void | setSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam[] value)
this.setValue(SESSION_PARAM, value);
|
public void | setStoreParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value)
this.setValue(STORE_PARAM, index, value);
|
public void | setStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam[] value)
this.setValue(STORE_PARAM, value);
|
public int | sizeCookieParam()
return this.size(COOKIE_PARAM);
|
public int | sizeExtraParam()
return this.size(EXTRA_PARAM);
|
public int | sizeHelperClassParam()
return this.size(HELPER_CLASS_PARAM);
|
public int | sizeJspParam()
return this.size(JSP_PARAM);
|
public int | sizeManagerParam()
return this.size(MANAGER_PARAM);
|
public int | sizePersistenceParam()
return this.size(PERSISTENCE_PARAM);
|
public int | sizeSessionParam()
return this.size(SESSION_PARAM);
|
public int | sizeStoreParam()
return this.size(STORE_PARAM);
|
public void | validate()
boolean restrictionFailure = false;
// Validating property sessionParam
for (int _index = 0; _index < sizeSessionParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.SessionParam element = getSessionParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property cookieParam
for (int _index = 0; _index < sizeCookieParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.CookieParam element = getCookieParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property jspParam
for (int _index = 0; _index < sizeJspParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.JspParam element = getJspParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property extraParam
for (int _index = 0; _index < sizeExtraParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam element = getExtraParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property managerParam
for (int _index = 0; _index < sizeManagerParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam element = getManagerParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property storeParam
for (int _index = 0; _index < sizeStoreParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.StoreParam element = getStoreParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property persistenceParam
for (int _index = 0; _index < sizePersistenceParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam element = getPersistenceParam(_index);
if (element != null) {
element.validate();
}
}
// Validating property helperClassParam
for (int _index = 0; _index < sizeHelperClassParam(); ++_index) {
com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam element = getHelperClassParam(_index);
if (element != null) {
element.validate();
}
}
|
private void | writeObject(java.io.ObjectOutputStream out)
ByteArrayOutputStream baos = new ByteArrayOutputStream();
write(baos);
String str = baos.toString();;
// System.out.println("str='"+str+"'");
out.writeUTF(str);
|