FileDocCategorySizeDatePackage
JavaConfig.javaAPI DocGlassfish v2 API20920Fri May 26 10:47:08 BST 2006com.sun.enterprise.config.serverbeans

JavaConfig

public class JavaConfig extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class JavaConfig matches the DTD element java-config

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


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(3);
		this.createProperty("profiler", PROFILER, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			Profiler.class);
		this.createAttribute(PROFILER, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(PROFILER, "classpath", "Classpath", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(PROFILER, "native-library-path", "NativeLibraryPath", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(PROFILER, "enabled", "Enabled", 
						AttrProp.CDATA,
						null, "true");
		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(JavaConfig.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public intaddJvmOptions(java.lang.String value, boolean overwrite)

		return this.addValue(JVM_OPTIONS, value, overwrite);
	
public intaddJvmOptions(java.lang.String value)

		return addJvmOptions(value, true);
	
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("Profiler");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getProfiler();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(PROFILER, 0, str, indent);

		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("JavaConfig\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetBytecodePreprocessors()
Getter for BytecodePreprocessors of the Element java-config

return
the BytecodePreprocessors of the Element java-config

			return getAttributeValue(ServerTags.BYTECODE_PREPROCESSORS);
	
public java.lang.StringgetClasspathPrefix()
Getter for ClasspathPrefix of the Element java-config

return
the ClasspathPrefix of the Element java-config

			return getAttributeValue(ServerTags.CLASSPATH_PREFIX);
	
public java.lang.StringgetClasspathSuffix()
Getter for ClasspathSuffix of the Element java-config

return
the ClasspathSuffix of the Element java-config

			return getAttributeValue(ServerTags.CLASSPATH_SUFFIX);
	
public java.lang.StringgetDebugOptions()
Getter for DebugOptions of the Element java-config

return
the DebugOptions of the Element java-config

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

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.JAVA_HOME)) return "${com.sun.aas.javaRoot}".trim();
		if(attr.equals(ServerTags.DEBUG_ENABLED)) return "false".trim();
		if(attr.equals(ServerTags.DEBUG_OPTIONS)) return "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n".trim();
		if(attr.equals(ServerTags.RMIC_OPTIONS)) return "-iiop -poa -alwaysgenerate -keepgenerated -g".trim();
		if(attr.equals(ServerTags.JAVAC_OPTIONS)) return "-g".trim();
		if(attr.equals(ServerTags.ENV_CLASSPATH_IGNORED)) return "true".trim();
	return null;
	
public static java.lang.StringgetDefaultDebugEnabled()
Get the default value of DebugEnabled from dtd

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

		return "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n".trim();
	
public static java.lang.StringgetDefaultEnvClasspathIgnored()
Get the default value of EnvClasspathIgnored from dtd

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

		return "${com.sun.aas.javaRoot}".trim();
	
public static java.lang.StringgetDefaultJavacOptions()
Get the default value of JavacOptions from dtd

		return "-g".trim();
	
public static java.lang.StringgetDefaultRmicOptions()
Get the default value of RmicOptions from dtd

		return "-iiop -poa -alwaysgenerate -keepgenerated -g".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.StringgetJavaHome()
Getter for JavaHome of the Element java-config

return
the JavaHome of the Element java-config

		return getAttributeValue(ServerTags.JAVA_HOME);
	
public java.lang.StringgetJavacOptions()
Getter for JavacOptions of the Element java-config

return
the JavacOptions of the Element java-config

		return getAttributeValue(ServerTags.JAVAC_OPTIONS);
	
public java.lang.String[]getJvmOptions()

		return (String[])this.getValues(JVM_OPTIONS);
	
public java.lang.StringgetNativeLibraryPathPrefix()
Getter for NativeLibraryPathPrefix of the Element java-config

return
the NativeLibraryPathPrefix of the Element java-config

			return getAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_PREFIX);
	
public java.lang.StringgetNativeLibraryPathSuffix()
Getter for NativeLibraryPathSuffix of the Element java-config

return
the NativeLibraryPathSuffix of the Element java-config

			return getAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_SUFFIX);
	
public ProfilergetProfiler()

		return (Profiler)this.getValue(PROFILER);
	
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 = "java-config";
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetRmicOptions()
Getter for RmicOptions of the Element java-config

return
the RmicOptions of the Element java-config

		return getAttributeValue(ServerTags.RMIC_OPTIONS);
	
public java.lang.StringgetServerClasspath()
Getter for ServerClasspath of the Element java-config

return
the ServerClasspath of the Element java-config

			return getAttributeValue(ServerTags.SERVER_CLASSPATH);
	
public java.lang.StringgetSystemClasspath()
Getter for SystemClasspath of the Element java-config

return
the SystemClasspath of the Element java-config

			return getAttributeValue(ServerTags.SYSTEM_CLASSPATH);
	
voidinitialize(int options)


	
public booleanisDebugEnabled()
Getter for DebugEnabled of the Element java-config

return
the DebugEnabled of the Element java-config

		return toBoolean(getAttributeValue(ServerTags.DEBUG_ENABLED));
	
public booleanisEnvClasspathIgnored()
Getter for EnvClasspathIgnored of the Element java-config

return
the EnvClasspathIgnored of the Element java-config

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

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

		return new Profiler();
	
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)

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

		return this.removeValue(JVM_OPTIONS, value, overwrite);
	
public voidsetBytecodePreprocessors(java.lang.String v, boolean overwrite)
Modify the BytecodePreprocessors of the Element java-config

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

		setAttributeValue(ServerTags.BYTECODE_PREPROCESSORS, v, overwrite);
	
public voidsetBytecodePreprocessors(java.lang.String v)
Modify the BytecodePreprocessors of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.BYTECODE_PREPROCESSORS, v);
	
public voidsetClasspathPrefix(java.lang.String v, boolean overwrite)
Modify the ClasspathPrefix of the Element java-config

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

		setAttributeValue(ServerTags.CLASSPATH_PREFIX, v, overwrite);
	
public voidsetClasspathPrefix(java.lang.String v)
Modify the ClasspathPrefix of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.CLASSPATH_PREFIX, v);
	
public voidsetClasspathSuffix(java.lang.String v, boolean overwrite)
Modify the ClasspathSuffix of the Element java-config

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

		setAttributeValue(ServerTags.CLASSPATH_SUFFIX, v, overwrite);
	
public voidsetClasspathSuffix(java.lang.String v)
Modify the ClasspathSuffix of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.CLASSPATH_SUFFIX, v);
	
public voidsetDebugEnabled(boolean v, boolean overwrite)
Modify the DebugEnabled of the Element java-config

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

		setAttributeValue(ServerTags.DEBUG_ENABLED, ""+(v==true), overwrite);
	
public voidsetDebugEnabled(boolean v)
Modify the DebugEnabled of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.DEBUG_ENABLED, ""+(v==true));
	
public voidsetDebugOptions(java.lang.String v, boolean overwrite)
Modify the DebugOptions of the Element java-config

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

		setAttributeValue(ServerTags.DEBUG_OPTIONS, v, overwrite);
	
public voidsetDebugOptions(java.lang.String v)
Modify the DebugOptions of the Element java-config

param
v the new value

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

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetEnvClasspathIgnored(boolean v, boolean overwrite)
Modify the EnvClasspathIgnored of the Element java-config

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

		setAttributeValue(ServerTags.ENV_CLASSPATH_IGNORED, ""+(v==true), overwrite);
	
public voidsetEnvClasspathIgnored(boolean v)
Modify the EnvClasspathIgnored of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.ENV_CLASSPATH_IGNORED, ""+(v==true));
	
public voidsetJavaHome(java.lang.String v, boolean overwrite)
Modify the JavaHome of the Element java-config

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

		setAttributeValue(ServerTags.JAVA_HOME, v, overwrite);
	
public voidsetJavaHome(java.lang.String v)
Modify the JavaHome of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.JAVA_HOME, v);
	
public voidsetJavacOptions(java.lang.String v, boolean overwrite)
Modify the JavacOptions of the Element java-config

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

		setAttributeValue(ServerTags.JAVAC_OPTIONS, v, overwrite);
	
public voidsetJavacOptions(java.lang.String v)
Modify the JavacOptions of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.JAVAC_OPTIONS, v);
	
public voidsetJvmOptions(java.lang.String[] value)

		this.setValue(JVM_OPTIONS, value);
	
public voidsetNativeLibraryPathPrefix(java.lang.String v, boolean overwrite)
Modify the NativeLibraryPathPrefix of the Element java-config

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

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_PREFIX, v, overwrite);
	
public voidsetNativeLibraryPathPrefix(java.lang.String v)
Modify the NativeLibraryPathPrefix of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_PREFIX, v);
	
public voidsetNativeLibraryPathSuffix(java.lang.String v, boolean overwrite)
Modify the NativeLibraryPathSuffix of the Element java-config

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

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_SUFFIX, v, overwrite);
	
public voidsetNativeLibraryPathSuffix(java.lang.String v)
Modify the NativeLibraryPathSuffix of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.NATIVE_LIBRARY_PATH_SUFFIX, v);
	
public voidsetProfiler(Profiler value)

		this.setValue(PROFILER, value);
	
public voidsetRmicOptions(java.lang.String v, boolean overwrite)
Modify the RmicOptions of the Element java-config

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

		setAttributeValue(ServerTags.RMIC_OPTIONS, v, overwrite);
	
public voidsetRmicOptions(java.lang.String v)
Modify the RmicOptions of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.RMIC_OPTIONS, v);
	
public voidsetServerClasspath(java.lang.String v, boolean overwrite)
Modify the ServerClasspath of the Element java-config

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

		setAttributeValue(ServerTags.SERVER_CLASSPATH, v, overwrite);
	
public voidsetServerClasspath(java.lang.String v)
Modify the ServerClasspath of the Element java-config

param
v the new value

		setAttributeValue(ServerTags.SERVER_CLASSPATH, v);
	
public voidsetSystemClasspath(java.lang.String v, boolean overwrite)
Modify the SystemClasspath of the Element java-config

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

		setAttributeValue(ServerTags.SYSTEM_CLASSPATH, v, overwrite);
	
public voidsetSystemClasspath(java.lang.String v)
Modify the SystemClasspath of the Element java-config

param
v the new value

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

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

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