Package com.microstrategy.webapi.acm
Class ACMSessionIdParser
- java.lang.Object
-
- com.microstrategy.webapi.IDSSXMLSessionIdParser
-
- com.microstrategy.webapi.acm.ACMSessionIdParser
-
public class ACMSessionIdParser extends IDSSXMLSessionIdParser
ACMSessionIdParser is the implementation of the IDSSXMLSessionId
ACMSessionIdParser is the ONLY place that knows about the content and syntax of the sessionId.
The Syntax:
(1) The 32 character GUID that represents the sessionID as given out by IServer is the first 32 characters in the sessionID
(2) If the string is less than 32 characters, then this cannot represent a GUID and the constructor will throw an exception
(3) There are six possible delimiters (:^~#@$)
(4) The 33rd character up to the end of the string or the first delimiter, whichever comes first, is the machine name
(5) The machine name must exist
(6) The parameter after ":" and up to the end of the string or the next delimiter is the locale
(7) The locale may not exist
(8) The parameter after "^" and up to the end of the string or the next delimiter is the return value
(9) The return value may not exist
(10) The parameter after "~" and up to the end of the string or the next delimiter is the message id
(11) The message idmay not exist
(12) The parameter after "#" and up to the end of the string or the next delimiter is the project id
(13) The project id may not exist
(14) The parameter after "@" and up to the end of the string or the next delimiter is the port associated with the machine (15) The port must exist (16) The parameter after "$" and up to the end of the string or the next delimiter is the session type ("MASTER", "CONFIG", "PROJECT") (17) The type must exist (18) The parameter after "*" and up to the end of the string or the next delimiter is the should close ("CLOSE", "DONTCLOSE") (19) The should close value may not exist. The default is CLOSE (18) If any parameter has invalid syntax then the entire sessionID is assumed invalid
Valid sessionID examples:
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DD@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7^1@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7~00000000000000000000000000000000@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033~00000000000000000000000000000000@34952$MASTER
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033~00000000000000000000000000000000@34952$MASTER*DONTCLOSE
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CSIDPIDDELIMITER
-
Constructor Summary
Constructors Constructor Description ACMSessionIdParser(java.lang.String iAugmentedSessionId)
ACMSessionIdParser(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocale(int iLocale)
void
addMessageId(java.lang.String iMessageId)
void
addProjectId(java.lang.String iProjectId)
void
addRetVal(int iRetVal)
void
addSSProjectId(java.lang.String iSSProjectId)
java.lang.String
getAugmentedSessionId()
getAugmentedSessionId returns as a string the full sessionID including the IServer node name, locale, return value, message id,and/or the project id.java.lang.String
getIServerNodeName()
int
getLocale()
java.util.Optional<java.lang.Integer>
getLocaleOpt()
java.lang.String
getMessageId()
java.util.Optional<java.lang.String>
getMessageIdOpt()
java.lang.String
getObscuredAugmentedSessionId()
getObscuredAugmentedSessionId
returns as a string the augmentedSessionId, except that the IServer session id is obscured.int
getPort()
java.lang.String
getProjectId()
java.util.Optional<java.lang.String>
getProjectIdOpt()
int
getRetVal()
java.util.Optional<java.lang.Integer>
getRetValOpt()
java.lang.String
getSessionId()
java.lang.String
getSSProjectId()
java.util.Optional<java.lang.String>
getSSProjectIdOpt()
IDSSXMLSessionId.TYPE
getType()
boolean
hasLocale()
boolean
hasMessageId()
boolean
hasProjectId()
boolean
hasRetVal()
boolean
hasSSProjectId()
-
Methods inherited from class com.microstrategy.webapi.IDSSXMLSessionIdParser
builder, builder, convertToConfigSessionId, convertToConfigSessionIdOpt, convertToProjectSessionId, convertToProjectSessionIdOpt, getIServerNodeName, getLocale, getMessageId, getPid, getPort, getRetVal, getSessionId, getSSPid, getType, instance
-
-
-
-
Field Detail
-
CSIDPIDDELIMITER
public static final java.lang.String CSIDPIDDELIMITER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ACMSessionIdParser
public ACMSessionIdParser(java.lang.String iAugmentedSessionId, IDSSXMLSessionId.TYPE iType) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
ACMSessionIdParser
public ACMSessionIdParser(java.lang.String iAugmentedSessionId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
-
Method Detail
-
getAugmentedSessionId
public java.lang.String getAugmentedSessionId()
Description copied from class:IDSSXMLSessionIdParser
getAugmentedSessionId returns as a string the full sessionID including the IServer node name, locale, return value, message id,and/or the project id. This string can be used by methods in the Web SDK. It is important to not make any assumptions about the contents and/or syntax of the string.- Specified by:
getAugmentedSessionId
in classIDSSXMLSessionIdParser
- Returns:
- the full augmented Session Id
-
getObscuredAugmentedSessionId
public java.lang.String getObscuredAugmentedSessionId()
Description copied from class:IDSSXMLSessionIdParser
getObscuredAugmentedSessionId
returns as a string the augmentedSessionId, except that the IServer session id is obscured. This is suitable for logging.
This
A633E7CEC88C42727B6EEC22795DEE6DDFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
becomes
A633E...DFM-WIN-VS15-7:1033^1~00000000000000000000000000000000#BC53E7CEC88C42727B6EEC22795DA974@34952$MASTER
- Specified by:
getObscuredAugmentedSessionId
in classIDSSXMLSessionIdParser
- Returns:
- the obscured augmented Session Id
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionId
in classIDSSXMLSessionIdParser
-
getIServerNodeName
public java.lang.String getIServerNodeName()
- Specified by:
getIServerNodeName
in classIDSSXMLSessionIdParser
-
getPort
public int getPort()
- Specified by:
getPort
in classIDSSXMLSessionIdParser
-
getType
public IDSSXMLSessionId.TYPE getType()
- Specified by:
getType
in classIDSSXMLSessionIdParser
-
addLocale
public void addLocale(int iLocale)
- Specified by:
addLocale
in classIDSSXMLSessionIdParser
-
hasLocale
public boolean hasLocale()
- Specified by:
hasLocale
in classIDSSXMLSessionIdParser
-
getLocale
public int getLocale() throws MSTRWebAPIException
- Specified by:
getLocale
in classIDSSXMLSessionIdParser
- Throws:
MSTRWebAPIException
-
getLocaleOpt
public java.util.Optional<java.lang.Integer> getLocaleOpt()
- Specified by:
getLocaleOpt
in classIDSSXMLSessionIdParser
-
addRetVal
public void addRetVal(int iRetVal)
- Specified by:
addRetVal
in classIDSSXMLSessionIdParser
-
hasRetVal
public boolean hasRetVal()
- Specified by:
hasRetVal
in classIDSSXMLSessionIdParser
-
getRetVal
public int getRetVal() throws MSTRWebAPIException
- Specified by:
getRetVal
in classIDSSXMLSessionIdParser
- Throws:
MSTRWebAPIException
-
getRetValOpt
public java.util.Optional<java.lang.Integer> getRetValOpt()
- Specified by:
getRetValOpt
in classIDSSXMLSessionIdParser
-
addMessageId
public void addMessageId(java.lang.String iMessageId)
- Specified by:
addMessageId
in classIDSSXMLSessionIdParser
-
hasMessageId
public boolean hasMessageId()
- Specified by:
hasMessageId
in classIDSSXMLSessionIdParser
-
getMessageId
public java.lang.String getMessageId() throws MSTRWebAPIException
- Specified by:
getMessageId
in classIDSSXMLSessionIdParser
- Throws:
MSTRWebAPIException
-
getMessageIdOpt
public java.util.Optional<java.lang.String> getMessageIdOpt()
- Specified by:
getMessageIdOpt
in classIDSSXMLSessionIdParser
-
addProjectId
public void addProjectId(java.lang.String iProjectId)
- Specified by:
addProjectId
in classIDSSXMLSessionIdParser
-
hasProjectId
public boolean hasProjectId()
- Specified by:
hasProjectId
in classIDSSXMLSessionIdParser
-
getProjectId
public java.lang.String getProjectId() throws MSTRWebAPIException
- Specified by:
getProjectId
in classIDSSXMLSessionIdParser
- Throws:
MSTRWebAPIException
-
getProjectIdOpt
public java.util.Optional<java.lang.String> getProjectIdOpt()
- Specified by:
getProjectIdOpt
in classIDSSXMLSessionIdParser
-
addSSProjectId
public void addSSProjectId(java.lang.String iSSProjectId)
- Specified by:
addSSProjectId
in classIDSSXMLSessionIdParser
-
hasSSProjectId
public boolean hasSSProjectId()
- Specified by:
hasSSProjectId
in classIDSSXMLSessionIdParser
-
getSSProjectId
public java.lang.String getSSProjectId() throws MSTRWebAPIException
- Specified by:
getSSProjectId
in classIDSSXMLSessionIdParser
- Throws:
MSTRWebAPIException
-
getSSProjectIdOpt
public java.util.Optional<java.lang.String> getSSProjectIdOpt()
- Specified by:
getSSProjectIdOpt
in classIDSSXMLSessionIdParser
-
-