FileDocCategorySizeDatePackage
Servlet.javaAPI DocGlassfish v2 API24587Fri May 04 22:34:42 BST 2007com.sun.enterprise.tools.common.dd.webapp

Servlet

public class Servlet extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class Servlet matches the schema element servlet Generated on Tue Sep 02 18:08:42 PDT 2003

Fields Summary
static Vector
comparators
public static final String
SERVLET_NAME
public static final String
PRINCIPAL_NAME
public static final String
WEBSERVICE_ENDPOINT
Constructors Summary
public Servlet()

	// NOI18N

	  
		this(Common.USE_DEFAULT_VALUES);
	
public Servlet(int options)

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("servlet-name", 	// NOI18N
			SERVLET_NAME, 
			Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("principal-name", 	// NOI18N
			PRINCIPAL_NAME, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("webservice-endpoint", 	// NOI18N
			WEBSERVICE_ENDPOINT, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			WebserviceEndpoint.class);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddWebserviceEndpoint(com.sun.enterprise.tools.common.dd.WebserviceEndpoint value)

		return this.addValue(WEBSERVICE_ENDPOINT, value);
	
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("ServletName");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getServletName();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(SERVLET_NAME, 0, str, indent);

		str.append(indent);
		str.append("PrincipalName");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getPrincipalName();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(PRINCIPAL_NAME, 0, str, indent);

		str.append(indent);
		str.append("WebserviceEndpoint["+this.sizeWebserviceEndpoint()+"]");	// NOI18N
		for(int i=0; i<this.sizeWebserviceEndpoint(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebserviceEndpoint(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(WEBSERVICE_ENDPOINT, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("Servlet\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetPrincipalName()

		return (String)this.getValue(PRINCIPAL_NAME);
	
public java.lang.StringgetServletName()

		return (String)this.getValue(SERVLET_NAME);
	
public com.sun.enterprise.tools.common.dd.WebserviceEndpoint[]getWebserviceEndpoint()

		return (WebserviceEndpoint[])this.getValues(WEBSERVICE_ENDPOINT);
	
public com.sun.enterprise.tools.common.dd.WebserviceEndpointgetWebserviceEndpoint(int index)

		return (WebserviceEndpoint)this.getValue(WEBSERVICE_ENDPOINT, index);
	
voidinitialize(int options)

		
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveWebserviceEndpoint(com.sun.enterprise.tools.common.dd.WebserviceEndpoint value)

		return this.removeValue(WEBSERVICE_ENDPOINT, value);
	
public voidsetPrincipalName(java.lang.String value)

		this.setValue(PRINCIPAL_NAME, value);
	
public voidsetServletName(java.lang.String value)

		this.setValue(SERVLET_NAME, value);
	
public voidsetWebserviceEndpoint(com.sun.enterprise.tools.common.dd.WebserviceEndpoint[] value)

		this.setValue(WEBSERVICE_ENDPOINT, value);
	
public voidsetWebserviceEndpoint(int index, com.sun.enterprise.tools.common.dd.WebserviceEndpoint value)

		this.setValue(WEBSERVICE_ENDPOINT, index, value);
	
public intsizeWebserviceEndpoint()

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

		boolean restrictionFailure = false;
		// Validating property servletName
		if (getServletName() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getServletName() == null", "servletName", this);	// NOI18N
		}
		// Validating property principalName
		if (getPrincipalName() != null) {
		}
		// Validating property webserviceEndpoint
		for (int _index = 0; _index < sizeWebserviceEndpoint(); ++_index) {
			WebserviceEndpoint element = getWebserviceEndpoint(_index);
			if (element != null) {
				element.validate();
			}
		}