Constructors Summary |
---|
public ManagementRules()
this(Common.USE_DEFAULT_VALUES);
|
public ManagementRules(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(1);
this.createProperty("management-rule", MANAGEMENT_RULE,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ManagementRule.class);
this.createAttribute(MANAGEMENT_RULE, "name", "Name",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(MANAGEMENT_RULE, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addManagementRule(ManagementRule value)
return addManagementRule(value, true);
|
public int | addManagementRule(ManagementRule value, boolean overwrite)
ManagementRule old = getManagementRuleByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(ManagementRules.class).getString("cannotAddDuplicate", "ManagementRule"));
}
return this.addValue(MANAGEMENT_RULE, value, overwrite);
|
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("ManagementRule["+this.sizeManagementRule()+"]"); // NOI18N
for(int i=0; i<this.sizeManagementRule(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getManagementRule(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(MANAGEMENT_RULE, i, str, indent);
}
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ManagementRules\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
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 ManagementRule | getManagementRule(int index)
return (ManagementRule)this.getValue(MANAGEMENT_RULE, index);
|
public ManagementRule[] | getManagementRule()
return (ManagementRule[])this.getValues(MANAGEMENT_RULE);
|
public ManagementRule | getManagementRuleByName(java.lang.String id)
if (null != id) { id = id.trim(); }
ManagementRule[] o = getManagementRule();
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;
|
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-rules";
return (null != ret ? ret.trim() : null);
|
void | initialize(int options)
|
public boolean | isEnabled()Getter for Enabled of the Element management-rules
return toBoolean(getAttributeValue(ServerTags.ENABLED));
|
public ManagementRule | newManagementRule()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ManagementRule();
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removeManagementRule(ManagementRule value)
return this.removeValue(MANAGEMENT_RULE, value);
|
public int | removeManagementRule(ManagementRule value, boolean overwrite)
return this.removeValue(MANAGEMENT_RULE, value, overwrite);
|
public void | setEnabled(boolean v, boolean overwrite)Modify the Enabled of the Element management-rules
setAttributeValue(ServerTags.ENABLED, ""+(v==true), overwrite);
|
public void | setEnabled(boolean v)Modify the Enabled of the Element management-rules
setAttributeValue(ServerTags.ENABLED, ""+(v==true));
|
public void | setManagementRule(ManagementRule[] value)
this.setValue(MANAGEMENT_RULE, value);
|
public int | sizeManagementRule()
return this.size(MANAGEMENT_RULE);
|
public void | validate()
|