Пример #1
0
 public TransferDTO createTransfer(String senderId) throws Exception {
   CustomerDTO customerDTO = customerManager.selectCustomer(senderId);
   TransferDTO transferDTO = new TransferDTO();
   transferDTO.setSenderId(senderId);
   transferDTO.setSenderName(customerDTO.getName());
   transferDTO.setExecutionDate(Calendar.getInstance().getTime());
   return transferDTO;
 }
Пример #2
0
  public PasswordDTO createPassword(String senderId) throws Exception {
    PasswordDTO passwordDTO = new PasswordDTO();
    CustomerDTO customerDTO = customerManager.selectCustomer(senderId);

    switch (customerDTO.getSecurityType()) {
      case OTP:
        passwordDTO.setOtpTokenSerialNumber(customerDTO.getOtpTokenSerialNumber());
        break;
      case SECURITY_CARD:
        passwordDTO.setSecurityCardSerialNumber(customerDTO.getSecurityCardSerialNumber());
        break;
      default:
        throw new RollbackCommonException("Unsupported security type");
    }
    return passwordDTO;
  }