FileDocCategorySizeDatePackage
Event.javaAPI DocGlassfish v2 API9456Fri May 26 10:47:06 BST 2006com.sun.enterprise.config.serverbeans

Event

public class Event extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class Event matches the DTD element event

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


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(2);
		this.createProperty("description", DESCRIPTION, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		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(Event.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("Description");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		o = this.getDescription();
		str.append((o==null?"null":o.toString().trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(DESCRIPTION, 0, 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.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("Event\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();
		if(attr.equals(ServerTags.RECORD_EVENT)) return "true".trim();
		if(attr.equals(ServerTags.LEVEL)) return "INFO".trim();
	return null;
	
public static java.lang.StringgetDefaultLevel()
Get the default value of Level from dtd

		return "INFO".trim();
	
public static java.lang.StringgetDefaultRecordEvent()
Get the default value of RecordEvent from dtd

		return "true".trim();
	
public java.lang.StringgetDescription()
Return the Description of the Element event

		return (String) getValue(ServerTags.DESCRIPTION);
	
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.StringgetLevel()
Getter for Level of the Element event

return
the Level of the Element event

		return getAttributeValue(ServerTags.LEVEL);
	
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 = "event";
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetType()
Getter for Type of the Element event

return
the Type of the Element event

		return getAttributeValue(ServerTags.TYPE);
	
voidinitialize(int options)


	
public booleanisRecordEvent()
Getter for RecordEvent of the Element event

return
the RecordEvent of the Element event

		return toBoolean(getAttributeValue(ServerTags.RECORD_EVENT));
	
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 voidsetDescription(java.lang.String v)
Modify the Description of the Element event

param
v the new value

		setValue(ServerTags.DESCRIPTION, (null != v ? v.trim() : null));
		
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetLevel(java.lang.String v, boolean overwrite)
Modify the Level of the Element event

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

		setAttributeValue(ServerTags.LEVEL, v, overwrite);
	
public voidsetLevel(java.lang.String v)
Modify the Level of the Element event

param
v the new value

		setAttributeValue(ServerTags.LEVEL, v);
	
public voidsetRecordEvent(boolean v, boolean overwrite)
Modify the RecordEvent of the Element event

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

		setAttributeValue(ServerTags.RECORD_EVENT, ""+(v==true), overwrite);
	
public voidsetRecordEvent(boolean v)
Modify the RecordEvent of the Element event

param
v the new value

		setAttributeValue(ServerTags.RECORD_EVENT, ""+(v==true));
	
public voidsetType(java.lang.String v, boolean overwrite)
Modify the Type of the Element event

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

		setAttributeValue(ServerTags.TYPE, v, overwrite);
	
public voidsetType(java.lang.String v)
Modify the Type of the Element event

param
v the new value

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

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