Package com.uc4.communication.requests
Class CreateSession
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.CreateSession
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element req, ConnectionAttributes session) Creates the XML Document for the request.Returns the encoding of the XML messages.When trying to login via SAML this returns you the URL to the SAML IDPReturns the ID this session.protected StringgetSrc()Returns the request source.Returns the name of the UC4 system.getToken()Returns a token which can be used instead of a passwort for future logons with the same UC4 user.Returns the ID of the connected user.Returns the name of the logged on user.Returns the name of the User object (user/department).Returns the first message after logon.protected voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected booleanprotected booleanThis method is used internally.booleanReturns if user logged in through LDAPbooleanTests if the log in was successful.booleanReturnstrueif the next action must be a change of the password.voidsetClientType(String type) voidRegisters this connection to receive the specified kick messages.protected voidMethods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send, setMessageBox, showQuarantineNotification
-
Constructor Details
-
CreateSession
Internal use.- Parameters:
box- Message Box
-
CreateSession
public CreateSession()Internal use.
-
-
Method Details
-
setClientType
-
setOS
-
getSrc
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, Element req, ConnectionAttributes session) Description copied from class:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin classXMLRequest- Parameters:
doc- Document, used to create new Elementsreq- Request Element - classes append information to this request elementsession- Information about the session
-
handleContent
Description copied from class:XMLRequestSub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContentin classXMLRequest- Parameters:
doc- XML Documentsession- Info about the user session
-
getWelcomeMessage
Returns the first message after logon.- Returns:
- translated message text
-
getUserName
Returns the name of the logged on user.- Returns:
- User name
-
getUserObject
Returns the name of the User object (user/department).- Returns:
- User object
-
getEncoding
Returns the encoding of the XML messages.- Returns:
- String containing the encoding.
-
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
Returns the name of the UC4 system.- Returns:
- String containing the name of the UC4 system.
-
getUserIdnr
Returns the ID of the connected user.- Returns:
- String containing the user ID.
-
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()Returnstrueif 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:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-
ignoreMessageBox
protected boolean ignoreMessageBox()- Overrides:
ignoreMessageBoxin classXMLRequest
-
setKicks
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
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
-