FileDocCategorySizeDatePackage
ManagementRule.javaAPI DocGlassfish v2 API7716Tue Feb 21 12:28:20 GMT 2006com.sun.enterprise.config.serverbeans

ManagementRule

public class ManagementRule extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class ManagementRule matches the DTD element management-rule

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
EVENT
public static final String
ACTION
public static final String
DESCRIPTION
Constructors Summary
public ManagementRule()


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(3);
		this.createProperty("event", EVENT, 
			Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			Event.class);
		this.createAttribute(EVENT, "type", "Type", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(EVENT, "record-event", "RecordEvent", 
						AttrProp.CDATA,
						null, "true");
		this.createAttribute(EVENT, "level", "Level", 
						AttrProp.CDATA,
						null, "INFO");
		this.createProperty("action", ACTION, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			Action.class);
		this.createAttribute(ACTION, "action-mbean-name", "ActionMbeanName", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createProperty("description", DESCRIPTION, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
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("Event");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getEvent();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(EVENT, 0, str, indent);

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

		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);

	
public java.lang.StringdumpBeanNode()

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

		return (Action)this.getValue(ACTION);
	
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 java.lang.StringgetDescription()
Return the Description of the Element management-rule

		return (String) getValue(ServerTags.DESCRIPTION);
	
public EventgetEvent()

		return (Event)this.getValue(EVENT);
	
public java.lang.StringgetName()
Getter for Name of the Element management-rule

return
the Name of the Element management-rule

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


	
public booleanisEnabled()
Getter for Enabled of the Element management-rule

return
the Enabled of the Element management-rule

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

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

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

		comparators.remove(c);
	
public voidsetAction(Action value)

		this.setValue(ACTION, value);
	
public voidsetDescription(java.lang.String v)
Modify the Description of the Element management-rule

param
v the new value

		setValue(ServerTags.DESCRIPTION, (null != v ? v.trim() : null));
		
public voidsetEnabled(boolean v, boolean overwrite)
Modify the Enabled of the Element management-rule

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 management-rule

param
v the new value

		setAttributeValue(ServerTags.ENABLED, ""+(v==true));
	
public voidsetEvent(Event value)

		this.setValue(EVENT, value);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element management-rule

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 management-rule

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidvalidate()