Package com.microstrategy.webapi
Class IDSSXMLSessionIdParser
- java.lang.Object
-
- com.microstrategy.webapi.IDSSXMLSessionIdParser
-
- Direct Known Subclasses:
ACMSessionIdParser
public abstract class IDSSXMLSessionIdParser extends java.lang.Object
IDSSXMLSessionIdParser is used to parse an augmented session id. It's useful when you don't need the SessionId object. Use IDSSXMLSessionId to both parse AND create a SessionId object.
-
-
Constructor Summary
Constructors Constructor Description IDSSXMLSessionIdParser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addLocale(int iLocale)
abstract void
addMessageId(java.lang.String iMessageId)
abstract void
addProjectId(java.lang.String iProjectId)
abstract void
addRetVal(int iRetVal)
abstract void
addSSProjectId(java.lang.String iSSProjectId)
static IDSSXMLSessionIdParser
builder(java.lang.String iSessionId, java.lang.String iNodeName, int iPort, IDSSXMLSessionId.TYPE iType)
static IDSSXMLSessionIdParser
builder(java.lang.String iSessionId, java.lang.String iNodeName, int iPort, IDSSXMLSessionId.TYPE iType, java.lang.String iSSProjectId)
static IDSSXMLSessionId.IConfigSessionId
convertToConfigSessionId(IDSSXMLSessionId iSessionId)
convertToConfigSessionId
will convert a session id into specifically a configuration session id.static IDSSXMLSessionId.IProjectSessionId
convertToProjectSessionId(IDSSXMLSessionId iSessionId, java.lang.String iProjectId)
convertToProjectSessionId
will convert a session id into specifically a project session id.abstract 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.abstract java.lang.String
getIServerNodeName()
static java.lang.String
getIServerNodeName(java.lang.String iAugmentedSessionId)
getIServerNodeName efficiently parses out the IServer node name from an augmented session idabstract int
getLocale()
static java.lang.Integer
getLocale(java.lang.String iAugmentedSessionId)
getLocale efficiently parses out the locale from an augmented session idabstract java.lang.String
getMessageId()
static java.lang.String
getMessageId(java.lang.String iAugmentedSessionId)
getMessageId efficiently parses out the message Id from an augmented session idabstract java.lang.String
getObscuredAugmentedSessionId()
getObscuredAugmentedSessionId
returns as a string the augmentedSessionId, except that the IServer session id is obscured.static java.lang.String
getPid(java.lang.String iAugmentedSessionId)
abstract int
getPort()
static java.lang.Integer
getPort(java.lang.String iAugmentedSessionId)
abstract java.lang.String
getProjectId()
abstract int
getRetVal()
static java.lang.Integer
getRetVal(java.lang.String iAugmentedSessionId)
getRetVal efficiently parses out the return value from an augmented session idabstract java.lang.String
getSessionId()
static java.lang.String
getSessionId(java.lang.String iAugmentedSessionId)
getSessionId efficiently parses out the session id GUID from an augmented session idstatic java.lang.String
getSSPid(java.lang.String iAugmentedSessionId)
abstract java.lang.String
getSSProjectId()
abstract IDSSXMLSessionId.TYPE
getType()
static IDSSXMLSessionId.TYPE
getType(java.lang.String iAugmentedSessionId)
abstract boolean
hasLocale()
abstract boolean
hasMessageId()
abstract boolean
hasProjectId()
abstract boolean
hasRetVal()
abstract boolean
hasSSProjectId()
static IDSSXMLSessionIdParser
instance(java.lang.String iAugmentedSessionId)
instance is a factory of the IDSSXMLSessionIdParser
-
-
-
Method Detail
-
instance
public static IDSSXMLSessionIdParser instance(java.lang.String iAugmentedSessionId) throws MSTRWebAPIException
instance is a factory of the IDSSXMLSessionIdParser- Parameters:
iAugmentedSessionId
-- Returns:
- a new instance
- Throws:
MSTRWebAPIException
-
builder
public static IDSSXMLSessionIdParser builder(java.lang.String iSessionId, java.lang.String iNodeName, int iPort, IDSSXMLSessionId.TYPE iType) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
builder
public static IDSSXMLSessionIdParser builder(java.lang.String iSessionId, java.lang.String iNodeName, int iPort, IDSSXMLSessionId.TYPE iType, java.lang.String iSSProjectId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
convertToConfigSessionId
public static IDSSXMLSessionId.IConfigSessionId convertToConfigSessionId(IDSSXMLSessionId iSessionId) throws MSTRWebAPIException
convertToConfigSessionId
will convert a session id into specifically a configuration session id.
This is possible because of the SIMPLIFIED SESSION feature where there is only one session on the IServer and it can be used as either a configuration session or a project session.- Parameters:
iSessionId
-- Returns:
- Configuration Session Id according to the SIMPLIFIED SESSION feature
- Throws:
MSTRWebAPIException
-
convertToProjectSessionId
public static IDSSXMLSessionId.IProjectSessionId convertToProjectSessionId(IDSSXMLSessionId iSessionId, java.lang.String iProjectId) throws MSTRWebAPIException
convertToProjectSessionId
will convert a session id into specifically a project session id.
This is possible because of the SIMPLIFIED SESSION feature where there is only one session on the IServer and it can be used as either a configuration session or a project session.- Parameters:
iSessionId
-iProjectId
-- Returns:
- Configuration Session Id according to the SIMPLIFIED SESSION feature
- Throws:
MSTRWebAPIException
-
getAugmentedSessionId
public abstract 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. 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.- Returns:
- the full augmented Session Id
-
getObscuredAugmentedSessionId
public abstract java.lang.String getObscuredAugmentedSessionId()
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
- Returns:
- the obscured augmented Session Id
-
getSessionId
public abstract java.lang.String getSessionId()
-
getSessionId
public static java.lang.String getSessionId(java.lang.String iAugmentedSessionId)
getSessionId efficiently parses out the session id GUID from an augmented session id- Parameters:
iAugmentedSessionId
-- Returns:
-
getIServerNodeName
public abstract java.lang.String getIServerNodeName()
-
getIServerNodeName
public static java.lang.String getIServerNodeName(java.lang.String iAugmentedSessionId)
getIServerNodeName efficiently parses out the IServer node name from an augmented session id- Parameters:
iAugmentedSessionId
-- Returns:
-
getPort
public abstract int getPort()
-
getPort
public static java.lang.Integer getPort(java.lang.String iAugmentedSessionId)
-
getType
public abstract IDSSXMLSessionId.TYPE getType()
-
getType
public static IDSSXMLSessionId.TYPE getType(java.lang.String iAugmentedSessionId)
-
addLocale
public abstract void addLocale(int iLocale) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasLocale
public abstract boolean hasLocale()
-
getLocale
public abstract int getLocale() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
getLocale
public static java.lang.Integer getLocale(java.lang.String iAugmentedSessionId)
getLocale efficiently parses out the locale from an augmented session id- Parameters:
iAugmentedSessionId
-- Returns:
-
addRetVal
public abstract void addRetVal(int iRetVal) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasRetVal
public abstract boolean hasRetVal()
-
getRetVal
public abstract int getRetVal() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
getRetVal
public static java.lang.Integer getRetVal(java.lang.String iAugmentedSessionId)
getRetVal efficiently parses out the return value from an augmented session id- Parameters:
iAugmentedSessionId
-- Returns:
-
addMessageId
public abstract void addMessageId(java.lang.String iMessageId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasMessageId
public abstract boolean hasMessageId()
-
getMessageId
public abstract java.lang.String getMessageId() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
getMessageId
public static java.lang.String getMessageId(java.lang.String iAugmentedSessionId)
getMessageId efficiently parses out the message Id from an augmented session id- Parameters:
iAugmentedSessionId
-- Returns:
-
addProjectId
public abstract void addProjectId(java.lang.String iProjectId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasProjectId
public abstract boolean hasProjectId()
-
getProjectId
public abstract java.lang.String getProjectId() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
getPid
public static java.lang.String getPid(java.lang.String iAugmentedSessionId)
-
addSSProjectId
public abstract void addSSProjectId(java.lang.String iSSProjectId) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
hasSSProjectId
public abstract boolean hasSSProjectId()
-
getSSProjectId
public abstract java.lang.String getSSProjectId() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
getSSPid
public static java.lang.String getSSPid(java.lang.String iAugmentedSessionId)
-
-