Interface AuthorizationService
-
- All Known Implementing Classes:
AuthClassicConnectorService
public interface AuthorizationServiceService interface for authorization to specific models.- Author:
- mak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanautoLogon()This function tries to automatic logon with SSO or NTLM.booleanautoLogon(com.saperion.connector.authentication.SessionInfo sessionInfo)This function tries to automatic logon with SSO or NTLM, passing the web session information.UserchangePassword(User user, java.lang.String newPassword)Changes the password of the given user.booleancloseSession(com.saperion.connector.authentication.Session session)Close the givenSessionUsergetCurrentUser()java.lang.StringgetLastUser()SystemTypegetSystemType()Get the system type.java.util.List<UserType>getUserTypes()Get available user types.ModelConnectionStatusisConnected()Check connection status.voidlogoff()Logoff from service.Userlogon(AuthenticationInformation auth)Logon to service.booleanlogoutHandledByLogonProvider()This method checks if aLogonProvideris responsible of handling actions to be done after the user was logged out.voidsetCurrentUserPresent(boolean present)Sets whether the current user is present.voidsetCurrentUserSubstituteAccessEnabled(boolean accessEnabled)Sets whether the current user's substitute has access to the users workflow-inbox.voidsetLastUser(java.lang.String lastUser)Sets the last user name.voidsetLocale(java.util.Locale locale)Sets the locale for the underlying connection to the backend.
-
-
-
Method Detail
-
logon
User logon(AuthenticationInformation auth) throws AuthenticationException, SystemException
Logon to service.- Parameters:
auth- authentication information- Returns:
- the currently logged on user
- Throws:
AuthenticationException- when authentication to the backend has failedSystemException- system exception when logging on
-
autoLogon
boolean autoLogon() throws AuthenticationException, SystemExceptionThis function tries to automatic logon with SSO or NTLM.- Returns:
- true, if automatic logon could be used, false, if no automatic data is set!
- Throws:
AuthenticationException- when authentication to the backend has failedSystemException- system exception when logging on
-
autoLogon
boolean autoLogon(com.saperion.connector.authentication.SessionInfo sessionInfo) throws AuthenticationException, SystemExceptionThis function tries to automatic logon with SSO or NTLM, passing the web session information.- Parameters:
sessionInfo- The web session information- Returns:
- true, if automatic logon could be used, false, if no automatic data is set!
- Throws:
AuthenticationException- when authentication to the backend has failedSystemException- system exception when logging on
-
logoutHandledByLogonProvider
boolean logoutHandledByLogonProvider()
This method checks if aLogonProvideris responsible of handling actions to be done after the user was logged out. If a responsible provider is found, it's logout method will be called and this method will return true.- Returns:
- true if logout was handled by a LogonProvier
-
logoff
void logoff() throws AuthenticationException, DocumentLockException, SystemExceptionLogoff from service.- Throws:
AuthenticationException- authentication to the backend has failedDocumentLockException- when a locked document could not be unlockedSystemException- when logoff has failed
-
getUserTypes
java.util.List<UserType> getUserTypes()
Get available user types.- Returns:
- Usertypes
-
getSystemType
SystemType getSystemType() throws SystemException
Get the system type.- Returns:
- System type
- Throws:
SystemException- when the system type can not be determined
-
isConnected
ModelConnectionStatus isConnected() throws SystemException
Check connection status.- Returns:
- Connection status
- Throws:
SystemException- when the connection status can not be determined
-
setLastUser
void setLastUser(java.lang.String lastUser)
Sets the last user name.- Parameters:
lastUser- last user name
-
getLastUser
java.lang.String getLastUser()
- Returns:
- last user name
-
setCurrentUserPresent
void setCurrentUserPresent(boolean present) throws SystemException, AuthenticationExceptionSets whether the current user is present.- Parameters:
present- whether the current user is present- Throws:
SystemException- when a system exception while setting presence occursAuthenticationException- when authentication to the backend has failed
-
setCurrentUserSubstituteAccessEnabled
void setCurrentUserSubstituteAccessEnabled(boolean accessEnabled) throws SystemException, AuthenticationExceptionSets whether the current user's substitute has access to the users workflow-inbox.- Parameters:
accessEnabled- whether the substitute has access- Throws:
SystemException- when a system exception while setting presence occursAuthenticationException- when authentication to the backend has failed
-
getCurrentUser
User getCurrentUser() throws AuthenticationException, SystemException
- Returns:
- Information about the currently logged in User. The instance obtained will not contain information about the authorization (getAuthenticationInformation() will return null).
- Throws:
AuthenticationException- when authentication to the backend has failedSystemException- when a system exception while obtaining the information occurs
-
changePassword
User changePassword(User user, java.lang.String newPassword) throws SystemException, AuthenticationException
Changes the password of the given user. The authentication information of the user needs to be given. This means that the password of the user has to be known.- Parameters:
user- The user to change the password for. If the authentication information is not given, the call will fail, since the current password is needed to succeed.newPassword- The new password for the user- Returns:
- updated user information
- Throws:
AuthenticationException- when authentication to the backend has failedSystemException- when a system exception while obtaining the information occurs
-
setLocale
void setLocale(java.util.Locale locale) throws AuthenticationException, SystemExceptionSets the locale for the underlying connection to the backend. Does not change the locale of the client!- Parameters:
locale- locale to set- Throws:
AuthenticationException- authentication exception when setting localeSystemException- system exception when setting locale
-
closeSession
boolean closeSession(com.saperion.connector.authentication.Session session) throws AuthenticationException, SystemExceptionClose the givenSession- Parameters:
session-- Returns:
- true if successful, false otherwise
- Throws:
AuthenticationExceptionSystemException
-
-