Class AdminProfile

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, IAuthorizer

    public class AdminProfile
    extends java.lang.Object
    implements javax.servlet.http.HttpSessionBindingListener, IAuthorizer
    The profile object contains an admin user's login information, and helps establish the session model for the application. This particular bean maintains the user (against the IAdminUserManager service).
    • Constructor Detail

      • AdminProfile

        public AdminProfile()
        Constructor.
    • Method Detail

      • session

        public java.lang.String session()
        Get the current session identifier.
        Returns:
        the identifier.
      • getUserID

        public java.lang.String getUserID()
        Get the admin user id.
        Returns:
        the last login user id.
      • getManageUsers

        public boolean getManageUsers()
        Get whether this user can manage users.
        Returns:
        true if the user can manage other users.
      • logout

        public void logout()
        Log out the current user.
      • login

        public void login​(IThreadContext threadContext,
                          java.lang.String userID,
                          java.lang.String userPassword)
        Log on the user, with the already-set user id and company description.
        Parameters:
        userPassword - is the login password for the user.
      • getLoggedOn

        public boolean getLoggedOn()
        Get the logged-in status, which will be false if the log-in did not succeed, or timed out.
        Returns:
        the current login status: true if logged in.
      • getLoginTime

        public java.lang.String getLoginTime()
        Get the current login time as a string.
        Returns:
        the last login time.
      • getLoginTimeLong

        public long getLoginTimeLong()
        Get the current login time as a long.
        Returns:
        the last login time.
      • getPasswordMapper

        public PasswordMapper getPasswordMapper()
        Get the password mapper object.
        Returns:
        the password mapper object.
      • valueBound

        public void valueBound​(javax.servlet.http.HttpSessionBindingEvent e)
        Specified by:
        valueBound in interface javax.servlet.http.HttpSessionBindingListener
      • valueUnbound

        public void valueUnbound​(javax.servlet.http.HttpSessionBindingEvent e)
        Specified by:
        valueUnbound in interface javax.servlet.http.HttpSessionBindingListener