コード例 #1
0
 /**
  * True if all existing users for the identity are valid, otherwise admin is notified, except if
  * principal is empty.
  *
  * @param contextId
  * @param principal
  */
 public boolean notifyAdminIfUserIsNotValid(Integer contextId, String principal) {
   if (principal != null && principal.length() > 0) {
     Identity identity = identityRepository.findByPrincipal(principal);
     Signup signup = new Signup(contextId, principal);
     if (identity != null) {
       signup.setFirstName(identity.getIdentityFirstName());
     }
     return allUsersForIdentityAreValid(signup);
   }
   return false;
 }
コード例 #2
0
 public ParticipantReadAdapter build(Report report, Identity identity) {
   if (adaptee == null) {
     throw new RuntimeException("Null participant cannot be persisted.");
   }
   // TODO verify participant.getStaffMember().getId()
   return new ParticipantReadAdapter(
       adaptee.getId(),
       report.getId(),
       identity.getId(),
       identity.getIdentityFirstName(),
       identity.getIdentityLastName(),
       identity.getDisplayName(),
       adaptee.getAssignmentType(),
       adaptee.getStaffMember().getId());
 }