FileDocCategorySizeDatePackage
JmsHost.javaAPI DocGlassfish v2 API10304Fri May 26 10:47:08 BST 2006com.sun.enterprise.config.serverbeans

JmsHost

public class JmsHost extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class JmsHost matches the DTD element jms-host

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
ELEMENT_PROPERTY
Constructors Summary
public JmsHost()


	  
		this(Common.USE_DEFAULT_VALUES);
	
public JmsHost(int options)

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(1);
		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 static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddElementProperty(ElementProperty value)

		return addElementProperty(value, true);
	
public intaddElementProperty(ElementProperty value, boolean overwrite)

		ElementProperty old = getElementPropertyByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(JmsHost.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, 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("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.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("JmsHost\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetAdminPassword()
Getter for AdminPassword of the Element jms-host

return
the AdminPassword of the Element jms-host

		return getAttributeValue(ServerTags.ADMIN_PASSWORD);
	
public java.lang.StringgetAdminUserName()
Getter for AdminUserName of the Element jms-host

return
the AdminUserName of the Element jms-host

		return getAttributeValue(ServerTags.ADMIN_USER_NAME);
	
public static java.lang.StringgetDefaultAdminPassword()
Get the default value of AdminPassword from dtd

		return "admin".trim();
	
public static java.lang.StringgetDefaultAdminUserName()
Get the default value of AdminUserName from dtd

		return "admin".trim();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.PORT)) return "7676".trim();
		if(attr.equals(ServerTags.ADMIN_USER_NAME)) return "admin".trim();
		if(attr.equals(ServerTags.ADMIN_PASSWORD)) return "admin".trim();
	return null;
	
public static java.lang.StringgetDefaultPort()
Get the default value of Port from dtd

		return "7676".trim();
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementPropertyByName(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.StringgetHost()
Getter for Host of the Element jms-host

return
the Host of the Element jms-host

			return getAttributeValue(ServerTags.HOST);
	
public java.lang.StringgetName()
Getter for Name of the Element jms-host

return
the Name of the Element jms-host

		return getAttributeValue(ServerTags.NAME);
	
public java.lang.StringgetPort()
Getter for Port of the Element jms-host

return
the Port of the Element jms-host

		return getAttributeValue(ServerTags.PORT);
	
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 = "jms-host" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
	    return (null != ret ? ret.trim() : null);
	
voidinitialize(int options)


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

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

		comparators.remove(c);
	
public intremoveElementProperty(ElementProperty value)

		return this.removeValue(ELEMENT_PROPERTY, value);
	
public intremoveElementProperty(ElementProperty value, boolean overwrite)

		return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
	
public voidsetAdminPassword(java.lang.String v, boolean overwrite)
Modify the AdminPassword of the Element jms-host

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ADMIN_PASSWORD, v, overwrite);
	
public voidsetAdminPassword(java.lang.String v)
Modify the AdminPassword of the Element jms-host

param
v the new value

		setAttributeValue(ServerTags.ADMIN_PASSWORD, v);
	
public voidsetAdminUserName(java.lang.String v, boolean overwrite)
Modify the AdminUserName of the Element jms-host

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ADMIN_USER_NAME, v, overwrite);
	
public voidsetAdminUserName(java.lang.String v)
Modify the AdminUserName of the Element jms-host

param
v the new value

		setAttributeValue(ServerTags.ADMIN_USER_NAME, v);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetHost(java.lang.String v, boolean overwrite)
Modify the Host of the Element jms-host

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.HOST, v, overwrite);
	
public voidsetHost(java.lang.String v)
Modify the Host of the Element jms-host

param
v the new value

		setAttributeValue(ServerTags.HOST, v);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element jms-host

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.NAME, v, overwrite);
	
public voidsetName(java.lang.String v)
Modify the Name of the Element jms-host

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidsetPort(java.lang.String v, boolean overwrite)
Modify the Port of the Element jms-host

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.PORT, v, overwrite);
	
public voidsetPort(java.lang.String v)
Modify the Port of the Element jms-host

param
v the new value

		setAttributeValue(ServerTags.PORT, v);
	
public intsizeElementProperty()

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