Class CreateSession


  • public class CreateSession
    extends XMLRequest
    Login to UC4. This request creates a session on the UC4 server for user. The method Connection#setSession must be called before this request is sent.
    • Constructor Detail

      • CreateSession

        public CreateSession​(MessageBox box)
        Internal use.
        Parameters:
        box - Message Box
      • CreateSession

        public CreateSession()
        Internal use.
    • Method Detail

      • setClientType

        public void setClientType​(java.lang.String type)
      • setOS

        protected void setOS​(java.lang.String os)
      • getSrc

        protected java.lang.String getSrc()
        Description copied from class: XMLRequest
        Returns the request source. This method is used internally.
        Specified by:
        getSrc in class XMLRequest
        Returns:
        Source
      • createRequest

        protected void createRequest​(com.uc4.util.XMLDocument doc,
                                     org.w3c.dom.Element req,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Creates the XML Document for the request. This method is used internally.
        Specified by:
        createRequest in class XMLRequest
        Parameters:
        doc - Document, used to create new Elements
        req - Request Element - classes append information to this request element
        session - Information about the session
      • handleContent

        protected void handleContent​(com.uc4.util.XMLDocument doc,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Sub classes extract the values from the XML document and provide public getter methods.
        Overrides:
        handleContent in class XMLRequest
        Parameters:
        doc - XML Document
        session - Info about the user session
      • getWelcomeMessage

        public java.lang.String getWelcomeMessage()
        Returns the first message after logon.
        Returns:
        translated message text
      • getUserName

        public java.lang.String getUserName()
        Returns the name of the logged on user.
        Returns:
        User name
      • getUserObject

        public UC4UserName getUserObject()
        Returns the name of the User object (user/department).
        Returns:
        User object
      • getEncoding

        public java.lang.String getEncoding()
        Returns the encoding of the XML messages.
        Returns:
        String containing the encoding.
      • getSessionID

        public java.lang.String getSessionID()
        Returns the ID this session. This ID is unqiue for a connection to the UC4 server.
        Returns:
        String containing the ID of the session.
      • getSystemName

        public java.lang.String getSystemName()
        Returns the name of the UC4 system.
        Returns:
        String containing the name of the UC4 system.
      • getUserIdnr

        public java.lang.String getUserIdnr()
        Returns the ID of the connected user.
        Returns:
        String containing the user ID.
      • getToken

        public java.lang.String getToken()
        Returns a token which can be used instead of a passwort for future logons with the same UC4 user. The token remains valid until the original API connection is closed. An invalid token means that no further connections can be created using the token, the existing connections are not affected.
        Returns:
        Logon token
      • isLoginSuccessful

        public boolean isLoginSuccessful()
        Tests if the log in was successful.
        Returns:
        true if the user is logged in.
      • isPasswordChangeRequired

        public boolean isPasswordChangeRequired()
        Returns true if the next action must be a change of the password.
        Returns:
        true if the password has expired
      • isAllowedInClientZero

        protected boolean isAllowedInClientZero()
        Description copied from class: XMLRequest
        This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
        Overrides:
        isAllowedInClientZero in class XMLRequest
        Returns:
        true if this request is allowed in client 0, false otherwise
      • setKicks

        public void setKicks​(java.lang.String kicks)
        Registers this connection to receive the specified kick messages. Kick messages are sent from the AE to the connected client when certain events occur in the AE. This procedure has to be called before the connection to the AE is established.
        Parameters:
        kicks - Comma separated list of kick messages.
      • getRedirectUrl

        public java.lang.String getRedirectUrl()
        When trying to login via SAML this returns you the URL to the SAML IDP
        Returns:
        String SAML IDP URL
      • isLdapLogin

        public boolean isLdapLogin()
        Returns if user logged in through LDAP
        Returns:
        true, if LDAP
      • getClient

        public java.lang.String getClient()