MapElementpublic class MapElement extends com.sun.enterprise.tools.common.dd.SunBaseBean This generated bean class MapElement matches the schema element map-element
Generated on Thu Jul 31 18:16:39 PDT 2003 |
Fields Summary |
---|
static Vector | comparators | public static final String | PRINCIPAL | public static final String | BACKEND_PRINCIPAL | public static final String | BACKENDPRINCIPALUSERNAME | public static final String | BACKENDPRINCIPALPASSWORD | public static final String | BACKENDPRINCIPALCREDENTIAL |
Constructors Summary |
---|
public MapElement() // NOI18N
this(Common.USE_DEFAULT_VALUES);
| public MapElement(int options)
super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
// Properties (see root bean comments for the bean graph)
this.createProperty("principal", // NOI18N
PRINCIPAL,
Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY,
Principal.class);
this.createAttribute(PRINCIPAL, "user-name", "UserName",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createProperty("backend-principal", // NOI18N
BACKEND_PRINCIPAL,
Common.TYPE_0_1 | Common.TYPE_BOOLEAN | Common.TYPE_KEY,
Boolean.class);
this.createAttribute(BACKEND_PRINCIPAL, "user-name", "UserName",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(BACKEND_PRINCIPAL, "password", "Password",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(BACKEND_PRINCIPAL, "credential", "Credential",
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 | addPrincipal(com.sun.enterprise.tools.common.dd.connector.Principal value)
return this.addValue(PRINCIPAL, value);
| 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("Principal["+this.sizePrincipal()+"]"); // NOI18N
for(int i=0; i<this.sizePrincipal(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getPrincipal(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(PRINCIPAL, i, str, indent);
}
str.append(indent);
str.append("BackendPrincipal"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append((this.isBackendPrincipal()?"true":"false"));
this.dumpAttributes(BACKEND_PRINCIPAL, 0, str, indent);
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("MapElement\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public java.lang.String | getBackendPrincipalCredential()
// If our element does not exist, then the attribute does not exist.
if (size(BACKEND_PRINCIPAL) == 0) {
return null;
} else {
return getAttributeValue(BACKEND_PRINCIPAL, "Credential");
}
| public java.lang.String | getBackendPrincipalPassword()
// If our element does not exist, then the attribute does not exist.
if (size(BACKEND_PRINCIPAL) == 0) {
return null;
} else {
return getAttributeValue(BACKEND_PRINCIPAL, "Password");
}
| public java.lang.String | getBackendPrincipalUserName()
// If our element does not exist, then the attribute does not exist.
if (size(BACKEND_PRINCIPAL) == 0) {
return null;
} else {
return getAttributeValue(BACKEND_PRINCIPAL, "UserName");
}
| public com.sun.enterprise.tools.common.dd.connector.Principal | getPrincipal(int index)
return (Principal)this.getValue(PRINCIPAL, index);
| public com.sun.enterprise.tools.common.dd.connector.Principal[] | getPrincipal()
return (Principal[])this.getValues(PRINCIPAL);
| void | initialize(int options)
| public boolean | isBackendPrincipal()
Boolean ret = (Boolean)this.getValue(BACKEND_PRINCIPAL);
if (ret == null)
ret = (Boolean)Common.defaultScalarValue(Common.TYPE_BOOLEAN);
return ((java.lang.Boolean)ret).booleanValue();
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removePrincipal(com.sun.enterprise.tools.common.dd.connector.Principal value)
return this.removeValue(PRINCIPAL, value);
| public void | setBackendPrincipal(boolean value)
this.setValue(BACKEND_PRINCIPAL, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
| public void | setBackendPrincipalCredential(java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(BACKEND_PRINCIPAL) == 0) {
setValue(BACKEND_PRINCIPAL, "");
}
setAttributeValue(BACKEND_PRINCIPAL, "Credential", value);
| public void | setBackendPrincipalPassword(java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(BACKEND_PRINCIPAL) == 0) {
setValue(BACKEND_PRINCIPAL, "");
}
setAttributeValue(BACKEND_PRINCIPAL, "Password", value);
| public void | setBackendPrincipalUserName(java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(BACKEND_PRINCIPAL) == 0) {
setValue(BACKEND_PRINCIPAL, "");
}
setAttributeValue(BACKEND_PRINCIPAL, "UserName", value);
| public void | setPrincipal(int index, com.sun.enterprise.tools.common.dd.connector.Principal value)
this.setValue(PRINCIPAL, index, value);
| public void | setPrincipal(com.sun.enterprise.tools.common.dd.connector.Principal[] value)
this.setValue(PRINCIPAL, value);
| public int | sizePrincipal()
return this.size(PRINCIPAL);
| public void | validate()
boolean restrictionFailure = false;
// Validating property principal
if (sizePrincipal() == 0) {
throw new org.netbeans.modules.schema2beans.ValidateException("sizePrincipal() == 0", "principal", this); // NOI18N
}
for (int _index = 0; _index < sizePrincipal(); ++_index) {
com.sun.enterprise.tools.common.dd.connector.Principal element = getPrincipal(_index);
if (element != null) {
element.validate();
}
}
// Validating property backendPrincipal
// Validating property backendPrincipalUserName
if (getBackendPrincipalUserName() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getBackendPrincipalUserName() == null", "backendPrincipalUserName", this); // NOI18N
}
// Validating property backendPrincipalPassword
if (getBackendPrincipalPassword() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getBackendPrincipalPassword() == null", "backendPrincipalPassword", this); // NOI18N
}
// Validating property backendPrincipalCredential
if (getBackendPrincipalCredential() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getBackendPrincipalCredential() == null", "backendPrincipalCredential", this); // NOI18N
}
|
|