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

NodeAgent

public class NodeAgent extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class NodeAgent matches the DTD element node-agent

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
JMX_CONNECTOR
public static final String
AUTH_REALM
public static final String
LOG_SERVICE
public static final String
ELEMENT_PROPERTY
Constructors Summary
public NodeAgent()


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(4);
		this.createProperty("jmx-connector", JMX_CONNECTOR, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			JmxConnector.class);
		this.createAttribute(JMX_CONNECTOR, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(JMX_CONNECTOR, "enabled", "Enabled", 
						AttrProp.CDATA,
						null, "true");
		this.createAttribute(JMX_CONNECTOR, "protocol", "Protocol", 
						AttrProp.CDATA,
						null, "rmi_jrmp");
		this.createAttribute(JMX_CONNECTOR, "address", "Address", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(JMX_CONNECTOR, "port", "Port", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(JMX_CONNECTOR, "accept-all", "AcceptAll", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(JMX_CONNECTOR, "auth-realm-name", "AuthRealmName", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(JMX_CONNECTOR, "security-enabled", "SecurityEnabled", 
						AttrProp.CDATA,
						null, "true");
		this.createProperty("auth-realm", AUTH_REALM, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			AuthRealm.class);
		this.createAttribute(AUTH_REALM, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(AUTH_REALM, "classname", "Classname", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createProperty("log-service", LOG_SERVICE, 
			Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			LogService.class);
		this.createAttribute(LOG_SERVICE, "file", "File", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(LOG_SERVICE, "use-system-logging", "UseSystemLogging", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(LOG_SERVICE, "log-handler", "LogHandler", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(LOG_SERVICE, "log-filter", "LogFilter", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(LOG_SERVICE, "log-to-console", "LogToConsole", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(LOG_SERVICE, "log-rotation-limit-in-bytes", "LogRotationLimitInBytes", 
						AttrProp.CDATA,
						null, "500000");
		this.createAttribute(LOG_SERVICE, "log-rotation-timelimit-in-minutes", "LogRotationTimelimitInMinutes", 
						AttrProp.CDATA,
						null, "0");
		this.createAttribute(LOG_SERVICE, "alarms", "Alarms", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(LOG_SERVICE, "retain-error-statistics-for-hours", "RetainErrorStatisticsForHours", 
						AttrProp.CDATA,
						null, "5");
		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(NodeAgent.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, 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("JmxConnector");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getJmxConnector();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(JMX_CONNECTOR, 0, str, indent);

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

		str.append(indent);
		str.append("LogService");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getLogService();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(LOG_SERVICE, 0, 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("NodeAgent\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public AuthRealmgetAuthRealm()

		return (AuthRealm)this.getValue(AUTH_REALM);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.START_SERVERS_IN_STARTUP)) return "true".trim();
	return null;
	
public static java.lang.StringgetDefaultStartServersInStartup()
Get the default value of StartServersInStartup 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 JmxConnectorgetJmxConnector()

		return (JmxConnector)this.getValue(JMX_CONNECTOR);
	
public LogServicegetLogService()

		return (LogService)this.getValue(LOG_SERVICE);
	
public java.lang.StringgetName()
Getter for Name of the Element node-agent

return
the Name of the Element node-agent

		return getAttributeValue(ServerTags.NAME);
	
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 = "node-agent" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetSystemJmxConnectorName()
Getter for SystemJmxConnectorName of the Element node-agent

return
the SystemJmxConnectorName of the Element node-agent

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


	
public booleanisStartServersInStartup()
Getter for StartServersInStartup of the Element node-agent

return
the StartServersInStartup of the Element node-agent

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

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

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

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

		return new LogService();
	
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 voidsetAuthRealm(AuthRealm value)

		this.setValue(AUTH_REALM, value);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetJmxConnector(JmxConnector value)

		this.setValue(JMX_CONNECTOR, value);
	
public voidsetLogService(LogService value)

		this.setValue(LOG_SERVICE, value);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element node-agent

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 node-agent

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidsetStartServersInStartup(boolean v, boolean overwrite)
Modify the StartServersInStartup of the Element node-agent

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

		setAttributeValue(ServerTags.START_SERVERS_IN_STARTUP, ""+(v==true), overwrite);
	
public voidsetStartServersInStartup(boolean v)
Modify the StartServersInStartup of the Element node-agent

param
v the new value

		setAttributeValue(ServerTags.START_SERVERS_IN_STARTUP, ""+(v==true));
	
public voidsetSystemJmxConnectorName(java.lang.String v, boolean overwrite)
Modify the SystemJmxConnectorName of the Element node-agent

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

		setAttributeValue(ServerTags.SYSTEM_JMX_CONNECTOR_NAME, v, overwrite);
	
public voidsetSystemJmxConnectorName(java.lang.String v)
Modify the SystemJmxConnectorName of the Element node-agent

param
v the new value

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

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