Package com.saperion.ngc.authorization
Class AuthorizationPresenter
java.lang.Object
com.saperion.ngc.authorization.AuthorizationPresenter
- All Implemented Interfaces:
Presenter
Presenter for authentication functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks for existing sessions of logged in user.void
Checks if the user is absent.protected void
Checks model connection.protected void
logoff()
Logoff.protected void
boolean
protected void
onCreate()
Set the selected userType.void
setLastUser
(String lastUser) Sets the last user name.protected void
startup()
Startup.
-
Constructor Details
-
AuthorizationPresenter
- Parameters:
authView
- View
-
-
Method Details
-
startup
Startup.- Throws:
NgcUiException
- system exception on startup
-
onCreate
protected void onCreate()Set the selected userType. After the UserType Combobox is completely rendered ! -
checkModelConnection
Checks model connection.- Throws:
NgcUiException
- system exception while checking connection status
-
logon
protected void logon(String username, String password, int selectedItem, String mandant) throws NgcUiException, AuthenticationException - Parameters:
username
- Usernamepassword
- PasswordselectedItem
- Index of the selected item in the user-type-comboboxmandant
- Mandant- Throws:
NgcUiException
- Exception to be handled by viewAuthenticationException
- password has expired
-
logoff
Logoff.- Throws:
NgcUiException
- a locked document could not be unlocked or a system exception occurred
-
getLastUser
- Returns:
- last user name
-
setLastUser
Sets the last user name.- Parameters:
lastUser
- last user name
-
checkIfUserIsAbsent
public void checkIfUserIsAbsent()Checks if the user is absent. If so, a messagebox will be shown that offers the option to disable the absence. -
checkForExistingSessions
public void checkForExistingSessions()Checks for existing sessions of logged in user. If present, then show a message box to choose whether user wants terminate them or not -
logoutHandledByLogonProvider
public boolean logoutHandledByLogonProvider()
-