Constructors Summary |
---|
public SecurityMap()
this(Common.USE_DEFAULT_VALUES);
|
public SecurityMap(int options)
super(comparators, runtimeVersion);
// Properties (see root bean comments for the bean graph)
initPropertyTables(3);
this.createProperty("principal", PRINCIPAL, Common.SEQUENCE_OR |
Common.TYPE_1_N | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("user-group", USER_GROUP, Common.SEQUENCE_OR |
Common.TYPE_1_N | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("backend-principal", BACKEND_PRINCIPAL,
Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
BackendPrincipal.class);
this.createAttribute(BACKEND_PRINCIPAL, "user-name", "UserName",
AttrProp.CDATA | AttrProp.REQUIRED,
null, null);
this.createAttribute(BACKEND_PRINCIPAL, "password", "Password",
AttrProp.CDATA | AttrProp.IMPLIED,
null, null);
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addPrincipal(java.lang.String value)
return addPrincipal(value, true);
|
public int | addPrincipal(java.lang.String value, boolean overwrite)
return this.addValue(PRINCIPAL, value, overwrite);
|
public int | addUserGroup(java.lang.String value)
return addUserGroup(value, true);
|
public int | addUserGroup(java.lang.String value, boolean overwrite)
return this.addValue(USER_GROUP, 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("Principal["+this.sizePrincipal()+"]"); // NOI18N
for(int i=0; i<this.sizePrincipal(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
o = this.getValue(PRINCIPAL, i);
str.append((o==null?"null":o.toString().trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(PRINCIPAL, i, str, indent);
}
str.append(indent);
str.append("UserGroup["+this.sizeUserGroup()+"]"); // NOI18N
for(int i=0; i<this.sizeUserGroup(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
o = this.getValue(USER_GROUP, i);
str.append((o==null?"null":o.toString().trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(USER_GROUP, i, str, indent);
}
str.append(indent);
str.append("BackendPrincipal"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getBackendPrincipal();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(BACKEND_PRINCIPAL, 0, str, indent);
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("SecurityMap\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public BackendPrincipal | getBackendPrincipal()
return (BackendPrincipal)this.getValue(BACKEND_PRINCIPAL);
|
public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
return null;
|
public java.lang.String | getName()Getter for Name of the Element security-map
return getAttributeValue(ServerTags.NAME);
|
public java.lang.String[] | getPrincipal()
return (String[])this.getValues(PRINCIPAL);
|
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 = "security-map" + (canHaveSiblings() ? "[@name='" + getAttributeValue("name") +"']" : "") ;
return (null != ret ? ret.trim() : null);
|
public java.lang.String[] | getUserGroup()
return (String[])this.getValues(USER_GROUP);
|
void | initialize(int options)
|
public BackendPrincipal | newBackendPrincipal()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new BackendPrincipal();
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removePrincipal(java.lang.String value, boolean overwrite)
return this.removeValue(PRINCIPAL, value, overwrite);
|
public int | removePrincipal(java.lang.String value)
return this.removeValue(PRINCIPAL, value);
|
public int | removeUserGroup(java.lang.String value)
return this.removeValue(USER_GROUP, value);
|
public int | removeUserGroup(java.lang.String value, boolean overwrite)
return this.removeValue(USER_GROUP, value, overwrite);
|
public void | setBackendPrincipal(BackendPrincipal value)
this.setValue(BACKEND_PRINCIPAL, value);
|
public void | setName(java.lang.String v, boolean overwrite)Modify the Name of the Element security-map
setAttributeValue(ServerTags.NAME, v, overwrite);
|
public void | setName(java.lang.String v)Modify the Name of the Element security-map
setAttributeValue(ServerTags.NAME, v);
|
public void | setPrincipal(java.lang.String[] value)
this.setValue(PRINCIPAL, value);
|
public void | setUserGroup(java.lang.String[] value)
this.setValue(USER_GROUP, value);
|
public int | sizePrincipal()
return this.size(PRINCIPAL);
|
public int | sizeUserGroup()
return this.size(USER_GROUP);
|
public void | validate()
|