SunConnectorpublic class SunConnector extends com.sun.enterprise.tools.common.dd.SunBaseBean This generated bean class SunConnector matches the schema element sun-connector
Generated on Thu Jul 31 18:16:39 PDT 2003
This class matches the root element of the DTD,
and is the root of the following bean graph:
sun-connector : SunConnector
resource-adapter : ResourceAdapter
[attr: jndi-name CDATA #REQUIRED ]
[attr: max-pool-size CDATA 32]
[attr: steady-pool-size CDATA 4]
[attr: max-wait-time-in-millis CDATA 10000]
[attr: idle-timeout-in-seconds CDATA 1000]
description : String?
property : Boolean[0,n]
[attr: name CDATA #REQUIRED ]
[attr: value CDATA #REQUIRED ]
EMPTY : String
role-map : RoleMap?
[attr: map-id CDATA #REQUIRED ]
description : String?
map-element : MapElement[0,n]
principal : Principal[1,n]
[attr: user-name CDATA #REQUIRED ]
description : String?
backend-principal : Boolean
[attr: user-name CDATA #REQUIRED ]
[attr: password CDATA #REQUIRED ]
[attr: credential CDATA #REQUIRED ]
EMPTY : String |
Fields Summary |
---|
static Vector | comparators | public static final String | RESOURCE_ADAPTER | public static final String | ROLE_MAP |
Constructors Summary |
---|
public SunConnector() // NOI18N
this(null, Common.USE_DEFAULT_VALUES);
| public SunConnector(Node doc, int options)
this(Common.NO_DEFAULT_VALUES);
initFromNode(doc, options);
| public SunConnector(int options)
super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
initOptions(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public static com.sun.enterprise.tools.common.dd.connector.SunConnector | createGraph(org.w3c.dom.Node doc)
return new SunConnector(doc, Common.NO_DEFAULT_VALUES);
| public static com.sun.enterprise.tools.common.dd.connector.SunConnector | createGraph(java.io.InputStream in)
return createGraph(in, false);
| public static com.sun.enterprise.tools.common.dd.connector.SunConnector | createGraph(java.io.InputStream in, boolean validate)
Document doc = GraphManager.createXmlDocument(in, validate);
return createGraph(doc);
| public static com.sun.enterprise.tools.common.dd.connector.SunConnector | createGraph()
try {
return new SunConnector();
}
catch (Schema2BeansException e) {
throw new RuntimeException(e.getMessage());
}
| 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("ResourceAdapter"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceAdapter();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(RESOURCE_ADAPTER, 0, str, indent);
str.append(indent);
str.append("RoleMap"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getRoleMap();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(ROLE_MAP, 0, str, indent);
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("SunConnector\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public ResourceAdapter | getResourceAdapter()
return (ResourceAdapter)this.getValue(RESOURCE_ADAPTER);
| public RoleMap | getRoleMap()
return (RoleMap)this.getValue(ROLE_MAP);
| protected void | initFromNode(org.w3c.dom.Node doc, int options)
if (doc == null)
{
doc = GraphManager.createRootElementNode("sun-connector"); // NOI18N
if (doc == null)
throw new Schema2BeansException(Common.getMessage(
"CantCreateDOMRoot_msg", "sun-connector"));
}
Node n = GraphManager.getElementNode("sun-connector", doc); // NOI18N
if (n == null)
throw new Schema2BeansException(Common.getMessage(
"DocRootNotInDOMGraph_msg", "sun-connector", doc.getFirstChild().getNodeName()));
this.graphManager.setXmlDocument(doc);
// Entry point of the createBeans() recursive calls
this.createBean(n, this.graphManager());
this.initialize(options);
| protected void | initOptions(int options)
// The graph manager is allocated in the bean root
this.graphManager = new GraphManager(this);
this.createRoot("sun-connector", "SunConnector", // NOI18N
Common.TYPE_1 | Common.TYPE_BEAN, SunConnector.class);
// Properties (see root bean comments for the bean graph)
this.createProperty("resource-adapter", // NOI18N
RESOURCE_ADAPTER,
Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
ResourceAdapter.class);
this.createAttribute(RESOURCE_ADAPTER, "jndi-name", "JndiName",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(RESOURCE_ADAPTER, "max-pool-size", "MaxPoolSize",
AttrProp.CDATA,
null, "32");
this.createAttribute(RESOURCE_ADAPTER, "steady-pool-size", "SteadyPoolSize",
AttrProp.CDATA,
null, "4");
this.createAttribute(RESOURCE_ADAPTER, "max-wait-time-in-millis", "MaxWaitTimeInMillis",
AttrProp.CDATA,
null, "10000");
this.createAttribute(RESOURCE_ADAPTER, "idle-timeout-in-seconds", "IdleTimeoutInSeconds",
AttrProp.CDATA,
null, "1000");
this.createProperty("role-map", // NOI18N
ROLE_MAP,
Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
RoleMap.class);
this.createAttribute(ROLE_MAP, "map-id", "MapId",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.initialize(options);
| void | initialize(int options)
| private void | readObject(java.io.ObjectInputStream in)
try{
init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
String strDocument = in.readUTF();
// System.out.println("strDocument='"+strDocument+"'");
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
Document doc = GraphManager.createXmlDocument(bais, false);
initOptions(Common.NO_DEFAULT_VALUES);
initFromNode(doc, Common.NO_DEFAULT_VALUES);
}
catch (Schema2BeansException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public void | setResourceAdapter(ResourceAdapter value)
this.setValue(RESOURCE_ADAPTER, value);
| public void | setRoleMap(RoleMap value)
this.setValue(ROLE_MAP, value);
| public void | validate()
boolean restrictionFailure = false;
// Validating property resourceAdapter
if (getResourceAdapter() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getResourceAdapter() == null", "resourceAdapter", this); // NOI18N
}
getResourceAdapter().validate();
// Validating property roleMap
if (getRoleMap() != null) {
getRoleMap().validate();
}
| private void | writeObject(java.io.ObjectOutputStream out)
ByteArrayOutputStream baos = new ByteArrayOutputStream();
write(baos);
String str = baos.toString();;
// System.out.println("str='"+str+"'");
out.writeUTF(str);
|
|