Interface ContainerServices

    • 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 - A String 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.
      • 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.
      • 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 - A String which identifies the name of the attribute.
        value - An Object 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 - A String which identifies the name of the attribute.
        value - An Object 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 - A String which identifies the name of the attribute.
        value - An Object representing the value of a named attribute.
        namespace - A ContainerServicesNamespace 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 - A String which identifies the name of the cookie.
        cookieValue - A String 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 - A String which identifies the name of the cookie.
        cookieValue - A String representing the value of the cookie.
        namespace - A ContainerServicesNamespace 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 - A String which identifies the name of the cookie.
        Returns:
        A GenericCookie for the name supplied. If no cookie exists with this name, a null 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 - A String which identifies the name of the cookie.
        namespace - A ContainerServicesNamespace object represention the namespace requirement.
        Returns:
        A GenericCookie for the name supplied. If no cookie exists with this name, a null 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 - The GenericCookie 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 name
        value - 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 - A String which identifies the name of the attribute.
        value - An Object 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