@SuppressWarnings("unchecked")
public SecurityAttributesImpl(JetspeedPrincipal jp, Collection avColl, boolean readOnly, boolean extendable)
{
this.jp = jp;
this.avColl = avColl;
this.persistent = true;
this.readOnly = jp.getType().getAttributeTypes().isReadOnly() ? true : readOnly;
this.extendable = jp.getType().getAttributeTypes().isExtendable() ? true : extendable;
Map<String, SecurityAttributeType> stMap = jp.getType().getAttributeTypes().getAttributeTypeMap();
for (Object avObj : avColl)
{
SecurityAttributeValue av = (SecurityAttributeValue)avObj;
SecurityAttributeType sat = stMap.get(av.getName());
saMap.put(av.getName(), new SecurityAttributeImpl(sat != null ? sat : new SecurityAttributeTypeImpl(av.getName()), av, true));
}
}