JetspeedPrincipal principal = null;
if (!(principalManager.principalExists(name)))
{
principal = principalManager.newPrincipal(name, jsPrincipal.isMapped());
JSSecurityAttributes jsSecAttrs = jsPrincipal.getSecurityAttributes();
if (jsSecAttrs != null)
{
for (JSNVPElement elem : jsSecAttrs.getValues())
{
principal.getSecurityAttributes().getAttribute(elem.getKey(), true).setStringValue(elem.getValue());
}
}
principalManager.addPrincipal(principal, null);