Class AppsBusinessLogic

java.lang.Object
net.tangly.app.services.AppsBusinessLogic

public class AppsBusinessLogic extends Object
The business logic of the application is responsible for the processing of the business rules and the orchestration of the domain objects.
  • Constructor Details

    • AppsBusinessLogic

      public AppsBusinessLogic(@NotNull @NotNull AppsRealm realm)
  • Method Details

    • realm

      public AppsRealm realm()
    • activeUsersFor

      public List<String> activeUsersFor(String domain)
      Returns the list of active users for a domain.
      Parameters:
      domain - the domain for which the active users are requested
      Returns:
      the list of active users for the domain
    • usersFor

      public List<String> usersFor(String domain)
      Returns the list of users for a domain.
      Parameters:
      domain - the domain for which the users are requested
      Returns:
      the list of users for the domain
    • login

      public Optional<net.tangly.core.domain.User> login(@NotNull @NotNull String username, @NotNull @NotNull String password)
      Logins a user identified by its username and password.
      Parameters:
      username - the username of the user
      password - the password of the user
      Returns:
      the user if the login is successful
    • changePassword

      public boolean changePassword(String username, String password, String newPassword)
      Changes the password of a user identified by its username and password.
      Parameters:
      username - the username of the user
      password - the current password of the user
      newPassword - the new password of the user
      Returns:
      true if the password is changed successfully