Package com.saperion.ws
Class SaWsAuthenticationService
java.lang.Object
com.saperion.ws.AbstractService
com.saperion.ws.SaWsAuthenticationService
This class wraps all methods of the SaClassicConnector. It parses the information, which is
fetched from the server to classes usable for web services. JAX-B requires classes to be
JavaBeans, because it uses the set/get-Methods.
You need a token for calling the methods to perform searches and modifications. For getting a
token the logon method has to be called. If the thread is timed out on the backend or if you
aren't logged in you will get an exception.
- Author:
- Daniel Manzke(dam)
-
Field Summary
Fields inherited from class com.saperion.ws.AbstractService
configured
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if the session identified by the given token is alive.Login to the backend system.boolean
Logoff from the backend system.logon
(String username, String password, SaWsLicenseType type, String mandant) Logon to the backend system.Methods inherited from class com.saperion.ws.AbstractService
addToRequest, getConnection, getSession, isConfigured
-
Constructor Details
-
SaWsAuthenticationService
public SaWsAuthenticationService()Constructor.
-
-
Method Details
-
logoff
Logoff from the backend system. This command also destroys the command thread on the java broker server.- Parameters:
token
- to identify the session.- Returns:
- boolean. True, if logoff successful.
- Throws:
SaWsException
- if an error occurs.- See Also:
-
SaClassicConnector.logoff()
-
logon
public String logon(String username, String password, SaWsLicenseType type, String mandant) throws SaWsException Logon to the backend system.- Parameters:
username
- Usernamepassword
- Passwordtype
- User typemandant
- client name- Returns:
- User token for future use.
- Throws:
SaWsException
- if an error occurs.- See Also:
-
SaClassicConnector.logon(java.lang.String, java.lang.String, int, java.lang.String)
-
login
public String login(String username, String password, int type, String mandant) throws SaWsException Login to the backend system. Following client types are supported: 1=index, 2=query, 3=admin- Parameters:
username
- Usernamepassword
- Passwordtype
- User typemandant
- client name- Returns:
- User token for future use
- Throws:
SaWsException
- if an error occurs.- See Also:
-
SaClassicConnector.logon(java.lang.String, java.lang.String, int, java.lang.String)
-
isAlive
Determines if the session identified by the given token is alive.- Parameters:
token
- The token which identifies the session.- Returns:
- the boolean indication the isAlive state.
- Throws:
SaWsAuthenticationException
- if an authentication error occurs.SaWsRepositoryException
- if a repository error occurs.
-