FileDocCategorySizeDatePackage
EnterpriseBeans.javaAPI DocGlassfish v2 API12748Fri May 04 22:34:40 BST 2007com.sun.enterprise.tools.common.dd.ejb

EnterpriseBeans

public class EnterpriseBeans extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class EnterpriseBeans matches the schema element enterprise-beans Generated on Wed Mar 03 14:29:49 PST 2004

Fields Summary
static Vector
comparators
public static final String
NAME
public static final String
UNIQUE_ID
public static final String
EJB
public static final String
PM_DESCRIPTORS
public static final String
CMP_RESOURCE
public static final String
MESSAGE_DESTINATION
public static final String
WEBSERVICE_DESCRIPTION
Constructors Summary
public EnterpriseBeans()

	// NOI18N

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

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("name", 	// NOI18N
			NAME, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("unique-id", 	// NOI18N
			UNIQUE_ID, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("ejb", 	// NOI18N
			EJB, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			Ejb.class);
		this.createAttribute(EJB, "availability-enabled", "AvailabilityEnabled", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createProperty("pm-descriptors", 	// NOI18N
			PM_DESCRIPTORS, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			PmDescriptors.class);
		this.createProperty("cmp-resource", 	// NOI18N
			CMP_RESOURCE, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			CmpResource.class);
		this.createProperty("message-destination", 	// NOI18N
			MESSAGE_DESTINATION, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			MessageDestination.class);
		this.createProperty("webservice-description", 	// NOI18N
			WEBSERVICE_DESCRIPTION, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			WebserviceDescription.class);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddEjb(Ejb value)

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

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

		return this.addValue(WEBSERVICE_DESCRIPTION, 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("Name");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getName();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(NAME, 0, str, indent);

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

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

		str.append(indent);
		str.append("PmDescriptors");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getPmDescriptors();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(PM_DESCRIPTORS, 0, str, indent);

		str.append(indent);
		str.append("CmpResource");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getCmpResource();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(CMP_RESOURCE, 0, 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);
		}

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

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("EnterpriseBeans\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public CmpResourcegetCmpResource()

		return (CmpResource)this.getValue(CMP_RESOURCE);
	
public Ejb[]getEjb()

		return (Ejb[])this.getValues(EJB);
	
public EjbgetEjb(int index)

		return (Ejb)this.getValue(EJB, 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 java.lang.StringgetName()

		return (String)this.getValue(NAME);
	
public PmDescriptorsgetPmDescriptors()

		return (PmDescriptors)this.getValue(PM_DESCRIPTORS);
	
public java.lang.StringgetUniqueId()

		return (String)this.getValue(UNIQUE_ID);
	
public com.sun.enterprise.tools.common.dd.WebserviceDescriptiongetWebserviceDescription(int index)

		return (WebserviceDescription)this.getValue(WEBSERVICE_DESCRIPTION, index);
	
public com.sun.enterprise.tools.common.dd.WebserviceDescription[]getWebserviceDescription()

		return (WebserviceDescription[])this.getValues(WEBSERVICE_DESCRIPTION);
	
voidinitialize(int options)

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

		comparators.remove(c);
	
public intremoveEjb(Ejb value)

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

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

		return this.removeValue(WEBSERVICE_DESCRIPTION, value);
	
public voidsetCmpResource(CmpResource value)

		this.setValue(CMP_RESOURCE, value);
	
public voidsetEjb(Ejb[] value)

		this.setValue(EJB, value);
	
public voidsetEjb(int index, Ejb value)

		this.setValue(EJB, index, 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 voidsetName(java.lang.String value)

		this.setValue(NAME, value);
	
public voidsetPmDescriptors(PmDescriptors value)

		this.setValue(PM_DESCRIPTORS, value);
	
public voidsetUniqueId(java.lang.String value)

		this.setValue(UNIQUE_ID, value);
	
public voidsetWebserviceDescription(int index, com.sun.enterprise.tools.common.dd.WebserviceDescription value)

		this.setValue(WEBSERVICE_DESCRIPTION, index, value);
	
public voidsetWebserviceDescription(com.sun.enterprise.tools.common.dd.WebserviceDescription[] value)

		this.setValue(WEBSERVICE_DESCRIPTION, value);
	
public intsizeEjb()

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

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

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

		boolean restrictionFailure = false;
		// Validating property name
		if (getName() != null) {
		}
		// Validating property uniqueId
		if (getUniqueId() != null) {
		}
		// Validating property ejb
		for (int _index = 0; _index < sizeEjb(); ++_index) {
			Ejb element = getEjb(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property pmDescriptors
		if (getPmDescriptors() != null) {
			getPmDescriptors().validate();
		}
		// Validating property cmpResource
		if (getCmpResource() != null) {
			getCmpResource().validate();
		}
		// Validating property messageDestination
		for (int _index = 0; _index < sizeMessageDestination(); ++_index) {
			MessageDestination element = getMessageDestination(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property webserviceDescription
		for (int _index = 0; _index < sizeWebserviceDescription(); 
			++_index) {
			WebserviceDescription element = getWebserviceDescription(_index);
			if (element != null) {
				element.validate();
			}
		}