FileDocCategorySizeDatePackage
SunWebAppData.javaAPI DocGlassfish v2 API25633Fri May 04 22:34:54 BST 2007com.sun.enterprise.tools.common.dd.webapp.data

SunWebAppData

public class SunWebAppData extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class SunWebAppData matches the schema element sun-web-app-data Generated on Tue Aug 12 18:27:47 PDT 2003 This class matches the root element of the DTD, and is the root of the following bean graph: sun-web-app-data : SunWebAppData session-param : SessionParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? cookie-param : CookieParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? jsp-param : JspParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? extra-param : ExtraParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? manager-param : ManagerParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? store-param : StoreParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? persistence-param : PersistenceParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String? helper-class-param : HelperClassParam[0,n] param-name : String param-type : String? param-values : String[0,n] default-value : String? helpID : String?

Fields Summary
static Vector
comparators
public static final String
SESSION_PARAM
public static final String
COOKIE_PARAM
public static final String
JSP_PARAM
public static final String
EXTRA_PARAM
public static final String
MANAGER_PARAM
public static final String
STORE_PARAM
public static final String
PERSISTENCE_PARAM
public static final String
HELPER_CLASS_PARAM
Constructors Summary
public SunWebAppData()

	// NOI18N

	    
		this(null, Common.USE_DEFAULT_VALUES);
	
public SunWebAppData(Node doc, int options)

		this(Common.NO_DEFAULT_VALUES);
		initFromNode(doc, options);
	
public SunWebAppData(int options)

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		initOptions(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)

		return this.addValue(COOKIE_PARAM, value);
	
public intaddExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)

		return this.addValue(EXTRA_PARAM, value);
	
public intaddHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)

		return this.addValue(HELPER_CLASS_PARAM, value);
	
public intaddJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)

		return this.addValue(JSP_PARAM, value);
	
public intaddManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)

		return this.addValue(MANAGER_PARAM, value);
	
public intaddPersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)

		return this.addValue(PERSISTENCE_PARAM, value);
	
public intaddSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)

		return this.addValue(SESSION_PARAM, value);
	
public intaddStoreParam(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.SunWebAppDatacreateGraph(org.w3c.dom.Node doc)

		return new SunWebAppData(doc, Common.NO_DEFAULT_VALUES);
	
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppDatacreateGraph(java.io.InputStream in)

		return createGraph(in, false);
	
public static com.sun.enterprise.tools.common.dd.webapp.data.SunWebAppDatacreateGraph(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.SunWebAppDatacreateGraph()

		try {
			return new SunWebAppData();
		}
		catch (Schema2BeansException e) {
			throw new RuntimeException(e.getMessage());
		}
	
public voiddump(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.StringdumpBeanNode()

		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.CookieParamgetCookieParam(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.ExtraParamgetExtraParam(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.HelperClassParamgetHelperClassParam(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.JspParamgetJspParam(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.ManagerParamgetManagerParam(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.PersistenceParamgetPersistenceParam(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.SessionParamgetSessionParam(int index)

		return (SessionParam)this.getValue(SESSION_PARAM, index);
	
public com.sun.enterprise.tools.common.dd.webapp.data.StoreParamgetStoreParam(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 voidinitFromNode(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 voidinitOptions(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);
	
voidinitialize(int options)


	
private voidreadObject(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 voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)

		return this.removeValue(COOKIE_PARAM, value);
	
public intremoveExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)

		return this.removeValue(EXTRA_PARAM, value);
	
public intremoveHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)

		return this.removeValue(HELPER_CLASS_PARAM, value);
	
public intremoveJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)

		return this.removeValue(JSP_PARAM, value);
	
public intremoveManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)

		return this.removeValue(MANAGER_PARAM, value);
	
public intremovePersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)

		return this.removeValue(PERSISTENCE_PARAM, value);
	
public intremoveSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)

		return this.removeValue(SESSION_PARAM, value);
	
public intremoveStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value)

		return this.removeValue(STORE_PARAM, value);
	
public voidsetCookieParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.CookieParam value)

		this.setValue(COOKIE_PARAM, index, value);
	
public voidsetCookieParam(com.sun.enterprise.tools.common.dd.webapp.data.CookieParam[] value)

		this.setValue(COOKIE_PARAM, value);
	
public voidsetExtraParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam value)

		this.setValue(EXTRA_PARAM, index, value);
	
public voidsetExtraParam(com.sun.enterprise.tools.common.dd.webapp.data.ExtraParam[] value)

		this.setValue(EXTRA_PARAM, value);
	
public voidsetHelperClassParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam value)

		this.setValue(HELPER_CLASS_PARAM, index, value);
	
public voidsetHelperClassParam(com.sun.enterprise.tools.common.dd.webapp.data.HelperClassParam[] value)

		this.setValue(HELPER_CLASS_PARAM, value);
	
public voidsetJspParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.JspParam value)

		this.setValue(JSP_PARAM, index, value);
	
public voidsetJspParam(com.sun.enterprise.tools.common.dd.webapp.data.JspParam[] value)

		this.setValue(JSP_PARAM, value);
	
public voidsetManagerParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam value)

		this.setValue(MANAGER_PARAM, index, value);
	
public voidsetManagerParam(com.sun.enterprise.tools.common.dd.webapp.data.ManagerParam[] value)

		this.setValue(MANAGER_PARAM, value);
	
public voidsetPersistenceParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam value)

		this.setValue(PERSISTENCE_PARAM, index, value);
	
public voidsetPersistenceParam(com.sun.enterprise.tools.common.dd.webapp.data.PersistenceParam[] value)

		this.setValue(PERSISTENCE_PARAM, value);
	
public voidsetSessionParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.SessionParam value)

		this.setValue(SESSION_PARAM, index, value);
	
public voidsetSessionParam(com.sun.enterprise.tools.common.dd.webapp.data.SessionParam[] value)

		this.setValue(SESSION_PARAM, value);
	
public voidsetStoreParam(int index, com.sun.enterprise.tools.common.dd.webapp.data.StoreParam value)

		this.setValue(STORE_PARAM, index, value);
	
public voidsetStoreParam(com.sun.enterprise.tools.common.dd.webapp.data.StoreParam[] value)

		this.setValue(STORE_PARAM, value);
	
public intsizeCookieParam()

		return this.size(COOKIE_PARAM);
	
public intsizeExtraParam()

		return this.size(EXTRA_PARAM);
	
public intsizeHelperClassParam()

		return this.size(HELPER_CLASS_PARAM);
	
public intsizeJspParam()

		return this.size(JSP_PARAM);
	
public intsizeManagerParam()

		return this.size(MANAGER_PARAM);
	
public intsizePersistenceParam()

		return this.size(PERSISTENCE_PARAM);
	
public intsizeSessionParam()

		return this.size(SESSION_PARAM);
	
public intsizeStoreParam()

		return this.size(STORE_PARAM);
	
public voidvalidate()

		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 voidwriteObject(java.io.ObjectOutputStream out)

		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		write(baos);
		String str = baos.toString();;
		// System.out.println("str='"+str+"'");
		out.writeUTF(str);