private String generateTicket() {
    final StringBuilder builder = new StringBuilder();

    builder.append(getExternalId());
    builder.append(hashCode());

    final InstitutionAffiliationEvent event = getInstitutionAffiliationEvent();
    final Person person = event.getPerson();
    final User user = person.getUser();
    builder.append(user.getUserUId());
    builder.append(user.getExternalId());

    final DateTime instant = getGenerated();
    builder.append(instant.toString("yyyy-MM-dd HH:mm:ss"));

    return DigestUtils.shaHex(builder.toString());
  }
Esempio n. 2
0
 private String getNickname(final User user) {
   return user == null ? "" : getNickname(user.getPerson());
 }
Esempio n. 3
0
 private String getNickname(final String username) {
   return username == null || username.isEmpty()
       ? ""
       : getNickname(User.readUserByUserUId(username));
 }