if (principal == null)
{
// principal does not exist yet, create a new one using the principal manager
principal = principalManager.newPrincipal(entity.getId(), true);
principalManager.addPrincipal(principal, toAssociations);
syncAll = true;
}
else if (!principal.isMapped())
{
feedbackLogger.warn("Found {} principal: {} is not mapped therefore not synchronized!", principal.getType().getName(),principal.getName());