Collection<Attribute> attrsToBeUpdated = new ArrayList<Attribute>();
if (updatedPrincipal == null)
{
// principal does not exist yet, create it using the Jetspeed
// principal manager
updatedPrincipal = principalManager.newPrincipal(entity.getId(), true);
try
{
principalManager.addPrincipal(updatedPrincipal, null);
if (logger.isDebugEnabled()){
logger.debug("Adding principal "+updatedPrincipal.getName()+" of type "+updatedPrincipal.getType().getName()+" ...");