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.String
SPNEGO_UNLOCKPHRASE
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addCookieToResponse(GenericCookie cookie)
This method associates a platform-independent Cookie with a response.java.lang.Object
getApplicationAttribute(java.lang.String name)
This method returns the value of an Application Attribute.java.lang.String
getApplicationPath()
This method returns the full application path of the servletint
getCodePage()
Returns an integer that represents the character formatting codepage.GenericCookie
getCookie(java.lang.String cookieName)
This method retrieves a platform-independent Cookie with a specific name.GenericCookie
getCookie(java.lang.String cookieName, ContainerServicesNamespace namespace)
This method retrieves a platform-independent Cookie with a specific name.ContainerStringCollection
getCookieStrings()
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).ContainerStringCollection
getCookieStrings(ContainerServicesNamespace namespace)
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).ContainerStringCollection
getFormAndQueryStrings()
This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).java.lang.String
getHeaderValue(java.lang.String headerName)
This method returns the value of the requested headerjava.lang.String
getMethod()
Return the request's method is post or getjava.io.OutputStream
getOutputStream()
PostedFile
getPostedFile(java.lang.String name)
Provides a way to access individual files that have been uploaded by a client.java.lang.String
getQueryString()
This method returns the entire Query String.java.lang.String
getRemoteAddress()
This method returns the client IP addressjava.lang.Object
getRequestAttribute(java.lang.String name)
This method returns the value of a Request Attribute.java.lang.String
getRequestServerName()
This method returns the Web Server Name from the request objectContainerStringCollection
getServerVariables()
Returns a collection of server variables.java.lang.Object
getSessionAttribute(java.lang.String name)
This method returns the value of a Session Attribute.java.lang.Object
getSessionAttribute(java.lang.String name, ContainerServicesNamespace namespace)
This method returns the value of a Session Attribute.java.lang.String
getSessionID()
Returns HTTP session IDint
getSessionMaxIdleTime()
Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.ContainerStringCollection
getSessionStrings()
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs).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.int
getStatusCode()
Returns the HTTP Status code specified for this response.boolean
hasOutputStream()
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 partboolean
isJavaURLSessionSupported()
Deprecated.Cookieless mode is insecure.boolean
isQueryParam(java.lang.String pName)
Returns a boolean indicating whether the input parameter is found in the queryboolean
isRequestSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPSboolean
isSessionlessRequest()
Does the request has a pre-established session id.GenericCookie
newCookie(java.lang.String cookieName, java.lang.String cookieValue)
This method creates a new platform-independent Cookie.GenericCookie
newCookie(java.lang.String cookieName, java.lang.String cookieValue, ContainerServicesNamespace namespace)
This method creates a new platform-independent Cookie.ParameterBuilder
newHiddenInputParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building hidden inputs.NamespaceEncoder
newNamespaceEncoder()
Create a new instance of a NamespaceEncoder that can provide global namespace support.ParameterBuilder
newURIParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building URIs.void
sendBinaryContent(MarkupOutput mo)
Outputs binary content of the MarkupOutputboolean
sendError(int sc)
Sends an error response to the client using the specified status code.boolean
sendError(int sc, java.lang.String msg)
Sends an error response to the client using the specified status code.void
setApplicationAttribute(java.lang.String name, java.lang.Object value)
This method sets the value of a Application Attribute.void
setCodePage(int code)
Sets the code page, an integer representing the character formatting.void
setContentType(java.lang.String type)
Stes HTTP response content typevoid
setHeaderValue(java.lang.String name, java.lang.String value)
Sets HTTP response headervoid
setJavaURLSessionSupported(boolean value)
Deprecated.Cookieless mode is insecure.void
setRequestAttribute(java.lang.String name, java.lang.Object value)
This method sets the value of a Request Attribute.void
setSessionAttribute(java.lang.String name, java.lang.Object value)
This method sets the value of a Session Attribute.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.void
setStatusCode(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
String
that contains the contents of the Query String.
-
getRemoteAddress
java.lang.String getRemoteAddress()
This method returns the client IP address- Returns:
- A
String
with 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
- AString
with the name of the header to search for- Returns:
- A
String
with 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
ContainerStringCollection
object.
-
getCookieStrings
ContainerStringCollection getCookieStrings()
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).- Returns:
- A
ContainerStringCollection
object.
-
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
- AContainerServicesNamespace
object representing the namespace requirement. If null, no namespace is used.- Returns:
- A
ContainerStringCollection
object. - 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
ContainerStringCollection
object.
-
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
- AContainerServicesNamespace
object representing the namespace requirement.- Returns:
- A
ContainerStringCollection
object. - 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
Object
representing 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
- AString
which identifies the name of the attribute.value
- AnObject
representing 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
Object
representing 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
Object
representing 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
- AString
which identifies the name of the attribute.value
- AnObject
representing 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
- AString
which identifies the name of the attribute.value
- AnObject
representing the value of a named attribute.namespace
- AContainerServicesNamespace
object 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
- AString
which identifies the name of the cookie.cookieValue
- AString
representing the value of the cookie.- Returns:
- A
GenericCookie
containing 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
- AString
which identifies the name of the cookie.cookieValue
- AString
representing the value of the cookie.namespace
- AContainerServicesNamespace
object representing the namespace requirement. If null, no namespace is used.- Returns:
- A
GenericCookie
containing 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
- AString
which identifies the name of the cookie.- Returns:
- A
GenericCookie
for the name supplied. If no cookie exists with this name, anull
pointer is returned.
-
getCookie
GenericCookie getCookie(java.lang.String cookieName, ContainerServicesNamespace namespace)
This method retrieves a platform-independent Cookie with a specific name.- Parameters:
cookieName
- AString
which identifies the name of the cookie.namespace
- AContainerServicesNamespace
object represention the namespace requirement.- Returns:
- A
GenericCookie
for the name supplied. If no cookie exists with this name, anull
pointer 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
- TheGenericCookie
to be added to the Response.
-
getApplicationPath
java.lang.String getApplicationPath()
This method returns the full application path of the servlet- Returns:
- A
String
that 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
String
that 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
Object
representing 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
- AString
which identifies the name of the attribute.value
- AnObject
representing 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:
true
to indicate this action succeeded.false
to 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:
true
to indicate this action succeeded.false
to 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
-true
if 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
-
-