FileDocCategorySizeDatePackage
J2eeApplication.javaAPI DocGlassfish v2 API17948Tue Apr 03 16:25:18 BST 2007com.sun.enterprise.config.serverbeans

J2eeApplication

public class J2eeApplication extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class J2eeApplication matches the DTD element j2ee-application

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
DESCRIPTION
public static final String
WEB_SERVICE_ENDPOINT
public static final String
ELEMENT_PROPERTY
Constructors Summary
public J2eeApplication()


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(3);
		this.createProperty("description", DESCRIPTION, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("web-service-endpoint", WEB_SERVICE_ENDPOINT, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			WebServiceEndpoint.class);
		this.createAttribute(WEB_SERVICE_ENDPOINT, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(WEB_SERVICE_ENDPOINT, "monitoring", "Monitoring", 
						AttrProp.CDATA,
						null, "OFF");
		this.createAttribute(WEB_SERVICE_ENDPOINT, "max-history-size", "MaxHistorySize", 
						AttrProp.CDATA,
						null, "25");
		this.createAttribute(WEB_SERVICE_ENDPOINT, "jbi-enabled", "JbiEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.createProperty("property", ELEMENT_PROPERTY, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ElementProperty.class);
		this.createAttribute(ELEMENT_PROPERTY, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(ELEMENT_PROPERTY, "value", "Value", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddElementProperty(ElementProperty value)

		return addElementProperty(value, true);
	
public intaddElementProperty(ElementProperty value, boolean overwrite)

		ElementProperty old = getElementPropertyByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(J2eeApplication.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public intaddWebServiceEndpoint(WebServiceEndpoint value)

		return addWebServiceEndpoint(value, true);
	
public intaddWebServiceEndpoint(WebServiceEndpoint value, boolean overwrite)

		WebServiceEndpoint old = getWebServiceEndpointByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(J2eeApplication.class).getString("cannotAddDuplicate",  "WebServiceEndpoint"));
		}
		return this.addValue(WEB_SERVICE_ENDPOINT, value, overwrite);
	
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("Description");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		o = this.getDescription();
		str.append((o==null?"null":o.toString().trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(DESCRIPTION, 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(WEB_SERVICE_ENDPOINT, i, str, indent);
		}

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

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("J2eeApplication\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.OBJECT_TYPE)) return "user".trim();
		if(attr.equals(ServerTags.ENABLED)) return "true".trim();
		if(attr.equals(ServerTags.AVAILABILITY_ENABLED)) return "false".trim();
		if(attr.equals(ServerTags.DIRECTORY_DEPLOYED)) return "false".trim();
		if(attr.equals(ServerTags.JAVA_WEB_START_ENABLED)) return "true".trim();
	return null;
	
public static java.lang.StringgetDefaultAvailabilityEnabled()
Get the default value of AvailabilityEnabled from dtd

		return "false".trim();
	
public static java.lang.StringgetDefaultDirectoryDeployed()
Get the default value of DirectoryDeployed from dtd

		return "false".trim();
	
public static java.lang.StringgetDefaultEnabled()
Get the default value of Enabled from dtd

		return "true".trim();
	
public static java.lang.StringgetDefaultJavaWebStartEnabled()
Get the default value of JavaWebStartEnabled from dtd

		return "true".trim();
	
public static java.lang.StringgetDefaultObjectType()
Get the default value of ObjectType from dtd

		return "user".trim();
	
public java.lang.StringgetDescription()
Return the Description of the Element j2ee-application

		return (String) getValue(ServerTags.DESCRIPTION);
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementPropertyByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	ElementProperty[] o = getElementProperty();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetLibraries()
Getter for Libraries of the Element j2ee-application

return
the Libraries of the Element j2ee-application

			return getAttributeValue(ServerTags.LIBRARIES);
	
public java.lang.StringgetLocation()
Getter for Location of the Element j2ee-application

return
the Location of the Element j2ee-application

		return getAttributeValue(ServerTags.LOCATION);
	
public java.lang.StringgetName()
Getter for Name of the Element j2ee-application

return
the Name of the Element j2ee-application

		return getAttributeValue(ServerTags.NAME);
	
public java.lang.StringgetObjectType()
Getter for ObjectType of the Element j2ee-application

return
the ObjectType of the Element j2ee-application

		return getAttributeValue(ServerTags.OBJECT_TYPE);
	
protected java.lang.StringgetRelativeXPath()
get the xpath representation for this element returns something like abc[@name='value'] or abc depending on the type of the bean

	    String ret = null;
	    ret = "j2ee-application" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
	    return (null != ret ? ret.trim() : null);
	
public WebServiceEndpointgetWebServiceEndpoint(int index)

		return (WebServiceEndpoint)this.getValue(WEB_SERVICE_ENDPOINT, index);
	
public WebServiceEndpoint[]getWebServiceEndpoint()

		return (WebServiceEndpoint[])this.getValues(WEB_SERVICE_ENDPOINT);
	
public WebServiceEndpointgetWebServiceEndpointByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	WebServiceEndpoint[] o = getWebServiceEndpoint();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
voidinitialize(int options)


	
public booleanisAvailabilityEnabled()
Getter for AvailabilityEnabled of the Element j2ee-application

return
the AvailabilityEnabled of the Element j2ee-application

		return toBoolean(getAttributeValue(ServerTags.AVAILABILITY_ENABLED));
	
public booleanisDirectoryDeployed()
Getter for DirectoryDeployed of the Element j2ee-application

return
the DirectoryDeployed of the Element j2ee-application

		return toBoolean(getAttributeValue(ServerTags.DIRECTORY_DEPLOYED));
	
public booleanisEnabled()
Getter for Enabled of the Element j2ee-application

return
the Enabled of the Element j2ee-application

		return toBoolean(getAttributeValue(ServerTags.ENABLED));
	
public booleanisJavaWebStartEnabled()
Getter for JavaWebStartEnabled of the Element j2ee-application

return
the JavaWebStartEnabled of the Element j2ee-application

		return toBoolean(getAttributeValue(ServerTags.JAVA_WEB_START_ENABLED));
	
public ElementPropertynewElementProperty()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new ElementProperty();
	
public WebServiceEndpointnewWebServiceEndpoint()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new WebServiceEndpoint();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveElementProperty(ElementProperty value)

		return this.removeValue(ELEMENT_PROPERTY, value);
	
public intremoveElementProperty(ElementProperty value, boolean overwrite)

		return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
	
public intremoveWebServiceEndpoint(WebServiceEndpoint value)

		return this.removeValue(WEB_SERVICE_ENDPOINT, value);
	
public intremoveWebServiceEndpoint(WebServiceEndpoint value, boolean overwrite)

		return this.removeValue(WEB_SERVICE_ENDPOINT, value, overwrite);
	
public voidsetAvailabilityEnabled(boolean v, boolean overwrite)
Modify the AvailabilityEnabled of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.AVAILABILITY_ENABLED, ""+(v==true), overwrite);
	
public voidsetAvailabilityEnabled(boolean v)
Modify the AvailabilityEnabled of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.AVAILABILITY_ENABLED, ""+(v==true));
	
public voidsetDescription(java.lang.String v)
Modify the Description of the Element j2ee-application

param
v the new value

		setValue(ServerTags.DESCRIPTION, (null != v ? v.trim() : null));
		
public voidsetDirectoryDeployed(boolean v, boolean overwrite)
Modify the DirectoryDeployed of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.DIRECTORY_DEPLOYED, ""+(v==true), overwrite);
	
public voidsetDirectoryDeployed(boolean v)
Modify the DirectoryDeployed of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.DIRECTORY_DEPLOYED, ""+(v==true));
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetEnabled(boolean v, boolean overwrite)
Modify the Enabled of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ENABLED, ""+(v==true), overwrite);
	
public voidsetEnabled(boolean v)
Modify the Enabled of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.ENABLED, ""+(v==true));
	
public voidsetJavaWebStartEnabled(boolean v, boolean overwrite)
Modify the JavaWebStartEnabled of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.JAVA_WEB_START_ENABLED, ""+(v==true), overwrite);
	
public voidsetJavaWebStartEnabled(boolean v)
Modify the JavaWebStartEnabled of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.JAVA_WEB_START_ENABLED, ""+(v==true));
	
public voidsetLibraries(java.lang.String v, boolean overwrite)
Modify the Libraries of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LIBRARIES, v, overwrite);
	
public voidsetLibraries(java.lang.String v)
Modify the Libraries of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.LIBRARIES, v);
	
public voidsetLocation(java.lang.String v, boolean overwrite)
Modify the Location of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOCATION, v, overwrite);
	
public voidsetLocation(java.lang.String v)
Modify the Location of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.LOCATION, v);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.NAME, v, overwrite);
	
public voidsetName(java.lang.String v)
Modify the Name of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidsetObjectType(java.lang.String v, boolean overwrite)
Modify the ObjectType of the Element j2ee-application

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.OBJECT_TYPE, v, overwrite);
	
public voidsetObjectType(java.lang.String v)
Modify the ObjectType of the Element j2ee-application

param
v the new value

		setAttributeValue(ServerTags.OBJECT_TYPE, v);
	
public voidsetWebServiceEndpoint(WebServiceEndpoint[] value)

		this.setValue(WEB_SERVICE_ENDPOINT, value);
	
public intsizeElementProperty()

		return this.size(ELEMENT_PROPERTY);
	
public intsizeWebServiceEndpoint()

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