Class AccountController

java.lang.Object
eu.getmangos.controllers.AccountController

@ApplicationScoped
public class AccountController
extends Object
  • Constructor Details

  • Method Details

    • register

      public void register​(Account account) throws DAOException
      Throws:
      DAOException
    • update

      public void update​(Account account) throws DAOException
      Throws:
      DAOException
    • delete

      public void delete​(Integer id) throws DAOException
      Delete an account in the database. This method will also delete all links with the bans for this account.
      Parameters:
      id - The ID of the account to be deleted.
      Throws:
      DAOException - Send a DAOException if something happened during the data validation.
    • notifyAccountEvent

      public org.reactivestreams.Publisher<AccountEventDTO> notifyAccountEvent()
    • find

      public Account find​(Integer id)
      Retrieves an account by its ID.
      Parameters:
      id - The ID of the account
      Returns:
      The account if found, null otherwise.
    • search

      public Account search​(String name)
      Search an account by its name
      Parameters:
      name - The name of the account.
      Returns:
      The matching account for the given name.
    • searchByEmail

      public Account searchByEmail​(String email)
      Search an account by its email address
      Parameters:
      email - The email of the account.
      Returns:
      The matching account for the given email.
    • findAll

      public List<Account> findAll()
      Retrieves all accounts from the database.
      Returns:
      A list of Account.