ManagementRulepublic class ManagementRule extends com.sun.enterprise.config.ConfigBean implements SerializableThis 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 void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public void | dump(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.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ManagementRule\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public Action | getAction()
return (Action)this.getValue(ACTION);
| public static java.lang.String | getDefaultAttributeValue(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.String | getDefaultEnabled()Get the default value of Enabled from dtd
return "true".trim();
| public java.lang.String | getDescription()Return the Description of the Element management-rule
return (String) getValue(ServerTags.DESCRIPTION);
| public Event | getEvent()
return (Event)this.getValue(EVENT);
| public java.lang.String | getName()Getter for Name of the Element management-rule
return getAttributeValue(ServerTags.NAME);
| protected java.lang.String | getRelativeXPath()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);
| void | initialize(int options)
| public boolean | isEnabled()Getter for Enabled of the Element management-rule
return toBoolean(getAttributeValue(ServerTags.ENABLED));
| public Action | newAction()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new Action();
| public Event | newEvent()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new Event();
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public void | setAction(Action value)
this.setValue(ACTION, value);
| public void | setDescription(java.lang.String v)Modify the Description of the Element management-rule
setValue(ServerTags.DESCRIPTION, (null != v ? v.trim() : null));
| public void | setEnabled(boolean v, boolean overwrite)Modify the Enabled of the Element management-rule
setAttributeValue(ServerTags.ENABLED, ""+(v==true), overwrite);
| public void | setEnabled(boolean v)Modify the Enabled of the Element management-rule
setAttributeValue(ServerTags.ENABLED, ""+(v==true));
| public void | setEvent(Event value)
this.setValue(EVENT, value);
| public void | setName(java.lang.String v, boolean overwrite)Modify the Name of the Element management-rule
setAttributeValue(ServerTags.NAME, v, overwrite);
| public void | setName(java.lang.String v)Modify the Name of the Element management-rule
setAttributeValue(ServerTags.NAME, v);
| public void | validate()
|
|