Serverspublic class Servers extends com.sun.enterprise.config.ConfigBean implements SerializableThis generated bean class Servers matches the DTD element servers |
Fields Summary |
---|
static Vector | comparators | private static final org.netbeans.modules.schema2beans.Version | runtimeVersion | public static final String | SERVER |
Constructors Summary |
---|
public Servers()
this(Common.USE_DEFAULT_VALUES);
| public Servers(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(1);
this.createProperty("server", SERVER,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
Server.class);
this.createAttribute(SERVER, "name", "Name",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(SERVER, "config-ref", "ConfigRef",
AttrProp.CDATA | AttrProp.IMPLIED,
null, null);
this.createAttribute(SERVER, "node-agent-ref", "NodeAgentRef",
AttrProp.CDATA | AttrProp.IMPLIED,
null, null);
this.createAttribute(SERVER, "lb-weight", "LbWeight",
AttrProp.CDATA,
null, "100");
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addServer(Server value)
return addServer(value, true);
| public int | addServer(Server value, boolean overwrite)
Server old = getServerByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(Servers.class).getString("cannotAddDuplicate", "Server"));
}
return this.addValue(SERVER, 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("Server["+this.sizeServer()+"]"); // NOI18N
for(int i=0; i<this.sizeServer(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getServer(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SERVER, i, str, indent);
}
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("Servers\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();
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 = "servers";
return (null != ret ? ret.trim() : null);
| public Server | getServer(int index)
return (Server)this.getValue(SERVER, index);
| public Server[] | getServer()
return (Server[])this.getValues(SERVER);
| public Server | getServerByName(java.lang.String id)
if (null != id) { id = id.trim(); }
Server[] o = getServer();
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 Server | newServer()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new Server();
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeServer(Server value)
return this.removeValue(SERVER, value);
| public int | removeServer(Server value, boolean overwrite)
return this.removeValue(SERVER, value, overwrite);
| public void | setServer(Server[] value)
this.setValue(SERVER, value);
| public int | sizeServer()
return this.size(SERVER);
| public void | validate()
|
|