Clusterpublic class Cluster extends com.sun.enterprise.config.ConfigBean implements SerializableThis generated bean class Cluster matches the DTD element cluster |
Fields Summary |
---|
static Vector | comparators | private static final org.netbeans.modules.schema2beans.Version | runtimeVersion | public static final String | SERVER_REF | public static final String | RESOURCE_REF | public static final String | APPLICATION_REF | public static final String | SYSTEM_PROPERTY | public static final String | ELEMENT_PROPERTY |
Constructors Summary |
---|
public Cluster()
this(Common.USE_DEFAULT_VALUES);
| public Cluster(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(5);
this.createProperty("server-ref", SERVER_REF,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ServerRef.class);
this.createAttribute(SERVER_REF, "ref", "Ref",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(SERVER_REF, "disable-timeout-in-minutes", "DisableTimeoutInMinutes",
AttrProp.CDATA,
null, "30");
this.createAttribute(SERVER_REF, "lb-enabled", "LbEnabled",
AttrProp.CDATA,
null, "false");
this.createAttribute(SERVER_REF, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.createProperty("resource-ref", RESOURCE_REF,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ResourceRef.class);
this.createAttribute(RESOURCE_REF, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.createAttribute(RESOURCE_REF, "ref", "Ref",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createProperty("application-ref", APPLICATION_REF,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ApplicationRef.class);
this.createAttribute(APPLICATION_REF, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.createAttribute(APPLICATION_REF, "virtual-servers", "VirtualServers",
AttrProp.CDATA | AttrProp.IMPLIED,
null, null);
this.createAttribute(APPLICATION_REF, "lb-enabled", "LbEnabled",
AttrProp.CDATA,
null, "false");
this.createAttribute(APPLICATION_REF, "disable-timeout-in-minutes", "DisableTimeoutInMinutes",
AttrProp.CDATA,
null, "30");
this.createAttribute(APPLICATION_REF, "ref", "Ref",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createProperty("system-property", SYSTEM_PROPERTY,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
SystemProperty.class);
this.createAttribute(SYSTEM_PROPERTY, "name", "Name",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(SYSTEM_PROPERTY, "value", "Value",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
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 int | addApplicationRef(ApplicationRef value)
return addApplicationRef(value, true);
| public int | addApplicationRef(ApplicationRef value, boolean overwrite)
ApplicationRef old = getApplicationRefByRef(value.getRef());
if(old != null) {
throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ApplicationRef"));
}
return this.addValue(APPLICATION_REF, value, overwrite);
| public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addElementProperty(ElementProperty value)
return addElementProperty(value, true);
| public int | addElementProperty(ElementProperty value, boolean overwrite)
ElementProperty old = getElementPropertyByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ElementProperty"));
}
return this.addValue(ELEMENT_PROPERTY, value, overwrite);
| public int | addResourceRef(ResourceRef value)
return addResourceRef(value, true);
| public int | addResourceRef(ResourceRef value, boolean overwrite)
ResourceRef old = getResourceRefByRef(value.getRef());
if(old != null) {
throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ResourceRef"));
}
return this.addValue(RESOURCE_REF, value, overwrite);
| public int | addServerRef(ServerRef value)
return addServerRef(value, true);
| public int | addServerRef(ServerRef value, boolean overwrite)
ServerRef old = getServerRefByRef(value.getRef());
if(old != null) {
throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "ServerRef"));
}
return this.addValue(SERVER_REF, value, overwrite);
| public int | addSystemProperty(SystemProperty value)
return addSystemProperty(value, true);
| public int | addSystemProperty(SystemProperty value, boolean overwrite)
SystemProperty old = getSystemPropertyByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(Cluster.class).getString("cannotAddDuplicate", "SystemProperty"));
}
return this.addValue(SYSTEM_PROPERTY, 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("ServerRef["+this.sizeServerRef()+"]"); // NOI18N
for(int i=0; i<this.sizeServerRef(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getServerRef(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SERVER_REF, i, str, indent);
}
str.append(indent);
str.append("ResourceRef["+this.sizeResourceRef()+"]"); // NOI18N
for(int i=0; i<this.sizeResourceRef(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceRef(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(RESOURCE_REF, i, str, indent);
}
str.append(indent);
str.append("ApplicationRef["+this.sizeApplicationRef()+"]"); // NOI18N
for(int i=0; i<this.sizeApplicationRef(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getApplicationRef(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(APPLICATION_REF, i, str, indent);
}
str.append(indent);
str.append("SystemProperty["+this.sizeSystemProperty()+"]"); // NOI18N
for(int i=0; i<this.sizeSystemProperty(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSystemProperty(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SYSTEM_PROPERTY, i, 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.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("Cluster\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public ApplicationRef | getApplicationRef(int index)
return (ApplicationRef)this.getValue(APPLICATION_REF, index);
| public ApplicationRef[] | getApplicationRef()
return (ApplicationRef[])this.getValues(APPLICATION_REF);
| public ApplicationRef | getApplicationRefByRef(java.lang.String id)
if (null != id) { id = id.trim(); }
ApplicationRef[] o = getApplicationRef();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
return o[i];
}
}
return null;
| public java.lang.String | getConfigRef()Getter for ConfigRef of the Element cluster
return getAttributeValue(ServerTags.CONFIG_REF);
| public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
if(attr.equals(ServerTags.HEARTBEAT_ENABLED)) return "true".trim();
return null;
| public static java.lang.String | getDefaultHeartbeatEnabled()Get the default value of HeartbeatEnabled from dtd
return "true".trim();
| public ElementProperty | getElementProperty(int index)
return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
| public ElementProperty[] | getElementProperty()
return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
| public ElementProperty | getElementPropertyByName(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 java.lang.String | getHeartbeatAddress()Getter for HeartbeatAddress of the Element cluster
return getAttributeValue(ServerTags.HEARTBEAT_ADDRESS);
| public java.lang.String | getHeartbeatPort()Getter for HeartbeatPort of the Element cluster
return getAttributeValue(ServerTags.HEARTBEAT_PORT);
| public java.lang.String | getName()Getter for Name of the Element cluster
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 = "cluster" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
return (null != ret ? ret.trim() : null);
| public ResourceRef | getResourceRef(int index)
return (ResourceRef)this.getValue(RESOURCE_REF, index);
| public ResourceRef[] | getResourceRef()
return (ResourceRef[])this.getValues(RESOURCE_REF);
| public ResourceRef | getResourceRefByRef(java.lang.String id)
if (null != id) { id = id.trim(); }
ResourceRef[] o = getResourceRef();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
return o[i];
}
}
return null;
| public ServerRef | getServerRef(int index)
return (ServerRef)this.getValue(SERVER_REF, index);
| public ServerRef[] | getServerRef()
return (ServerRef[])this.getValues(SERVER_REF);
| public ServerRef | getServerRefByRef(java.lang.String id)
if (null != id) { id = id.trim(); }
ServerRef[] o = getServerRef();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
return o[i];
}
}
return null;
| public SystemProperty | getSystemProperty(int index)
return (SystemProperty)this.getValue(SYSTEM_PROPERTY, index);
| public SystemProperty[] | getSystemProperty()
return (SystemProperty[])this.getValues(SYSTEM_PROPERTY);
| public SystemProperty | getSystemPropertyByName(java.lang.String id)
if (null != id) { id = id.trim(); }
SystemProperty[] o = getSystemProperty();
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;
| void | initialize(int options)
| public boolean | isHeartbeatEnabled()Getter for HeartbeatEnabled of the Element cluster
return toBoolean(getAttributeValue(ServerTags.HEARTBEAT_ENABLED));
| public ApplicationRef | newApplicationRef()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ApplicationRef();
| public ElementProperty | newElementProperty()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ElementProperty();
| public ResourceRef | newResourceRef()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ResourceRef();
| public ServerRef | newServerRef()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ServerRef();
| public SystemProperty | newSystemProperty()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new SystemProperty();
| public int | removeApplicationRef(ApplicationRef value)
return this.removeValue(APPLICATION_REF, value);
| public int | removeApplicationRef(ApplicationRef value, boolean overwrite)
return this.removeValue(APPLICATION_REF, value, overwrite);
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeElementProperty(ElementProperty value)
return this.removeValue(ELEMENT_PROPERTY, value);
| public int | removeElementProperty(ElementProperty value, boolean overwrite)
return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
| public int | removeResourceRef(ResourceRef value)
return this.removeValue(RESOURCE_REF, value);
| public int | removeResourceRef(ResourceRef value, boolean overwrite)
return this.removeValue(RESOURCE_REF, value, overwrite);
| public int | removeServerRef(ServerRef value)
return this.removeValue(SERVER_REF, value);
| public int | removeServerRef(ServerRef value, boolean overwrite)
return this.removeValue(SERVER_REF, value, overwrite);
| public int | removeSystemProperty(SystemProperty value)
return this.removeValue(SYSTEM_PROPERTY, value);
| public int | removeSystemProperty(SystemProperty value, boolean overwrite)
return this.removeValue(SYSTEM_PROPERTY, value, overwrite);
| public void | setApplicationRef(ApplicationRef[] value)
this.setValue(APPLICATION_REF, value);
| public void | setConfigRef(java.lang.String v, boolean overwrite)Modify the ConfigRef of the Element cluster
setAttributeValue(ServerTags.CONFIG_REF, v, overwrite);
| public void | setConfigRef(java.lang.String v)Modify the ConfigRef of the Element cluster
setAttributeValue(ServerTags.CONFIG_REF, v);
| public void | setElementProperty(ElementProperty[] value)
this.setValue(ELEMENT_PROPERTY, value);
| public void | setHeartbeatAddress(java.lang.String v, boolean overwrite)Modify the HeartbeatAddress of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_ADDRESS, v, overwrite);
| public void | setHeartbeatAddress(java.lang.String v)Modify the HeartbeatAddress of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_ADDRESS, v);
| public void | setHeartbeatEnabled(boolean v, boolean overwrite)Modify the HeartbeatEnabled of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_ENABLED, ""+(v==true), overwrite);
| public void | setHeartbeatEnabled(boolean v)Modify the HeartbeatEnabled of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_ENABLED, ""+(v==true));
| public void | setHeartbeatPort(java.lang.String v, boolean overwrite)Modify the HeartbeatPort of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_PORT, v, overwrite);
| public void | setHeartbeatPort(java.lang.String v)Modify the HeartbeatPort of the Element cluster
setAttributeValue(ServerTags.HEARTBEAT_PORT, v);
| public void | setName(java.lang.String v, boolean overwrite)Modify the Name of the Element cluster
setAttributeValue(ServerTags.NAME, v, overwrite);
| public void | setName(java.lang.String v)Modify the Name of the Element cluster
setAttributeValue(ServerTags.NAME, v);
| public void | setResourceRef(ResourceRef[] value)
this.setValue(RESOURCE_REF, value);
| public void | setServerRef(ServerRef[] value)
this.setValue(SERVER_REF, value);
| public void | setSystemProperty(SystemProperty[] value)
this.setValue(SYSTEM_PROPERTY, value);
| public int | sizeApplicationRef()
return this.size(APPLICATION_REF);
| public int | sizeElementProperty()
return this.size(ELEMENT_PROPERTY);
| public int | sizeResourceRef()
return this.size(RESOURCE_REF);
| public int | sizeServerRef()
return this.size(SERVER_REF);
| public int | sizeSystemProperty()
return this.size(SYSTEM_PROPERTY);
| public void | validate()
|
|