FileDocCategorySizeDatePackage
Profiler.javaAPI DocGlassfish v2 API11220Fri May 26 10:47:10 BST 2006com.sun.enterprise.config.serverbeans

Profiler

public class Profiler extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class Profiler matches the DTD element profiler

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


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(2);
		this.createProperty("jvm-options", JVM_OPTIONS, Common.SEQUENCE_OR | 
			Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("property", ELEMENT_PROPERTY, Common.SEQUENCE_OR | 
			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(Profiler.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public intaddJvmOptions(java.lang.String value)

		return addJvmOptions(value, true);
	
public intaddJvmOptions(java.lang.String value, boolean overwrite)

		return this.addValue(JVM_OPTIONS, 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("JvmOptions["+this.sizeJvmOptions()+"]");	// NOI18N
		for(int i=0; i<this.sizeJvmOptions(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			str.append(indent+"\t");	// NOI18N
			str.append("<");	// NOI18N
			o = this.getValue(JVM_OPTIONS, i);
			str.append((o==null?"null":o.toString().trim()));	// NOI18N
			str.append(">\n");	// NOI18N
			this.dumpAttributes(JVM_OPTIONS, 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("Profiler\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetClasspath()
Getter for Classpath of the Element profiler

return
the Classpath of the Element profiler

			return getAttributeValue(ServerTags.CLASSPATH);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.ENABLED)) return "true".trim();
	return null;
	
public static java.lang.StringgetDefaultEnabled()
Get the default value of Enabled from dtd

		return "true".trim();
	
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.String[]getJvmOptions()

		return (String[])this.getValues(JVM_OPTIONS);
	
public java.lang.StringgetName()
Getter for Name of the Element profiler

return
the Name of the Element profiler

		return getAttributeValue(ServerTags.NAME);
	
public java.lang.StringgetNativeLibraryPath()
Getter for NativeLibraryPath of the Element profiler

return
the NativeLibraryPath of the Element profiler

			return getAttributeValue(ServerTags.NATIVE_LIBRARY_PATH);
	
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 = "profiler" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
	    return (null != ret ? ret.trim() : null);
	
voidinitialize(int options)


	
public booleanisEnabled()
Getter for Enabled of the Element profiler

return
the Enabled of the Element profiler

		return toBoolean(getAttributeValue(ServerTags.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 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 intremoveJvmOptions(java.lang.String value, boolean overwrite)

		return this.removeValue(JVM_OPTIONS, value, overwrite);
	
public intremoveJvmOptions(java.lang.String value)

		return this.removeValue(JVM_OPTIONS, value);
	
public voidsetClasspath(java.lang.String v, boolean overwrite)
Modify the Classpath of the Element profiler

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

		setAttributeValue(ServerTags.CLASSPATH, v, overwrite);
	
public voidsetClasspath(java.lang.String v)
Modify the Classpath of the Element profiler

param
v the new value

		setAttributeValue(ServerTags.CLASSPATH, v);
	
public voidsetElementProperty(ElementProperty[] value)

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

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 profiler

param
v the new value

		setAttributeValue(ServerTags.ENABLED, ""+(v==true));
	
public voidsetJvmOptions(java.lang.String[] value)

		this.setValue(JVM_OPTIONS, value);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element profiler

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 profiler

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidsetNativeLibraryPath(java.lang.String v, boolean overwrite)
Modify the NativeLibraryPath of the Element profiler

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

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH, v, overwrite);
	
public voidsetNativeLibraryPath(java.lang.String v)
Modify the NativeLibraryPath of the Element profiler

param
v the new value

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH, v);
	
public intsizeElementProperty()

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

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