Package com.microstrategy.web.platform
Interface ContainerServices
-
- All Superinterfaces:
ContainerServicesContext
- All Known Subinterfaces:
DisconnectedContainerServices
- All Known Implementing Classes:
AbstractConfigurableContainerServices,DisconnectedContainerServicesImpl,HttpServletContainerServices,ServletContainerServices
public interface ContainerServices extends ContainerServicesContext
This interfaces exposes, in a generic fashion, the services of any web application container. Whether the container is a servlet engine (Java) or a non-Java server (such as IIS), the methods exposed by this interface allow the caller to be unaware of the actual provider and the mechanics behind those calls. Each instances of this interface is associated with a request.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSPNEGO_UNLOCKPHRASE
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddCookieToResponse(GenericCookie cookie)This method associates a platform-independent Cookie with a response.java.lang.ObjectgetApplicationAttribute(java.lang.String name)This method returns the value of an Application Attribute.java.lang.StringgetApplicationPath()This method returns the full application path of the servletintgetCodePage()Returns an integer that represents the character formatting codepage.GenericCookiegetCookie(java.lang.String cookieName)This method retrieves a platform-independent Cookie with a specific name.GenericCookiegetCookie(java.lang.String cookieName, ContainerServicesNamespace namespace)This method retrieves a platform-independent Cookie with a specific name.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).ContainerStringCollectiongetFormAndQueryStrings()This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).java.lang.StringgetHeaderValue(java.lang.String headerName)This method returns the value of the requested headerjava.lang.StringgetMethod()Return the request's method is post or getjava.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.StringgetRemoteAddress()This method returns the client IP addressjava.lang.ObjectgetRequestAttribute(java.lang.String name)This method returns the value of a Request Attribute.java.lang.StringgetRequestServerName()This method returns the Web Server Name from the request objectContainerStringCollectiongetServerVariables()Returns a collection of server variables.java.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.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) from the namespace specified.intgetStatusCode()Returns the HTTP Status code specified for this response.booleanhasOutputStream()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()Deprecated.Cookieless mode is insecure.booleanisQueryParam(java.lang.String pName)Returns a boolean indicating whether the input parameter is found in the querybooleanisRequestSecure()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.GenericCookienewCookie(java.lang.String cookieName, java.lang.String cookieValue)This method creates a new platform-independent Cookie.GenericCookienewCookie(java.lang.String cookieName, java.lang.String cookieValue, ContainerServicesNamespace namespace)This method creates a new platform-independent Cookie.ParameterBuildernewHiddenInputParameterBuilder()Create a new instance of a ParameterBuilder that is suited for building hidden inputs.NamespaceEncodernewNamespaceEncoder()Create a new instance of a NamespaceEncoder that can provide global namespace support.ParameterBuildernewURIParameterBuilder()Create a new instance of a ParameterBuilder that is suited for building URIs.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 type)Stes HTTP response content typevoidsetHeaderValue(java.lang.String name, java.lang.String value)Sets HTTP response headervoidsetJavaURLSessionSupported(boolean value)Deprecated.Cookieless mode is insecure.voidsetRequestAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Request Attribute.voidsetSessionAttribute(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.voidsetStatusCode(int statusCode)Sets the HTTP Status code specified for this response.-
Methods inherited from interface com.microstrategy.web.platform.ContainerServicesContext
getApplicationParameters, getContextPath, getControllerParameter, getInitParameter, getInitParameterNames, getRealPath, getResource, getResourceAsStream, getResourcePaths, initGlobalObjects
-
-
-
-
Field Detail
-
SPNEGO_UNLOCKPHRASE
static final java.lang.String SPNEGO_UNLOCKPHRASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getQueryString
java.lang.String getQueryString()
This method returns the entire Query String.- Returns:
- A
Stringthat contains the contents of the Query String.
-
getRemoteAddress
java.lang.String getRemoteAddress()
This method returns the client IP address- Returns:
- A
Stringwith the value of the client IP address
-
getHeaderValue
java.lang.String getHeaderValue(java.lang.String headerName)
This method returns the value of the requested header- 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
ContainerStringCollection getFormAndQueryStrings()
This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).- Returns:
- A
ContainerStringCollectionobject.
-
getCookieStrings
ContainerStringCollection getCookieStrings()
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).- Returns:
- A
ContainerStringCollectionobject.
-
getCookieStrings
ContainerStringCollection getCookieStrings(ContainerServicesNamespace namespace)
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).- Parameters:
namespace- AContainerServicesNamespaceobject representing the namespace requirement. If null, no namespace is used.- Returns:
- A
ContainerStringCollectionobject. - Since:
- MicroStrategy Web 8.0.2
-
getSessionStrings
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.- Returns:
- A
ContainerStringCollectionobject.
-
getSessionStrings
ContainerStringCollection getSessionStrings(ContainerServicesNamespace namespace)
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs) from the namespace specified. Only those session variables that return values of type String are considered.- Parameters:
namespace- AContainerServicesNamespaceobject representing the namespace requirement.- Returns:
- A
ContainerStringCollectionobject. - Since:
- MicroStrategy Web 8.0.2
-
getRequestAttribute
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.- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named attribute.
-
setRequestAttribute
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.- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
getSessionAttribute
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.- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named session attribute.
-
getSessionAttribute
java.lang.Object getSessionAttribute(java.lang.String name, ContainerServicesNamespace namespace)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.- Parameters:
name- the name of an attribute.namespace- the name of the URL parameter that privides the namespace name.- Returns:
- An
Objectrepresenting the value of a named session attribute. - Since:
- MicroStrategy Web 8.0.2
-
setSessionAttribute
void setSessionAttribute(java.lang.String name, java.lang.Object value)This 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.- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
setSessionAttribute
void setSessionAttribute(java.lang.String name, java.lang.Object value, ContainerServicesNamespace namespace)This 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.- 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
-
newCookie
GenericCookie newCookie(java.lang.String cookieName, java.lang.String cookieValue)
This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.- Parameters:
cookieName- AStringwhich identifies the name of the cookie.cookieValue- AStringrepresenting the value of the cookie.- Returns:
- A
GenericCookiecontaining the name/value pair supplied
-
newCookie
GenericCookie newCookie(java.lang.String cookieName, java.lang.String cookieValue, ContainerServicesNamespace namespace)
This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.- Parameters:
cookieName- AStringwhich identifies the name of the cookie.cookieValue- AStringrepresenting the value of the cookie.namespace- AContainerServicesNamespaceobject representing the namespace requirement. If null, no namespace is used.- Returns:
- A
GenericCookiecontaining the name/value pair supplied - Since:
- MicroStrategy Web 8.0.2
-
getCookie
GenericCookie getCookie(java.lang.String cookieName)
This method retrieves a platform-independent Cookie with a specific name.- Parameters:
cookieName- AStringwhich identifies the name of the cookie.- Returns:
- A
GenericCookiefor the name supplied. If no cookie exists with this name, anullpointer is returned.
-
getCookie
GenericCookie getCookie(java.lang.String cookieName, ContainerServicesNamespace namespace)
This method retrieves a platform-independent Cookie with a specific name.- Parameters:
cookieName- AStringwhich identifies the name of the cookie.namespace- AContainerServicesNamespaceobject represention the namespace requirement.- Returns:
- A
GenericCookiefor the name supplied. If no cookie exists with this name, anullpointer is returned. - Since:
- MicroStrategy Web 8.0.2
-
addCookieToResponse
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.- Parameters:
cookie- TheGenericCookieto be added to the Response.
-
getApplicationPath
java.lang.String getApplicationPath()
This method returns the full application path of the servlet- Returns:
- A
Stringthat indicates the full application path of the servlet. (i.e. http://localhost:8080/MicroStrategy/servlet)
-
getPostedFile
PostedFile getPostedFile(java.lang.String name)
Provides a way to access individual files that have been uploaded by a client.- Parameters:
name- a name of posted file- Returns:
- a posted file
-
getRequestServerName
java.lang.String getRequestServerName()
This method returns the Web Server Name from the request object- 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
java.lang.String getSessionID()
Returns HTTP session ID- Returns:
- HTTP session ID
-
sendBinaryContent
void sendBinaryContent(MarkupOutput mo)
Outputs binary content of the MarkupOutput- Parameters:
mo- markup outpu containing binary image
-
setContentType
void setContentType(java.lang.String type)
Stes HTTP response content type- Parameters:
type- content type
-
setHeaderValue
void setHeaderValue(java.lang.String name, java.lang.String value)Sets HTTP response header- Parameters:
name- header namevalue- header value
-
getApplicationAttribute
java.lang.Object getApplicationAttribute(java.lang.String name)
This method returns the value of an Application Attribute.- Parameters:
name- the name of an attribute.- Returns:
- An
Objectrepresenting the value of a named application attribute.
-
setApplicationAttribute
void setApplicationAttribute(java.lang.String name, java.lang.Object value)This method sets the value of a Application Attribute.- Parameters:
name- AStringwhich identifies the name of the attribute.value- AnObjectrepresenting the value of a named attribute.
-
sendError
boolean sendError(int sc)
Sends an error response to the client using the specified status code.- 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
boolean sendError(int sc, java.lang.String msg)Sends an error response to the client using the specified status code.- Parameters:
sc- The errror status code.msg- The error message.- Returns:
trueto indicate this action succeeded.falseto indicate error in performing this action.
-
getCodePage
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.- Returns:
- an integer that represents the character formatting codepage.
- Since:
- MicroStrategy Web 7.5.0
-
setCodePage
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.- Parameters:
code- an integer that represents the character formatting codepage.- Since:
- MicroStrategy Web 7.5.0
-
isJavaURLSessionSupported
@Deprecated boolean isJavaURLSessionSupported()
Deprecated.Cookieless mode is insecure. Deprecating feature.Indicates if the instance of this container services supports cookieless environments- Since:
- MicroStrategy Web 7.5.0
-
setJavaURLSessionSupported
@Deprecated void setJavaURLSessionSupported(boolean value)
Deprecated.Cookieless mode is insecure. Deprecating feature.Sets if the instance of this container services supports cookieless environments- Parameters:
value-trueif cookieless environment is supported- Since:
- MicroStrategy Web 7.5.0
-
newURIParameterBuilder
ParameterBuilder newURIParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building URIs.- Returns:
- An instance of a ParameterBuilder that generates URIs.
- Since:
- MicroStrategy Web 8.0.0
-
newHiddenInputParameterBuilder
ParameterBuilder newHiddenInputParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building hidden inputs.- Returns:
- An instance of a ParameterBuilder that generates a string of hidden inputs.
- Since:
- MicroStrategy Web 8.0.0
-
newNamespaceEncoder
NamespaceEncoder newNamespaceEncoder()
Create a new instance of a NamespaceEncoder that can provide global namespace support.- Returns:
- An instance of a NamespaceEncoder that should be used for global namespacing.
- Since:
- MicroStrategy Web 8.0.0
-
getServerVariables
ContainerStringCollection getServerVariables()
Returns a collection of server variables.- Returns:
- a collection of server variables.
- Since:
- MicroStrategy Web 7.5.4
-
getStatusCode
int getStatusCode()
Returns the HTTP Status code specified for this response.- Returns:
- The HTTP Status code specified for this response.
- Since:
- MicroStrategy Web 9.0.0
-
setStatusCode
void setStatusCode(int statusCode)
Sets the HTTP Status code specified for this response.- Parameters:
statusCode- the HTTP Status code specified for this response.- Since:
- MicroStrategy Web 9.0.0
-
getOutputStream
java.io.OutputStream getOutputStream()
- Since:
- MicroStrategy Web 9.0.0
-
hasOutputStream
boolean hasOutputStream()
- Since:
- MicroStrategy Web 9.0.0
-
isRequestSecure
boolean isRequestSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS- Since:
- MicroStrategy Web 9.0.0
-
isSessionlessRequest
boolean isSessionlessRequest()
Does the request has a pre-established session id.
-
invalidateHttpSession
void invalidateHttpSession()
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 part
-
getMethod
java.lang.String getMethod()
Return the request's method is post or get
-
getSessionMaxIdleTime
int getSessionMaxIdleTime()
Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.
-
isQueryParam
boolean isQueryParam(java.lang.String pName)
Returns a boolean indicating whether the input parameter is found in the query- Parameters:
pName- name of the parameter to be searched in query- Returns:
- true if query contains the parameter name (case-insensitive search) passed as input with a non-empty value
-
-