FileDocCategorySizeDatePackage
ProviderConfig.javaAPI DocGlassfish v2 API12471Fri May 04 22:31:18 BST 2007com.sun.enterprise.config.clientbeans

ProviderConfig

public class ProviderConfig extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class ProviderConfig matches the DTD element provider-config

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


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(3);
		this.createProperty("request-policy", REQUEST_POLICY, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			RequestPolicy.class);
		this.createAttribute(REQUEST_POLICY, "auth-source", "AuthSource", 
						AttrProp.ENUM | AttrProp.IMPLIED,
						new String[] {
							"sender",
							"content"
						}, null);
		this.createAttribute(REQUEST_POLICY, "auth-recipient", "AuthRecipient", 
						AttrProp.ENUM | AttrProp.IMPLIED,
						new String[] {
							"before-content",
							"after-content"
						}, null);
		this.createProperty("response-policy", RESPONSE_POLICY, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ResponsePolicy.class);
		this.createAttribute(RESPONSE_POLICY, "auth-source", "AuthSource", 
						AttrProp.ENUM | AttrProp.IMPLIED,
						new String[] {
							"sender",
							"content"
						}, null);
		this.createAttribute(RESPONSE_POLICY, "auth-recipient", "AuthRecipient", 
						AttrProp.ENUM | AttrProp.IMPLIED,
						new String[] {
							"before-content",
							"after-content"
						}, 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 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(ProviderConfig.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("RequestPolicy");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getRequestPolicy();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(REQUEST_POLICY, 0, str, indent);

		str.append(indent);
		str.append("ResponsePolicy");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getResponsePolicy();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(RESPONSE_POLICY, 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("ProviderConfig\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetClassName()
Getter for ClassName of the Element provider-config

return
the ClassName of the Element provider-config

		return getAttributeValue(ClientTags.CLASS_NAME);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
	return null;
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
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(ClientTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetProviderId()
Getter for ProviderId of the Element provider-config

return
the ProviderId of the Element provider-config

		return getAttributeValue(ClientTags.PROVIDER_ID);
	
public java.lang.StringgetProviderType()
Getter for ProviderType of the Element provider-config

return
the ProviderType of the Element provider-config

		return getAttributeValue(ClientTags.PROVIDER_TYPE);
	
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 = "provider-config" + (canHaveSiblings() ? "[@provider-id='" + getAttributeValue("provider-id") +"']" : "") ;
	    return (null != ret ? ret.trim() : null);
	
public RequestPolicygetRequestPolicy()

		return (RequestPolicy)this.getValue(REQUEST_POLICY);
	
public ResponsePolicygetResponsePolicy()

		return (ResponsePolicy)this.getValue(RESPONSE_POLICY);
	
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 RequestPolicynewRequestPolicy()
Create a new bean using it's default constructor. This does not add it to any bean graph.

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

		return new ResponsePolicy();
	
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 voidsetClassName(java.lang.String v, boolean overwrite)
Modify the ClassName of the Element provider-config

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

		setAttributeValue(ClientTags.CLASS_NAME, v, overwrite);
	
public voidsetClassName(java.lang.String v)
Modify the ClassName of the Element provider-config

param
v the new value

		setAttributeValue(ClientTags.CLASS_NAME, v);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetElementProperty(int index, ElementProperty value)

		this.setValue(ELEMENT_PROPERTY, index, value);
	
public voidsetProviderId(java.lang.String v, boolean overwrite)
Modify the ProviderId of the Element provider-config

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

		setAttributeValue(ClientTags.PROVIDER_ID, v, overwrite);
	
public voidsetProviderId(java.lang.String v)
Modify the ProviderId of the Element provider-config

param
v the new value

		setAttributeValue(ClientTags.PROVIDER_ID, v);
	
public voidsetProviderType(java.lang.String v, boolean overwrite)
Modify the ProviderType of the Element provider-config

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

		setAttributeValue(ClientTags.PROVIDER_TYPE, v, overwrite);
	
public voidsetProviderType(java.lang.String v)
Modify the ProviderType of the Element provider-config

param
v the new value

		setAttributeValue(ClientTags.PROVIDER_TYPE, v);
	
public voidsetRequestPolicy(RequestPolicy value)

		this.setValue(REQUEST_POLICY, value);
	
public voidsetResponsePolicy(ResponsePolicy value)

		this.setValue(RESPONSE_POLICY, value);
	
public intsizeElementProperty()

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