FileDocCategorySizeDatePackage
SunApplicationClient.javaAPI DocGlassfish v2 API23482Fri May 04 22:34:40 BST 2007com.sun.enterprise.tools.common.dd.appclient

SunApplicationClient

public class SunApplicationClient extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class SunApplicationClient matches the schema element sun-application-client Generated on Thu Jul 31 15:53:12 PDT 2003 This class matches the root element of the DTD, and is the root of the following bean graph: sun-application-client : SunApplicationClient ejb-ref : EjbRef[0,n] ejb-ref-name : String jndi-name : String resource-ref : ResourceRef[0,n] res-ref-name : String jndi-name : String default-resource-principal : DefaultResourcePrincipal? name : String password : String resource-env-ref : ResourceEnvRef[0,n] resource-env-ref-name : String jndi-name : String service-ref : ServiceRef[0,n] service-ref-name : String port-info : PortInfo[0,n] service-endpoint-interface : String? wsdl-port : WsdlPort? namespaceURI : String localpart : String stub-property : StubProperty[0,n] name : String value : String call-property : CallProperty[0,n] name : String value : String call-property : CallProperty[0,n] name : String value : String wsdl-override : String? service-impl-class : String? service-qname : ServiceQname? namespaceURI : String localpart : String message-destination : MessageDestination[0,n] message-destination-name : String jndi-name : String

Fields Summary
static Vector
comparators
public static final String
EJB_REF
public static final String
RESOURCE_REF
public static final String
RESOURCE_ENV_REF
public static final String
SERVICE_REF
public static final String
MESSAGE_DESTINATION
Constructors Summary
public SunApplicationClient()

	// NOI18N

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

		this(Common.NO_DEFAULT_VALUES);
		initFromNode(doc, options);
	
public SunApplicationClient(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 intaddEjbRef(com.sun.enterprise.tools.common.dd.EjbRef value)

		return this.addValue(EJB_REF, value);
	
public intaddMessageDestination(com.sun.enterprise.tools.common.dd.MessageDestination value)

		return this.addValue(MESSAGE_DESTINATION, value);
	
public intaddResourceEnvRef(com.sun.enterprise.tools.common.dd.ResourceEnvRef value)

		return this.addValue(RESOURCE_ENV_REF, value);
	
public intaddResourceRef(com.sun.enterprise.tools.common.dd.ResourceRef value)

		return this.addValue(RESOURCE_REF, value);
	
public intaddServiceRef(com.sun.enterprise.tools.common.dd.ServiceRef value)

		return this.addValue(SERVICE_REF, value);
	
public static com.sun.enterprise.tools.common.dd.appclient.SunApplicationClientcreateGraph(org.w3c.dom.Node doc)

		return new SunApplicationClient(doc, Common.NO_DEFAULT_VALUES);
	
public static com.sun.enterprise.tools.common.dd.appclient.SunApplicationClientcreateGraph(java.io.InputStream in)

		return createGraph(in, false);
	
public static com.sun.enterprise.tools.common.dd.appclient.SunApplicationClientcreateGraph(java.io.InputStream in, boolean validate)

		Document doc = GraphManager.createXmlDocument(in, validate);
		return createGraph(doc);
	
public static com.sun.enterprise.tools.common.dd.appclient.SunApplicationClientcreateGraph()

		try {
			return new SunApplicationClient();
		}
		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("EjbRef["+this.sizeEjbRef()+"]");	// NOI18N
		for(int i=0; i<this.sizeEjbRef(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getEjbRef(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(EJB_REF, i, str, indent);
		}

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

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

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

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

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("SunApplicationClient\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public com.sun.enterprise.tools.common.dd.EjbRef[]getEjbRef()

		return (EjbRef[])this.getValues(EJB_REF);
	
public com.sun.enterprise.tools.common.dd.EjbRefgetEjbRef(int index)

		return (EjbRef)this.getValue(EJB_REF, index);
	
public com.sun.enterprise.tools.common.dd.MessageDestinationgetMessageDestination(int index)

		return (MessageDestination)this.getValue(MESSAGE_DESTINATION, index);
	
public com.sun.enterprise.tools.common.dd.MessageDestination[]getMessageDestination()

		return (MessageDestination[])this.getValues(MESSAGE_DESTINATION);
	
public com.sun.enterprise.tools.common.dd.ResourceEnvRefgetResourceEnvRef(int index)

		return (ResourceEnvRef)this.getValue(RESOURCE_ENV_REF, index);
	
public com.sun.enterprise.tools.common.dd.ResourceEnvRef[]getResourceEnvRef()

		return (ResourceEnvRef[])this.getValues(RESOURCE_ENV_REF);
	
public com.sun.enterprise.tools.common.dd.ResourceRefgetResourceRef(int index)

		return (ResourceRef)this.getValue(RESOURCE_REF, index);
	
public com.sun.enterprise.tools.common.dd.ResourceRef[]getResourceRef()

		return (ResourceRef[])this.getValues(RESOURCE_REF);
	
public com.sun.enterprise.tools.common.dd.ServiceRefgetServiceRef(int index)

		return (ServiceRef)this.getValue(SERVICE_REF, index);
	
public com.sun.enterprise.tools.common.dd.ServiceRef[]getServiceRef()

		return (ServiceRef[])this.getValues(SERVICE_REF);
	
protected voidinitFromNode(org.w3c.dom.Node doc, int options)

		if (doc == null)
		{
			doc = GraphManager.createRootElementNode("sun-application-client");	// NOI18N
			if (doc == null)
				throw new Schema2BeansException(Common.getMessage(
					"CantCreateDOMRoot_msg", "sun-application-client"));
		}
		Node n = GraphManager.getElementNode("sun-application-client", doc);	// NOI18N
		if (n == null)
			throw new Schema2BeansException(Common.getMessage(
				"DocRootNotInDOMGraph_msg", "sun-application-client", 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-application-client", "SunApplicationClient",	// NOI18N
			Common.TYPE_1 | Common.TYPE_BEAN, SunApplicationClient.class);

		// Properties (see root bean comments for the bean graph)
		this.createProperty("ejb-ref", 	// NOI18N
			EJB_REF, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			EjbRef.class);
		this.createProperty("resource-ref", 	// NOI18N
			RESOURCE_REF, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ResourceRef.class);
		this.createProperty("resource-env-ref", 	// NOI18N
			RESOURCE_ENV_REF, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ResourceEnvRef.class);
		this.createProperty("service-ref", 	// NOI18N
			SERVICE_REF, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ServiceRef.class);
		this.createProperty("message-destination", 	// NOI18N
			MESSAGE_DESTINATION, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			MessageDestination.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 intremoveEjbRef(com.sun.enterprise.tools.common.dd.EjbRef value)

		return this.removeValue(EJB_REF, value);
	
public intremoveMessageDestination(com.sun.enterprise.tools.common.dd.MessageDestination value)

		return this.removeValue(MESSAGE_DESTINATION, value);
	
public intremoveResourceEnvRef(com.sun.enterprise.tools.common.dd.ResourceEnvRef value)

		return this.removeValue(RESOURCE_ENV_REF, value);
	
public intremoveResourceRef(com.sun.enterprise.tools.common.dd.ResourceRef value)

		return this.removeValue(RESOURCE_REF, value);
	
public intremoveServiceRef(com.sun.enterprise.tools.common.dd.ServiceRef value)

		return this.removeValue(SERVICE_REF, value);
	
public voidsetEjbRef(int index, com.sun.enterprise.tools.common.dd.EjbRef value)

		this.setValue(EJB_REF, index, value);
	
public voidsetEjbRef(com.sun.enterprise.tools.common.dd.EjbRef[] value)

		this.setValue(EJB_REF, value);
	
public voidsetMessageDestination(int index, com.sun.enterprise.tools.common.dd.MessageDestination value)

		this.setValue(MESSAGE_DESTINATION, index, value);
	
public voidsetMessageDestination(com.sun.enterprise.tools.common.dd.MessageDestination[] value)

		this.setValue(MESSAGE_DESTINATION, value);
	
public voidsetResourceEnvRef(int index, com.sun.enterprise.tools.common.dd.ResourceEnvRef value)

		this.setValue(RESOURCE_ENV_REF, index, value);
	
public voidsetResourceEnvRef(com.sun.enterprise.tools.common.dd.ResourceEnvRef[] value)

		this.setValue(RESOURCE_ENV_REF, value);
	
public voidsetResourceRef(int index, com.sun.enterprise.tools.common.dd.ResourceRef value)

		this.setValue(RESOURCE_REF, index, value);
	
public voidsetResourceRef(com.sun.enterprise.tools.common.dd.ResourceRef[] value)

		this.setValue(RESOURCE_REF, value);
	
public voidsetServiceRef(int index, com.sun.enterprise.tools.common.dd.ServiceRef value)

		this.setValue(SERVICE_REF, index, value);
	
public voidsetServiceRef(com.sun.enterprise.tools.common.dd.ServiceRef[] value)

		this.setValue(SERVICE_REF, value);
	
public intsizeEjbRef()

		return this.size(EJB_REF);
	
public intsizeMessageDestination()

		return this.size(MESSAGE_DESTINATION);
	
public intsizeResourceEnvRef()

		return this.size(RESOURCE_ENV_REF);
	
public intsizeResourceRef()

		return this.size(RESOURCE_REF);
	
public intsizeServiceRef()

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

		boolean restrictionFailure = false;
		// Validating property ejbRef
		for (int _index = 0; _index < sizeEjbRef(); ++_index) {
			EjbRef element = getEjbRef(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property resourceRef
		for (int _index = 0; _index < sizeResourceRef(); ++_index) {
			ResourceRef element = getResourceRef(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property resourceEnvRef
		for (int _index = 0; _index < sizeResourceEnvRef(); ++_index) {
			ResourceEnvRef element = getResourceEnvRef(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property serviceRef
		for (int _index = 0; _index < sizeServiceRef(); ++_index) {
			ServiceRef element = getServiceRef(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property messageDestination
		for (int _index = 0; _index < sizeMessageDestination(); ++_index) {
			MessageDestination element = getMessageDestination(_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);