FileDocCategorySizeDatePackage
Servers.javaAPI DocGlassfish v2 API6098Fri May 26 10:47:10 BST 2006com.sun.enterprise.config.serverbeans

Servers

public class Servers extends com.sun.enterprise.config.ConfigBean implements Serializable
This 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 voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddServer(Server value)

		return addServer(value, true);
	
public intaddServer(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 voiddump(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.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("Servers\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
	return null;
	
protected java.lang.StringgetRelativeXPath()
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 ServergetServer(int index)

		return (Server)this.getValue(SERVER, index);
	
public Server[]getServer()

		return (Server[])this.getValues(SERVER);
	
public ServergetServerByName(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;
		
	
voidinitialize(int options)


	
public ServernewServer()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new Server();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveServer(Server value)

		return this.removeValue(SERVER, value);
	
public intremoveServer(Server value, boolean overwrite)

		return this.removeValue(SERVER, value, overwrite);
	
public voidsetServer(Server[] value)

		this.setValue(SERVER, value);
	
public intsizeServer()

		return this.size(SERVER);
	
public voidvalidate()