Constructors Summary |
---|
public ServerRef()
this(Common.USE_DEFAULT_VALUES);
|
public ServerRef(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(1);
this.createProperty("health-checker", HEALTH_CHECKER,
Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
HealthChecker.class);
this.createAttribute(HEALTH_CHECKER, "url", "Url",
AttrProp.CDATA,
null, "/");
this.createAttribute(HEALTH_CHECKER, "interval-in-seconds", "IntervalInSeconds",
AttrProp.CDATA,
null, "30");
this.createAttribute(HEALTH_CHECKER, "timeout-in-seconds", "TimeoutInSeconds",
AttrProp.CDATA,
null, "10");
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("HealthChecker"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getHealthChecker();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(HEALTH_CHECKER, 0, str, indent);
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ServerRef\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.DISABLE_TIMEOUT_IN_MINUTES)) return "30".trim();
if(attr.equals(ServerTags.LB_ENABLED)) return "false".trim();
if(attr.equals(ServerTags.ENABLED)) return "true".trim();
return null;
|
public static java.lang.String | getDefaultDisableTimeoutInMinutes()Get the default value of DisableTimeoutInMinutes from dtd
return "30".trim();
|
public static java.lang.String | getDefaultEnabled()Get the default value of Enabled from dtd
return "true".trim();
|
public static java.lang.String | getDefaultLbEnabled()Get the default value of LbEnabled from dtd
return "false".trim();
|
public java.lang.String | getDisableTimeoutInMinutes()Getter for DisableTimeoutInMinutes of the Element server-ref
return getAttributeValue(ServerTags.DISABLE_TIMEOUT_IN_MINUTES);
|
public HealthChecker | getHealthChecker()
return (HealthChecker)this.getValue(HEALTH_CHECKER);
|
public java.lang.String | getRef()Getter for Ref of the Element server-ref
return getAttributeValue(ServerTags.REF);
|
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 = "server-ref" + (canHaveSiblings() ? "[@ref='" + getAttributeValue("ref") +"']" : "") ;
return (null != ret ? ret.trim() : null);
|
void | initialize(int options)
|
public boolean | isEnabled()Getter for Enabled of the Element server-ref
return toBoolean(getAttributeValue(ServerTags.ENABLED));
|
public boolean | isLbEnabled()Getter for LbEnabled of the Element server-ref
return toBoolean(getAttributeValue(ServerTags.LB_ENABLED));
|
public HealthChecker | newHealthChecker()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new HealthChecker();
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public void | setDisableTimeoutInMinutes(java.lang.String v, boolean overwrite)Modify the DisableTimeoutInMinutes of the Element server-ref
setAttributeValue(ServerTags.DISABLE_TIMEOUT_IN_MINUTES, v, overwrite);
|
public void | setDisableTimeoutInMinutes(java.lang.String v)Modify the DisableTimeoutInMinutes of the Element server-ref
setAttributeValue(ServerTags.DISABLE_TIMEOUT_IN_MINUTES, v);
|
public void | setEnabled(boolean v, boolean overwrite)Modify the Enabled of the Element server-ref
setAttributeValue(ServerTags.ENABLED, ""+(v==true), overwrite);
|
public void | setEnabled(boolean v)Modify the Enabled of the Element server-ref
setAttributeValue(ServerTags.ENABLED, ""+(v==true));
|
public void | setHealthChecker(HealthChecker value)
this.setValue(HEALTH_CHECKER, value);
|
public void | setLbEnabled(boolean v, boolean overwrite)Modify the LbEnabled of the Element server-ref
setAttributeValue(ServerTags.LB_ENABLED, ""+(v==true), overwrite);
|
public void | setLbEnabled(boolean v)Modify the LbEnabled of the Element server-ref
setAttributeValue(ServerTags.LB_ENABLED, ""+(v==true));
|
public void | setRef(java.lang.String v, boolean overwrite)Modify the Ref of the Element server-ref
setAttributeValue(ServerTags.REF, v, overwrite);
|
public void | setRef(java.lang.String v)Modify the Ref of the Element server-ref
setAttributeValue(ServerTags.REF, v);
|
public void | validate()
|