Class SetPilotEMail

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetPilotEMail

public class SetPilotEMail extends DAO
A Data Access Object to update Pilot IMAP data.
Since:
1.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • SetPilotEMail

      public SetPilotEMail(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • delete

      public void delete(int id) throws DAOException
      Deletes a user's e-mail configuration. This will not delete the mailbox on the server, merely the address records used by Postfix and Dovecot.
      Parameters:
      id - the Pilot's database ID
      Throws:
      DAOException - if a JDBC error occurs
    • disable

      public void disable(int id) throws DAOException
      Disables a user's e-mail address.
      Parameters:
      id - the Pilot's database ID
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(IMAPConfiguration cfg, String name) throws DAOException
      Writes a new e-mail configuration to the database.
      Parameters:
      cfg - the EMailConfiguration bean
      name - the Pilot name
      Throws:
      DAOException - if a JDBC error occurs
    • update

      public void update(IMAPConfiguration cfg, String name) throws DAOException
      Updates a user's e-mail configuration to the database.
      Parameters:
      cfg - the EMailConfiguration bean
      name - the Pilot name
      Throws:
      DAOException - if a JDBC error occurs
    • updatePassword

      public void updatePassword(int id, String pwd) throws DAOException
      Updates a Pilot's IMAP mailbox password.
      Parameters:
      id - the Pilot's database ID
      pwd - the new password
      Throws:
      DAOException - if a JDBC error occurs