Example #1
0
  @Override
  public MailAccount unmarshal(AdaptedMailAccount adaptedMailAaccount) throws Exception {
    MailAccount restoredMailAccount =
        new MailAccount(
            adaptedMailAaccount.getEmailadress(),
            adaptedMailAaccount.getPassword(),
            adaptedMailAaccount.getSmtpHost(),
            adaptedMailAaccount.getSmtpPort(),
            adaptedMailAaccount.getPop3Host(),
            adaptedMailAaccount.getPop3Port());
    restoredMailAccount.setFolders(adaptedMailAaccount.getFolders());

    return restoredMailAccount;
  }
Example #2
0
  @Override
  public AdaptedMailAccount marshal(MailAccount mailAccount) throws Exception {
    AdaptedMailAccount adaptedMailAccount = new AdaptedMailAccount();

    adaptedMailAccount.setEmailadress(mailAccount.getEmailadress());
    adaptedMailAccount.setPassword(mailAccount.getPassword());
    adaptedMailAccount.setSmtpHost(mailAccount.getSmtpHost());
    adaptedMailAccount.setSmtpPort(mailAccount.getSmtpPort());
    adaptedMailAccount.setPop3Host(mailAccount.getPop3Host());
    adaptedMailAccount.setPop3Port(mailAccount.getPop3Port());
    adaptedMailAccount.setFolders(mailAccount.getFolders());

    return adaptedMailAccount;
  }