Package com.microstrategy.web.platform
Class DisconnectedContainerServicesImpl
- java.lang.Object
-
- com.microstrategy.web.platform.AbstractConfigurableContainerServices
-
- com.microstrategy.web.platform.DisconnectedContainerServicesImpl
-
- All Implemented Interfaces:
ContainerServices,ContainerServicesContext,DisconnectedContainerServices
public class DisconnectedContainerServicesImpl extends AbstractConfigurableContainerServices implements DisconnectedContainerServices
This class is an intermediary between the ASP.net and Microstrategy Java application. At the start of each ASP page request data and all other necessary data must be copied into the object of this class. After request processing is finished response data must be copied from this object to the response.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.platform.AbstractConfigurableContainerServices
AbstractConfigurableContainerServices.AbstractContainerStringCollection, AbstractConfigurableContainerServices.CookieWrapper
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.platform.AbstractConfigurableContainerServices
_prependSlashToResource, APPLICATION_PARAMETERS_XML_PATH, WEB_XML_PATH
-
Fields inherited from interface com.microstrategy.web.platform.ContainerServices
SPNEGO_CREDENTIAL
-
-
Constructor Summary
Constructors Constructor Description DisconnectedContainerServicesImpl()The default constructor of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCookieToRequest(java.lang.String nativeCookieName, java.lang.String nativeCookieValue)Adds request cookie to the internal collection This method is used to add cookies to MicroStrategy Web application.voidaddCookieToResponse(GenericCookie cookie)This method associates a platform-independent Cookie with a response.voidaddFormAndQueryString(java.lang.String name, java.lang.String value)Adds a value to the request parameters collection.voidaddRequestHeader(java.lang.String name, java.lang.String value)Adds request header to the internal collectionvoidaddServerVariable(java.lang.String name, java.lang.String value)Adds a server variable with a single value.voidaddServerVariable(java.lang.String name, java.lang.String[] values)Appends a collection of string values of the specified server variable.java.lang.ObjectgetApplicationAttribute(int index)Returns application attributejava.lang.ObjectgetApplicationAttribute(java.lang.String name)This method returns the value of an Application Attribute.java.lang.StringgetApplicationAttributeName(int index)Returns application attribute nameintgetApplicationAttributesCount()Returns a number of application attributes.java.lang.StringgetApplicationPath()This method returns the full application path of the servletjava.lang.StringgetAppServerInfo()MarkupOutputgetBinaryMarkup()Returns markup outut stored at the sendBinaryContent method.intgetCodePage()Returns an integer that represents the character formatting codepage.java.lang.StringgetContentType()Returns response content typejava.lang.StringgetContextPath()Returns the context path.protected java.lang.StringgetControllerName()protected HashListgetCookies(ContainerServicesNamespace namespace)Return the a collection of GenericCookie objects from the request cookies.ContainerStringCollectiongetCookieStrings()This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).ContainerStringCollectiongetCookieStrings(ContainerServicesNamespace namespace)This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs) in the given namespace.booleangetCreateNewSessionValue()Gets a boolean value indicating whether create a new http sessionintgetErrorCode()Returns the error status code for response.java.lang.StringgetErrorMessage()Returns the error message for response.ContainerStringCollectiongetFormAndQueryStrings()This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).AppGlobalContextgetGlobalContext()Returns the global context held by this services.java.lang.StringgetHeaderValue(java.lang.String headerName)This method returns the value of the requested headerjava.lang.StringgetMethod()Returns request method, post/get is expected.java.io.OutputStreamgetOutputStream()PostedFilegetPostedFile(java.lang.String name)Provides a way to access individual files that have been uploaded by a client.java.lang.StringgetQueryString()This method returns the entire Query String.java.lang.StringgetRealPath(java.lang.String relPath)This method returns the full real path to a server-side file resource.java.lang.StringgetRemoteAddress()This method returns the client IP addressjava.lang.ObjectgetRequestAttribute(int index)Returns requst attributejava.lang.ObjectgetRequestAttribute(java.lang.String name)This method returns the value of a Request Attribute.java.lang.StringgetRequestAttributeName(int index)Returns requst attribute nameintgetRequestAttributesCount()Returns a number of request attributes.java.lang.StringgetRequestServerName()This method returns the Web Server Name from the request objectjava.net.URLgetResource(java.lang.String relPath)Returns theURLassociated with the given resource path.java.io.InputStreamgetResourceAsStream(java.lang.String relPath)This method returns the contents of a file resource relative to the web application as an input stream.java.util.Set<java.lang.String>getResourcePaths(java.lang.String relPath)Returns a directory path strings of all the paths to resources within the application whose longest sub-path matches the supplied path.GenericCookiegetResponseCookie(int index)Returns a cookie that must be added to the responseintgetResponseCookiesCount()Returns number of cookeis that must be added to the responsejava.lang.StringgetResponseHeaderName(int index)Returns response header nameintgetResponseHeadersCount()Returns number of response headersjava.lang.StringgetResponseHeaderValue(int index)Returns response header valueContainerStringCollectiongetServerVariables()Returns a collection of server variables.java.lang.ObjectgetSessionAttribute(int i)Returns session attributejava.lang.ObjectgetSessionAttribute(java.lang.String name)This method returns the value of a Session Attribute.java.lang.ObjectgetSessionAttribute(java.lang.String name, ContainerServicesNamespace namespace)This method returns the value of a Session Attribute in the given namespace.java.lang.StringgetSessionAttributeName(int i)Returns session attribute nameintgetSessionAttributesCount()Returns a number of session attributes.java.lang.StringgetSessionID()Returns HTTP session IDintgetSessionMaxIdleTime()Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.ContainerStringCollectiongetSessionStrings()This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs).ContainerStringCollectiongetSessionStrings(ContainerServicesNamespace namespace)This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs) in the given namespace.intgetStatusCode()Returns the HTTP Status code specified for this response.voidhandleMultipartRequest(byte[] request)This method shall be called if the request type is multipart/form-databooleanhasOutputStream()voidinvalidateHttpSession()If the security preference is selected, invalidate and create new http session in jsp part set a flag to show whether a new session need to be created in asp partbooleanisJavaURLSessionSupported()Indicates if the instance of this container services supports cookieless environmentsbooleanisRequestSecure()Returns a boolean indicating whether this request was made using a secure channel, such as HTTPSbooleanisSessionlessRequest()Does the request has a pre-established session id.voidsendBinaryContent(MarkupOutput mo)Outputs binary content of the MarkupOutputbooleansendError(int sc)Sends an error response to the client using the specified status code.booleansendError(int sc, java.lang.String msg)Sends an error response to the client using the specified status code.voidsetApplicationAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Application Attribute.voidsetCodePage(int code)Sets the code page, an integer representing the character formatting.voidsetContentType(java.lang.String value)Stes HTTP response content typevoidsetControllerName(java.lang.String name)voidsetCreateNewSessionValue(boolean value)Sets a boolean indicating whether create a new http sessionvoidsetGlobalContext(AppGlobalContext globalContext)Sets current application global context.voidsetHeaderValue(java.lang.String headerName, java.lang.String headerValue)Sets HTTP response headervoidsetJavaURLSessionSupported(boolean value)Sets if the instance of this container services supports cookieless environmentsvoidsetMethod(java.lang.String method)Sets the request methodvoidsetNativeSessionAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Session Attribute without using namespace in Session variable.voidsetQueryString(java.lang.String queryString)Sets HTTP request query stringvoidsetRemoteAddress(java.lang.String remoteAddress)Set the remote (IP) address for this requestvoidsetRequestAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Request Attribute.voidsetRequestSecure(boolean value)Sets a boolean indicating whether this request was made using a secure channel, such as HTTPSvoidsetSessionAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Session Attribute.voidsetSessionAttribute(java.lang.String name, java.lang.Object value, ContainerServicesNamespace namespace)This method sets the value of a Session Attribute in the given namespace.voidsetSessionID(java.lang.String sessionID)Sets the HTTP session IDvoidsetStatusCode(int statusCode)Sets the HTTP Status code specified for this response.-
Methods inherited from class com.microstrategy.web.platform.AbstractConfigurableContainerServices
decrypt, encrypt, getApplicationParameters, getControllerParameter, getCookie, getCookie, getCookieNamespace, getCookieNamespaceCapacity, getInitParameter, getInitParameterNames, getNamespacePrefix, getNamespaceValue, getRealName, getSessionNamespace, getSessionNamespaceCapacity, initFromPropertiesFile, initGlobalObjects, isEncryptedByRedirect, isEncryptedParameter, isNamespacedName, isQueryParam, newCookie, newCookie, newHiddenInputParameterBuilder, newNamespaceEncoder, newURIParameterBuilder, useNamespace, useNamespaceInCookie
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.platform.ContainerServices
getCookie, getCookie, isQueryParam, newCookie, newCookie, newHiddenInputParameterBuilder, newNamespaceEncoder, newURIParameterBuilder
-
Methods inherited from interface com.microstrategy.web.platform.ContainerServicesContext
getApplicationParameters, getControllerParameter, getInitParameter, getInitParameterNames, initGlobalObjects
-
-
-
-
Method Detail
-
getRealPath
public java.lang.String getRealPath(java.lang.String relPath)
This method returns the full real path to a server-side file resource.- Specified by:
getRealPathin interfaceContainerServicesContext- Parameters:
relPath- AStringthat indicates the relative path of the file.- Returns:
- A
Stringthat indicates the full path of the file. - See Also:
FileLoader.getRealPath(String)
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String relPath)
This method returns the contents of a file resource relative to the web application as an input stream.This is ONLY required to support the Java environment, and in particular, only those Java environments where the WAR file is not expanded. This should return NULL in an ASP environment.
- Specified by:
getResourceAsStreamin interfaceContainerServicesContext- Parameters:
relPath- AStringthat indicates the relative path of the file.- Returns:
- A
InputStreamthat contains the contents of the specified file.
-
getQueryString
public java.lang.String getQueryString()
This method returns the entire Query String.- Specified by:
getQueryStringin interfaceContainerServices- Returns:
- A
Stringthat contains the contents of the Query String.
-
getRemoteAddress
public java.lang.String getRemoteAddress()
This method returns the client IP address- Specified by:
getRemoteAddressin interfaceContainerServices- Returns:
- A
Stringwith the value of the client IP address
-
getHeaderValue
public java.lang.String getHeaderValue(java.lang.String headerName)
This method returns the value of the requested header- Specified by:
getHeaderValuein interfaceContainerServices- Parameters:
headerName- AStringwith the name of the header to search for- Returns:
- A
Stringwith the value of the header requested. If the header was not found, it shall return a null value.
-
getFormAndQueryStrings
public ContainerStringCollection getFormAndQueryStrings()
This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).- Specified by:
getFormAndQueryStringsin interfaceContainerServices- Returns:
- A
ContainerStringCollectionobject.
-
getCookieStrings
public ContainerStringCollection getCookieStrings()
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).- Specified by:
getCookieStringsin interfaceContainerServices- Returns:
- A
ContainerStringCollectionobject.
-
getCookieStrings
public ContainerStringCollection getCookieStrings(ContainerServicesNamespace namespace)
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs) in the given namespace.- Specified by:
getCookieStringsin interfaceContainerServices- Parameters:
namespace-- Returns:
- A
ContainerStringCollectionobject. - Since:
- MicroStrategy Web 8.0.2
-
getSessionStrings
public ContainerStringCollection getSessionStrings()
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs). Only those session variables that return values of type String are considered.- Specified by:
getSessionStringsin interfaceContainerServices- Returns:
- A
ContainerStringCollectionobject.
-
getSessionStrings
public ContainerStringCollection getSessionStrings(ContainerServicesNamespace namespace)
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs) in the given namespace. Only those session variables that return values of type String are considered.- Specified by:
getSessionStringsin interfaceContainerServices- Parameters:
namespace- type ofContainerServicesNamespaceThe specified namespace.- Returns:
- A
ContainerStringCollectionobject. - Since:
- MicroStrategy Web 8.0.2
-
setNativeSessionAttribute
public void setNativeSessionAttribute(java.lang.String name, java.lang.Object value)Description copied from interface:DisconnectedContainerServicesThis method sets the value of a Session Attribute without using namespace in Session variable.- Specified by:
setNativeSessionAttributein interfaceDisconnectedContainerServices- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute. If used in namespaced mode, the native value should containes the namespace encoding, that can be loaded byLRUHashList.load(String)- Since:
- MicroStrategy Web 8.0.2
-
getRequestAttribute
public java.lang.Object getRequestAttribute(java.lang.String name)
This method returns the value of a Request Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
getRequestAttributein interfaceContainerServices- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named attribute.
-
setRequestAttribute
public void setRequestAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Request Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
setRequestAttributein interfaceContainerServices- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
setSessionAttribute
public void setSessionAttribute(java.lang.String name, java.lang.Object value)Description copied from interface:ContainerServicesThis method sets the value of a Session Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
setSessionAttributein interfaceContainerServices- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
setSessionAttribute
public void setSessionAttribute(java.lang.String name, java.lang.Object value, ContainerServicesNamespace namespace)Description copied from interface:ContainerServicesThis method sets the value of a Session Attribute in the given namespace. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
setSessionAttributein interfaceContainerServices- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.namespace- AContainerServicesNamespaceobject representing the namespace requirement. If null, no namespace is used.- Since:
- MicroStrategy Web 8.0.2
-
addCookieToResponse
public void addCookieToResponse(GenericCookie cookie)
This method associates a platform-independent Cookie with a response. When the response is sent back to the client, it will contain this cookie.- Specified by:
addCookieToResponsein interfaceContainerServices- Parameters:
cookie- TheGenericCookieto be added to the Response.
-
getApplicationPath
public java.lang.String getApplicationPath()
This method returns the full application path of the servlet- Specified by:
getApplicationPathin interfaceContainerServices- Returns:
- A
Stringthat indicates the full application path of the servlet. (i.e. http://localhost:8080/MicroStrategy/servlet)
-
getPostedFile
public PostedFile getPostedFile(java.lang.String name)
Description copied from interface:ContainerServicesProvides a way to access individual files that have been uploaded by a client.- Specified by:
getPostedFilein interfaceContainerServices- Parameters:
name- a name of posted file- Returns:
- a posted file
-
getRequestServerName
public java.lang.String getRequestServerName()
This method returns the Web Server Name from the request object- Specified by:
getRequestServerNamein interfaceContainerServices- Returns:
- A
Stringthat indicates the Web Server Name. (i.e. if you access the web server with the URL which reads as http://localhost:8080/MicroStrategy/servlet then this method will return "localhost" as the web server name. If you access the webserver with the URL which reads as http://machine1:8080/MicroStrategy/servlet then this method will return "machine1" as the web server name.
-
getSessionID
public java.lang.String getSessionID()
Returns HTTP session ID- Specified by:
getSessionIDin interfaceContainerServices- Returns:
- HTTP session ID
-
getMethod
public java.lang.String getMethod()
Returns request method, post/get is expected.- Specified by:
getMethodin interfaceContainerServices- Returns:
- request method
- Since:
- MicroStrategy Web 9.2.2
-
getControllerName
protected java.lang.String getControllerName()
- Specified by:
getControllerNamein classAbstractConfigurableContainerServices- Since:
- MicroStrategy Web 9.0.0
-
setControllerName
public void setControllerName(java.lang.String name)
- Since:
- MicroStrategy Web 9.0.1
-
sendBinaryContent
public void sendBinaryContent(MarkupOutput mo)
Outputs binary content of the MarkupOutput- Specified by:
sendBinaryContentin interfaceContainerServices- Parameters:
mo- markup outpu containing binary image
-
setContentType
public void setContentType(java.lang.String value)
Stes HTTP response content type- Specified by:
setContentTypein interfaceContainerServices- Parameters:
value- content type
-
setHeaderValue
public void setHeaderValue(java.lang.String headerName, java.lang.String headerValue)Sets HTTP response header- Specified by:
setHeaderValuein interfaceContainerServices- Parameters:
headerName- header nameheaderValue- header value
-
addFormAndQueryString
public void addFormAndQueryString(java.lang.String name, java.lang.String value)Adds a value to the request parameters collection. There can be several values assosiated with the same name in this collection.- Specified by:
addFormAndQueryStringin interfaceDisconnectedContainerServices- Parameters:
name- parameter name.value- parameter value.
-
setQueryString
public void setQueryString(java.lang.String queryString)
Sets HTTP request query string- Specified by:
setQueryStringin interfaceDisconnectedContainerServices- Parameters:
queryString- request query string
-
setRemoteAddress
public void setRemoteAddress(java.lang.String remoteAddress)
Set the remote (IP) address for this request- Specified by:
setRemoteAddressin interfaceDisconnectedContainerServices- Parameters:
remoteAddress- IP address
-
setSessionID
public void setSessionID(java.lang.String sessionID)
Sets the HTTP session ID- Specified by:
setSessionIDin interfaceDisconnectedContainerServices- Parameters:
sessionID- HTTP session ID
-
setMethod
public void setMethod(java.lang.String method)
Sets the request method- Specified by:
setMethodin interfaceDisconnectedContainerServices- Parameters:
request- method, post/get is expected.
-
getResponseCookiesCount
public int getResponseCookiesCount()
Returns number of cookeis that must be added to the response- Specified by:
getResponseCookiesCountin interfaceDisconnectedContainerServices- Returns:
- number of cookeis that must be added to the response
-
getResponseCookie
public GenericCookie getResponseCookie(int index)
Returns a cookie that must be added to the response- Specified by:
getResponseCookiein interfaceDisconnectedContainerServices- Parameters:
index- an index in the cookies collection- Returns:
- a cookie that must be added to the response
-
getRequestAttributesCount
public int getRequestAttributesCount()
Returns a number of request attributes. The request attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Specified by:
getRequestAttributesCountin interfaceDisconnectedContainerServices- Returns:
- number of request attributes.
-
getRequestAttributeName
public java.lang.String getRequestAttributeName(int index)
Returns requst attribute name- Specified by:
getRequestAttributeNamein interfaceDisconnectedContainerServices- Parameters:
index- an index in the attribute collection- Returns:
- requst attribute name
-
getRequestAttribute
public java.lang.Object getRequestAttribute(int index)
Returns requst attribute- Specified by:
getRequestAttributein interfaceDisconnectedContainerServices- Parameters:
index- an index in the attribute collection- Returns:
- request attribute
-
getSessionAttributesCount
public int getSessionAttributesCount()
Returns a number of session attributes. The session attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Specified by:
getSessionAttributesCountin interfaceDisconnectedContainerServices- Returns:
- number of session attributes.
-
getSessionAttributeName
public java.lang.String getSessionAttributeName(int i)
Returns session attribute name- Specified by:
getSessionAttributeNamein interfaceDisconnectedContainerServices- Parameters:
i- an index in the attribute collection- Returns:
- session attribute name
-
getSessionAttribute
public java.lang.Object getSessionAttribute(int i)
Returns session attribute- Specified by:
getSessionAttributein interfaceDisconnectedContainerServices- Parameters:
i- an index in the attribute collection- Returns:
- session attribute
-
getBinaryMarkup
public MarkupOutput getBinaryMarkup()
Returns markup outut stored at the sendBinaryContent method. If this method returns not null the content of markup output must be displayed.- Specified by:
getBinaryMarkupin interfaceDisconnectedContainerServices- Returns:
- binary markup output
-
addRequestHeader
public void addRequestHeader(java.lang.String name, java.lang.String value)Adds request header to the internal collection- Specified by:
addRequestHeaderin interfaceDisconnectedContainerServices- Parameters:
name- header namevalue- header value
-
addCookieToRequest
public void addCookieToRequest(java.lang.String nativeCookieName, java.lang.String nativeCookieValue)Adds request cookie to the internal collection This method is used to add cookies to MicroStrategy Web application.- Specified by:
addCookieToRequestin interfaceDisconnectedContainerServices- Parameters:
nativeCookieName- The native cookie name used in browsernativeCookieValue- The native cookie value stored in browser
-
getContentType
public java.lang.String getContentType()
Returns response content type- Specified by:
getContentTypein interfaceDisconnectedContainerServices- Returns:
- response content type
-
getResponseHeadersCount
public int getResponseHeadersCount()
Returns number of response headers- Specified by:
getResponseHeadersCountin interfaceDisconnectedContainerServices- Returns:
- number of response headers
-
getResponseHeaderName
public java.lang.String getResponseHeaderName(int index)
Returns response header name- Specified by:
getResponseHeaderNamein interfaceDisconnectedContainerServices- Parameters:
index- an index in the collection- Returns:
- response header name
-
getResponseHeaderValue
public java.lang.String getResponseHeaderValue(int index)
Returns response header value- Specified by:
getResponseHeaderValuein interfaceDisconnectedContainerServices- Parameters:
index- an index in the collection- Returns:
- response header value
-
handleMultipartRequest
public void handleMultipartRequest(byte[] request) throws java.io.IOExceptionThis method shall be called if the request type is multipart/form-data- Specified by:
handleMultipartRequestin interfaceDisconnectedContainerServices- Parameters:
request- a byte array containing entire HTTP request- Throws:
java.io.IOException
-
getGlobalContext
public AppGlobalContext getGlobalContext()
Returns the global context held by this services.- Specified by:
getGlobalContextin interfaceDisconnectedContainerServices- Returns:
- an AppGlobalContext. If there has no AppGlobalContext been set to
this object,
nulllwill be returned.
-
setGlobalContext
public void setGlobalContext(AppGlobalContext globalContext)
Sets current application global context.- Specified by:
setGlobalContextin interfaceDisconnectedContainerServices- Parameters:
globalContext- is anAppGlobalContextobject.
-
getSessionAttribute
public java.lang.Object getSessionAttribute(java.lang.String name)
This method returns the value of a Session Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
getSessionAttributein interfaceContainerServices- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named session attribute.
-
getSessionAttribute
public java.lang.Object getSessionAttribute(java.lang.String name, ContainerServicesNamespace namespace)This method returns the value of a Session Attribute in the given namespace. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.- Specified by:
getSessionAttributein interfaceContainerServices- Parameters:
name- the name of an attribute.namespace- AContainerServicesNamespaceobject representing the namespace requirement.- Returns:
- An
Objectrepresenting the value of a named session attribute. - Since:
- MicroStrategy Web 8.0.2
-
getApplicationAttributesCount
public int getApplicationAttributesCount()
Returns a number of application attributes. The Application attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Specified by:
getApplicationAttributesCountin interfaceDisconnectedContainerServices- Returns:
- number of Application attributes.
-
getApplicationAttributeName
public java.lang.String getApplicationAttributeName(int index)
Returns application attribute name- Specified by:
getApplicationAttributeNamein interfaceDisconnectedContainerServices- Parameters:
index- an index in the attribute collection- Returns:
- application attribute name
-
getApplicationAttribute
public java.lang.Object getApplicationAttribute(int index)
Returns application attribute- Specified by:
getApplicationAttributein interfaceDisconnectedContainerServices- Parameters:
index- an index in the attribute collection- Returns:
- application attribute
-
getApplicationAttribute
public java.lang.Object getApplicationAttribute(java.lang.String name)
This method returns the value of an Application Attribute.- Specified by:
getApplicationAttributein interfaceContainerServices- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named application attribute.
-
setApplicationAttribute
public void setApplicationAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Application Attribute.- Specified by:
setApplicationAttributein interfaceContainerServices- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
sendError
public boolean sendError(int sc)
Sends an error response to the client using the specified status code.- Specified by:
sendErrorin interfaceContainerServices- Parameters:
sc- The status errror code. We reuse HTTP status code "OK" (200) to mean no error, so please do not use it for any error status.- Returns:
trueto indicate this action succeeded.falseto indicate error in performing this action.
-
sendError
public boolean sendError(int sc, java.lang.String msg)Sends an error response to the client using the specified status code.- Specified by:
sendErrorin interfaceContainerServices- Parameters:
sc- The errror status code.msg- The error message.- Returns:
trueto indicate this action succeeded.falseto indicate error in performing this action.
-
getErrorCode
public int getErrorCode()
Returns the error status code for response.- Specified by:
getErrorCodein interfaceDisconnectedContainerServices- Returns:
- The error status code. We reuse HTTP status code "OK" (200) to mean no error.
- See Also:
sendError(int),sendError(int, String)
-
getErrorMessage
public java.lang.String getErrorMessage()
Returns the error message for response.- Specified by:
getErrorMessagein interfaceDisconnectedContainerServices- Returns:
- The error message. If no error message, empty string will be returned.
- See Also:
sendError(int),sendError(int, String)
-
getCodePage
public int getCodePage()
Returns an integer that represents the character formatting codepage. The CodePage property specifies how literal (static) strings are encoded in a Web page. A codepage is a character set that can include numbers, punctuation marks, and other glyphs. Codepages are not the same for each language. Some languages have multi-byte characters, while others only need one byte to represent each character.- Specified by:
getCodePagein interfaceContainerServices- Returns:
- an integer that represents the character formatting codepage.
- Since:
- MicroStrategy Web 7.5.0
-
setCodePage
public void setCodePage(int code)
Sets the code page, an integer representing the character formatting. The CodePage property specifies how literal (static) strings are encoded in a Web page. A codepage is a character set that can include numbers, punctuation marks, and other glyphs. Codepages are not the same for each language. Some languages have multi-byte characters, while others only need one byte to represent each character.- Specified by:
setCodePagein interfaceContainerServices- Parameters:
code- an integer that represents the character formatting codepage.- Since:
- MicroStrategy Web 7.5.0
-
isJavaURLSessionSupported
public boolean isJavaURLSessionSupported()
Indicates if the instance of this container services supports cookieless environments- Specified by:
isJavaURLSessionSupportedin interfaceContainerServices- Since:
- MicroStrategy Web 7.5.0
-
setJavaURLSessionSupported
public void setJavaURLSessionSupported(boolean value)
Sets if the instance of this container services supports cookieless environments- Specified by:
setJavaURLSessionSupportedin interfaceContainerServices- Parameters:
value-trueif cookieless environment is supported- Since:
- MicroStrategy Web 7.5.0
-
getServerVariables
public ContainerStringCollection getServerVariables()
Returns a collection of server variables.- Specified by:
getServerVariablesin interfaceContainerServices- Returns:
- a collection of server variables.
- Since:
- MicroStrategy Web 7.5.4
-
addServerVariable
public void addServerVariable(java.lang.String name, java.lang.String value)Adds a server variable with a single value. If the server variable already exists, appends the new value- Specified by:
addServerVariablein interfaceDisconnectedContainerServices- Parameters:
name- the name of the server variable.value- the value of the server variable.- Since:
- MicroStrategy Web 7.5.4
-
addServerVariable
public void addServerVariable(java.lang.String name, java.lang.String[] values)Appends a collection of string values of the specified server variable. If the server variable already exists, appends the new values.- Specified by:
addServerVariablein interfaceDisconnectedContainerServices- Parameters:
name- the name of the server variable.values- an array of string values of the server variable.- Since:
- MicroStrategy Web 7.5.4
-
getStatusCode
public int getStatusCode()
Description copied from interface:ContainerServicesReturns the HTTP Status code specified for this response.- Specified by:
getStatusCodein interfaceContainerServices- Returns:
- The HTTP Status code specified for this response.
- Since:
- MicroStrategy Web 9.0.0
-
setStatusCode
public void setStatusCode(int statusCode)
Description copied from interface:ContainerServicesSets the HTTP Status code specified for this response.- Specified by:
setStatusCodein interfaceContainerServices- Parameters:
statusCode- the HTTP Status code specified for this response.- Since:
- MicroStrategy Web 9.0.0
-
getCookies
protected HashList getCookies(ContainerServicesNamespace namespace)
Return the a collection of GenericCookie objects from the request cookies.- Specified by:
getCookiesin classAbstractConfigurableContainerServices- Since:
- MicroStrategy Web 8.0.2
-
getOutputStream
public java.io.OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfaceContainerServices- Since:
- MicroStrategy Web 9.0.0
-
hasOutputStream
public boolean hasOutputStream()
- Specified by:
hasOutputStreamin interfaceContainerServices- Since:
- MicroStrategy Web 9.0.0
-
isRequestSecure
public boolean isRequestSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS- Specified by:
isRequestSecurein interfaceContainerServices- Since:
- MicroStrategy Web 9.0.0
-
setRequestSecure
public void setRequestSecure(boolean value)
Sets a boolean indicating whether this request was made using a secure channel, such as HTTPS- Specified by:
setRequestSecurein interfaceDisconnectedContainerServices- Since:
- MicroStrategy Web 9.0.0
-
getResource
public java.net.URL getResource(java.lang.String relPath)
Description copied from interface:ContainerServicesContextReturns theURLassociated with the given resource path. If the resource does not exist, null is returned (i.e. it cannot return a path to a newFile). Note that manyURLimplementations are read-only.- Specified by:
getResourcein interfaceContainerServicesContext- Parameters:
relPath- relative path.- Returns:
- URL associated with given path.
- Since:
- MicroStrategy Web 9.0.0
-
getResourcePaths
public java.util.Set<java.lang.String> getResourcePaths(java.lang.String relPath)
Description copied from interface:ContainerServicesContextReturns a directory path strings of all the paths to resources within the application whose longest sub-path matches the supplied path.- Specified by:
getResourcePathsin interfaceContainerServicesContext- Parameters:
relPath- sub-path to match- Returns:
- Set
of directory paths - Since:
- MicroStrategy Web 9.0.0
-
getAppServerInfo
public java.lang.String getAppServerInfo()
- Since:
- MicroStrategy Web 9.0.0
-
getContextPath
public java.lang.String getContextPath()
Description copied from interface:ContainerServicesContextReturns the context path. In the out of the box Web application deployment, this is usually "/MicroStrategy". Note that subclasses can override this implementation to return different context paths.- Specified by:
getContextPathin interfaceContainerServicesContext- Returns:
- the context path.
- Since:
- MicroStrategy Web 9.0.1
-
isSessionlessRequest
public boolean isSessionlessRequest()
Description copied from interface:ContainerServicesDoes the request has a pre-established session id.- Specified by:
isSessionlessRequestin interfaceContainerServices
-
getCreateNewSessionValue
public boolean getCreateNewSessionValue()
Description copied from interface:DisconnectedContainerServicesGets a boolean value indicating whether create a new http session- Specified by:
getCreateNewSessionValuein interfaceDisconnectedContainerServices
-
setCreateNewSessionValue
public void setCreateNewSessionValue(boolean value)
Description copied from interface:DisconnectedContainerServicesSets a boolean indicating whether create a new http session- Specified by:
setCreateNewSessionValuein interfaceDisconnectedContainerServices
-
invalidateHttpSession
public void invalidateHttpSession()
Description copied from interface:ContainerServicesIf the security preference is selected, invalidate and create new http session in jsp part set a flag to show whether a new session need to be created in asp part- Specified by:
invalidateHttpSessionin interfaceContainerServices
-
getSessionMaxIdleTime
public int getSessionMaxIdleTime()
Description copied from interface:ContainerServicesReturns the maximum time interval, in seconds, that the container will keep this session open between client accesses.- Specified by:
getSessionMaxIdleTimein interfaceContainerServices
-
-