ProviderConfigpublic class ProviderConfig extends com.sun.enterprise.config.ConfigBean implements SerializableThis 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 void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addElementProperty(ElementProperty value)
return addElementProperty(value, true);
| public int | addElementProperty(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 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("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.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ProviderConfig\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public java.lang.String | getClassName()Getter for ClassName of the Element provider-config
return getAttributeValue(ClientTags.CLASS_NAME);
| public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
return null;
| public ElementProperty[] | getElementProperty()
return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
| public ElementProperty | getElementProperty(int index)
return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
| public ElementProperty | getElementPropertyByName(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.String | getProviderId()Getter for ProviderId of the Element provider-config
return getAttributeValue(ClientTags.PROVIDER_ID);
| public java.lang.String | getProviderType()Getter for ProviderType of the Element provider-config
return getAttributeValue(ClientTags.PROVIDER_TYPE);
| 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 = "provider-config" + (canHaveSiblings() ? "[@provider-id='" + getAttributeValue("provider-id") +"']" : "") ;
return (null != ret ? ret.trim() : null);
| public RequestPolicy | getRequestPolicy()
return (RequestPolicy)this.getValue(REQUEST_POLICY);
| public ResponsePolicy | getResponsePolicy()
return (ResponsePolicy)this.getValue(RESPONSE_POLICY);
| void | initialize(int options)
| public ElementProperty | newElementProperty()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ElementProperty();
| public RequestPolicy | newRequestPolicy()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new RequestPolicy();
| public ResponsePolicy | newResponsePolicy()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ResponsePolicy();
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeElementProperty(ElementProperty value)
return this.removeValue(ELEMENT_PROPERTY, value);
| public int | removeElementProperty(ElementProperty value, boolean overwrite)
return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
| public void | setClassName(java.lang.String v, boolean overwrite)Modify the ClassName of the Element provider-config
setAttributeValue(ClientTags.CLASS_NAME, v, overwrite);
| public void | setClassName(java.lang.String v)Modify the ClassName of the Element provider-config
setAttributeValue(ClientTags.CLASS_NAME, v);
| public void | setElementProperty(ElementProperty[] value)
this.setValue(ELEMENT_PROPERTY, value);
| public void | setElementProperty(int index, ElementProperty value)
this.setValue(ELEMENT_PROPERTY, index, value);
| public void | setProviderId(java.lang.String v, boolean overwrite)Modify the ProviderId of the Element provider-config
setAttributeValue(ClientTags.PROVIDER_ID, v, overwrite);
| public void | setProviderId(java.lang.String v)Modify the ProviderId of the Element provider-config
setAttributeValue(ClientTags.PROVIDER_ID, v);
| public void | setProviderType(java.lang.String v, boolean overwrite)Modify the ProviderType of the Element provider-config
setAttributeValue(ClientTags.PROVIDER_TYPE, v, overwrite);
| public void | setProviderType(java.lang.String v)Modify the ProviderType of the Element provider-config
setAttributeValue(ClientTags.PROVIDER_TYPE, v);
| public void | setRequestPolicy(RequestPolicy value)
this.setValue(REQUEST_POLICY, value);
| public void | setResponsePolicy(ResponsePolicy value)
this.setValue(RESPONSE_POLICY, value);
| public int | sizeElementProperty()
return this.size(ELEMENT_PROPERTY);
| public void | validate()
|
|