Serverpublic class Server extends com.sun.enterprise.config.ConfigBean implements SerializableThis generated bean class Server matches the DTD element server |
Fields Summary |
---|
static Vector | comparators | private static final org.netbeans.modules.schema2beans.Version | runtimeVersion | public static final String | APPLICATION_REF | public static final String | RESOURCE_REF | public static final String | SYSTEM_PROPERTY | public static final String | ELEMENT_PROPERTY |
Constructors Summary |
---|
public Server()
this(Common.USE_DEFAULT_VALUES);
| public Server(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(4);
this.createProperty("application-ref", APPLICATION_REF,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ApplicationRef.class);
this.createAttribute(APPLICATION_REF, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.createAttribute(APPLICATION_REF, "virtual-servers", "VirtualServers",
AttrProp.CDATA | AttrProp.IMPLIED,
null, null);
this.createAttribute(APPLICATION_REF, "lb-enabled", "LbEnabled",
AttrProp.CDATA,
null, "false");
this.createAttribute(APPLICATION_REF, "disable-timeout-in-minutes", "DisableTimeoutInMinutes",
AttrProp.CDATA,
null, "30");
this.createAttribute(APPLICATION_REF, "ref", "Ref",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createProperty("resource-ref", RESOURCE_REF,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
ResourceRef.class);
this.createAttribute(RESOURCE_REF, "enabled", "Enabled",
AttrProp.CDATA,
null, "true");
this.createAttribute(RESOURCE_REF, "ref", "Ref",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createProperty("system-property", SYSTEM_PROPERTY,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
SystemProperty.class);
this.createAttribute(SYSTEM_PROPERTY, "name", "Name",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(SYSTEM_PROPERTY, "value", "Value",
AttrProp.CDATA | AttrProp.REQUIRED,
null, 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 int | addApplicationRef(ApplicationRef value)
return addApplicationRef(value, true);
| public int | addApplicationRef(ApplicationRef value, boolean overwrite)
ApplicationRef old = getApplicationRefByRef(value.getRef());
if(old != null) {
throw new ConfigException(StringManager.getManager(Server.class).getString("cannotAddDuplicate", "ApplicationRef"));
}
return this.addValue(APPLICATION_REF, value, overwrite);
| 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(Server.class).getString("cannotAddDuplicate", "ElementProperty"));
}
return this.addValue(ELEMENT_PROPERTY, value, overwrite);
| public int | addResourceRef(ResourceRef value)
return addResourceRef(value, true);
| public int | addResourceRef(ResourceRef value, boolean overwrite)
ResourceRef old = getResourceRefByRef(value.getRef());
if(old != null) {
throw new ConfigException(StringManager.getManager(Server.class).getString("cannotAddDuplicate", "ResourceRef"));
}
return this.addValue(RESOURCE_REF, value, overwrite);
| public int | addSystemProperty(SystemProperty value)
return addSystemProperty(value, true);
| public int | addSystemProperty(SystemProperty value, boolean overwrite)
SystemProperty old = getSystemPropertyByName(value.getName());
if(old != null) {
throw new ConfigException(StringManager.getManager(Server.class).getString("cannotAddDuplicate", "SystemProperty"));
}
return this.addValue(SYSTEM_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("ApplicationRef["+this.sizeApplicationRef()+"]"); // NOI18N
for(int i=0; i<this.sizeApplicationRef(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getApplicationRef(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(APPLICATION_REF, i, str, indent);
}
str.append(indent);
str.append("ResourceRef["+this.sizeResourceRef()+"]"); // NOI18N
for(int i=0; i<this.sizeResourceRef(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceRef(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(RESOURCE_REF, i, str, indent);
}
str.append(indent);
str.append("SystemProperty["+this.sizeSystemProperty()+"]"); // NOI18N
for(int i=0; i<this.sizeSystemProperty(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSystemProperty(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SYSTEM_PROPERTY, i, 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("Server\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public ApplicationRef | getApplicationRef(int index)
return (ApplicationRef)this.getValue(APPLICATION_REF, index);
| public ApplicationRef[] | getApplicationRef()
return (ApplicationRef[])this.getValues(APPLICATION_REF);
| public ApplicationRef | getApplicationRefByRef(java.lang.String id)
if (null != id) { id = id.trim(); }
ApplicationRef[] o = getApplicationRef();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
return o[i];
}
}
return null;
| public java.lang.String | getConfigRef()Getter for ConfigRef of the Element server
return getAttributeValue(ServerTags.CONFIG_REF);
| public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
if(attr.equals(ServerTags.LB_WEIGHT)) return "100".trim();
return null;
| public static java.lang.String | getDefaultLbWeight()Get the default value of LbWeight from dtd
return "100".trim();
| public ElementProperty | getElementProperty(int index)
return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
| public ElementProperty[] | getElementProperty()
return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
| 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(ServerTags.NAME)).equals(id)) {
return o[i];
}
}
return null;
| public java.lang.String | getLbWeight()Getter for LbWeight of the Element server
return getAttributeValue(ServerTags.LB_WEIGHT);
| public java.lang.String | getName()Getter for Name of the Element server
return getAttributeValue(ServerTags.NAME);
| public java.lang.String | getNodeAgentRef()Getter for NodeAgentRef of the Element server
return getAttributeValue(ServerTags.NODE_AGENT_REF);
| 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 = "server" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
return (null != ret ? ret.trim() : null);
| public ResourceRef | getResourceRef(int index)
return (ResourceRef)this.getValue(RESOURCE_REF, index);
| public ResourceRef[] | getResourceRef()
return (ResourceRef[])this.getValues(RESOURCE_REF);
| public ResourceRef | getResourceRefByRef(java.lang.String id)
if (null != id) { id = id.trim(); }
ResourceRef[] o = getResourceRef();
if (o == null) return null;
for (int i=0; i < o.length; i++) {
if(o[i].getAttributeValue(Common.convertName(ServerTags.REF)).equals(id)) {
return o[i];
}
}
return null;
| public SystemProperty | getSystemProperty(int index)
return (SystemProperty)this.getValue(SYSTEM_PROPERTY, index);
| public SystemProperty[] | getSystemProperty()
return (SystemProperty[])this.getValues(SYSTEM_PROPERTY);
| public SystemProperty | getSystemPropertyByName(java.lang.String id)
if (null != id) { id = id.trim(); }
SystemProperty[] o = getSystemProperty();
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;
| void | initialize(int options)
| public ApplicationRef | newApplicationRef()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ApplicationRef();
| 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 ResourceRef | newResourceRef()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new ResourceRef();
| public SystemProperty | newSystemProperty()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new SystemProperty();
| public int | removeApplicationRef(ApplicationRef value)
return this.removeValue(APPLICATION_REF, value);
| public int | removeApplicationRef(ApplicationRef value, boolean overwrite)
return this.removeValue(APPLICATION_REF, value, overwrite);
| 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 int | removeResourceRef(ResourceRef value)
return this.removeValue(RESOURCE_REF, value);
| public int | removeResourceRef(ResourceRef value, boolean overwrite)
return this.removeValue(RESOURCE_REF, value, overwrite);
| public int | removeSystemProperty(SystemProperty value)
return this.removeValue(SYSTEM_PROPERTY, value);
| public int | removeSystemProperty(SystemProperty value, boolean overwrite)
return this.removeValue(SYSTEM_PROPERTY, value, overwrite);
| public void | setApplicationRef(ApplicationRef[] value)
this.setValue(APPLICATION_REF, value);
| public void | setConfigRef(java.lang.String v, boolean overwrite)Modify the ConfigRef of the Element server
setAttributeValue(ServerTags.CONFIG_REF, v, overwrite);
| public void | setConfigRef(java.lang.String v)Modify the ConfigRef of the Element server
setAttributeValue(ServerTags.CONFIG_REF, v);
| public void | setElementProperty(ElementProperty[] value)
this.setValue(ELEMENT_PROPERTY, value);
| public void | setLbWeight(java.lang.String v, boolean overwrite)Modify the LbWeight of the Element server
setAttributeValue(ServerTags.LB_WEIGHT, v, overwrite);
| public void | setLbWeight(java.lang.String v)Modify the LbWeight of the Element server
setAttributeValue(ServerTags.LB_WEIGHT, v);
| public void | setName(java.lang.String v, boolean overwrite)Modify the Name of the Element server
setAttributeValue(ServerTags.NAME, v, overwrite);
| public void | setName(java.lang.String v)Modify the Name of the Element server
setAttributeValue(ServerTags.NAME, v);
| public void | setNodeAgentRef(java.lang.String v, boolean overwrite)Modify the NodeAgentRef of the Element server
setAttributeValue(ServerTags.NODE_AGENT_REF, v, overwrite);
| public void | setNodeAgentRef(java.lang.String v)Modify the NodeAgentRef of the Element server
setAttributeValue(ServerTags.NODE_AGENT_REF, v);
| public void | setResourceRef(ResourceRef[] value)
this.setValue(RESOURCE_REF, value);
| public void | setSystemProperty(SystemProperty[] value)
this.setValue(SYSTEM_PROPERTY, value);
| public int | sizeApplicationRef()
return this.size(APPLICATION_REF);
| public int | sizeElementProperty()
return this.size(ELEMENT_PROPERTY);
| public int | sizeResourceRef()
return this.size(RESOURCE_REF);
| public int | sizeSystemProperty()
return this.size(SYSTEM_PROPERTY);
| public void | validate()
|
|