Class SaWsAuthenticationService


  • public class SaWsAuthenticationService
    extends AbstractService
    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)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAlive​(java.lang.String token)
      Determines if the session identified by the given token is alive.
      java.lang.String login​(java.lang.String username, java.lang.String password, int type, java.lang.String mandant)
      Login to the backend system.
      boolean logoff​(java.lang.String token)
      Logoff from the backend system.
      java.lang.String logon​(java.lang.String username, java.lang.String password, SaWsLicenseType type, java.lang.String mandant)
      Logon to the backend system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SaWsAuthenticationService

        public SaWsAuthenticationService()
        Constructor.
    • Method Detail

      • logoff

        public boolean logoff​(java.lang.String token)
                       throws SaWsException
        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 java.lang.String logon​(java.lang.String username,
                                      java.lang.String password,
                                      SaWsLicenseType type,
                                      java.lang.String mandant)
                               throws SaWsException
        Logon to the backend system.
        Parameters:
        username - Username
        password - Password
        type - User type
        mandant - 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 java.lang.String login​(java.lang.String username,
                                      java.lang.String password,
                                      int type,
                                      java.lang.String mandant)
                               throws SaWsException
        Login to the backend system. Following client types are supported: 1=index, 2=query, 3=admin
        Parameters:
        username - Username
        password - Password
        type - User type
        mandant - 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)