public SSOUser addUser(String name, Long domainId, JetspeedPrincipal ownerPrincipal)
throws SecurityException
{
SSOUser user = newUser(name, domainId);
Set<JetspeedPrincipalAssociationReference> reqAssociations = new HashSet<JetspeedPrincipalAssociationReference>();
reqAssociations.add(new JetspeedPrincipalAssociationReference(JetspeedPrincipalAssociationReference.Type.TO, ownerPrincipal, IsOwnedByPrincipalAssociationHandler.ASSOCIATION_NAME));
super.addPrincipal(user, reqAssociations);
// by default add a relation to the owner
super.addAssociation(user, ownerPrincipal, IsRemoteIdentityForPrincipalAssociationHandler.ASSOCIATION_NAME);
return user;
}