FileDocCategorySizeDatePackage
SecurityMap.javaAPI DocGlassfish v2 API8844Tue Feb 21 12:28:22 GMT 2006com.sun.enterprise.config.serverbeans

SecurityMap

public class SecurityMap extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class SecurityMap matches the DTD element security-map

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
PRINCIPAL
public static final String
USER_GROUP
public static final String
BACKEND_PRINCIPAL
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 voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddPrincipal(java.lang.String value)

		return addPrincipal(value, true);
	
public intaddPrincipal(java.lang.String value, boolean overwrite)

		return this.addValue(PRINCIPAL, value, overwrite);
	
public intaddUserGroup(java.lang.String value)

		return addUserGroup(value, true);
	
public intaddUserGroup(java.lang.String value, boolean overwrite)

		return this.addValue(USER_GROUP, value, overwrite);
	
public voiddump(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.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("SecurityMap\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public BackendPrincipalgetBackendPrincipal()

		return (BackendPrincipal)this.getValue(BACKEND_PRINCIPAL);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
	return null;
	
public java.lang.StringgetName()
Getter for Name of the Element security-map

return
the Name of the Element security-map

		return getAttributeValue(ServerTags.NAME);
	
public java.lang.String[]getPrincipal()

		return (String[])this.getValues(PRINCIPAL);
	
protected java.lang.StringgetRelativeXPath()
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);
	
voidinitialize(int options)


	
public BackendPrincipalnewBackendPrincipal()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new BackendPrincipal();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremovePrincipal(java.lang.String value, boolean overwrite)

		return this.removeValue(PRINCIPAL, value, overwrite);
	
public intremovePrincipal(java.lang.String value)

		return this.removeValue(PRINCIPAL, value);
	
public intremoveUserGroup(java.lang.String value)

		return this.removeValue(USER_GROUP, value);
	
public intremoveUserGroup(java.lang.String value, boolean overwrite)

		return this.removeValue(USER_GROUP, value, overwrite);
	
public voidsetBackendPrincipal(BackendPrincipal value)

		this.setValue(BACKEND_PRINCIPAL, value);
	
public voidsetName(java.lang.String v, boolean overwrite)
Modify the Name of the Element security-map

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.NAME, v, overwrite);
	
public voidsetName(java.lang.String v)
Modify the Name of the Element security-map

param
v the new value

		setAttributeValue(ServerTags.NAME, v);
	
public voidsetPrincipal(java.lang.String[] value)

		this.setValue(PRINCIPAL, value);
	
public voidsetUserGroup(java.lang.String[] value)

		this.setValue(USER_GROUP, value);
	
public intsizePrincipal()

		return this.size(PRINCIPAL);
	
public intsizeUserGroup()

		return this.size(USER_GROUP);
	
public voidvalidate()