Пример #1
0
 /*
  * (non-Javadoc)
  *
  * @see com.wiley.gr.ace.authorservices.services.service.UserLoginService#
  * searchUserInParticipantByALMId(java.lang.String)
  */
 @Override
 public boolean searchUserInParticipantByALMId(final String almUserId) {
   boolean userFound = true;
   Participant participant = participantsInterfaceService.searchParticipantByUserId(almUserId);
   if (participant == null) {
     userFound = false;
   }
   return userFound;
 }
Пример #2
0
  /*
   * (non-Javadoc)
   *
   * @see com.wiley.gr.ace.authorservices.services.service.UserLoginService#
   * getUserDetailsFromParticipantService(java.lang.String)
   */
  @Override
  public User getUserDetailsFromParticipantService(final String emailId) {
    User userDetails = null;

    Participant participantDetails =
        participantsInterfaceService.searchParticipantByEmailId(emailId);

    if (participantDetails != null) {
      userDetails = new User();
      userDetails.setUserId(participantDetails.getParticipantId());
      userDetails.setFirstName(participantDetails.getGivenName());
      userDetails.setLastName(participantDetails.getFamilyName());
      userDetails.setOrcidId(participantDetails.getOrcidId());
    }

    return userDetails;
  }
Пример #3
0
  @Override
  public boolean resetByEmail(final String emailId) {

    ParticipantGetResponse participantGetResponse =
        participantsInterfaceService.searchParticipantByEmail(emailId);

    if (participantGetResponse.getParticipantList().isEmpty()) {
      throw new ASException("111", "data not founddd");
    }

    if (!participantGetResponse.getParticipantList().isEmpty()
        && participantGetResponse.getParticipantList().size() > 0) {
      List<Participant> participantsList = participantGetResponse.getParticipantList();

      if (!participantsList.isEmpty()) {
        insertGuid(emailId, participantsList.get(0).getEmail(), "");
      }
    }

    return false;
  }