Class GroovyServerBridgeRequest

  • All Implemented Interfaces:
    IServerBridgeRequest, groovy.lang.GroovyObject

    @Scriptable
    public final class GroovyServerBridgeRequest
    extends groovy.lang.GroovyObjectSupport
    implements IServerBridgeRequest
    • Constructor Detail

    • Method Detail

      • get

        public String get​(String p_strKey)
        Description copied from interface: IServerBridgeRequest
        Get a request variable.
        Specified by:
        get in interface IServerBridgeRequest
        Parameters:
        p_strKey - The key.
        Returns:
        The value that is referenced by p_strKey, or null if there is no such request variable.
      • get

        public String get​(String p_strKey,
                          String p_strFallback)
        Description copied from interface: IServerBridgeRequest
        Get a request variable.
        Specified by:
        get in interface IServerBridgeRequest
        Parameters:
        p_strKey - The key.
        p_strFallback - The fallback value.
        Returns:
        The value that is referenced by p_strKey, or p_objFallback if there is no such request variable.
      • put

        @Deprecated
        public void put​(String p_strKey,
                        String p_strValue)
        Deprecated.
        DO ABSOLUTELY NOT USE THIS METHOD!
        Description copied from interface: IServerBridgeRequest
        Set a request variable.
        Specified by:
        put in interface IServerBridgeRequest
        Parameters:
        p_strKey - The name of the request variable.
        p_strValue - The value of the request variable.
      • remove

        public void remove​(String p_strKey)
        Description copied from interface: IServerBridgeRequest
        Remove the specified variable from the request.
        Specified by:
        remove in interface IServerBridgeRequest
        Parameters:
        p_strKey - The name of the variable to remove.
      • containsKey

        public boolean containsKey​(String p_strKey)
        Description copied from interface: IServerBridgeRequest
        Test if the request contains the specified variable.
        Specified by:
        containsKey in interface IServerBridgeRequest
        Parameters:
        p_strKey - The name of the variable.
        Returns:
        true if the request contains the specified variable.
      • size

        public int size()
        Specified by:
        size in interface IServerBridgeRequest
        Returns:
        Returns the number of request parameters in this request.
      • getReader

        public BufferedReader getReader()
                                 throws IOException
        Retrieves the body of the request as character data using a BufferedReader. The reader translates the character data according to the character encoding used on the body.

        Either this method or getInputStream() may be called to read the body, not both.

        This method should not be called if the request has content type multipart/form-data or application/x-www-form-urlencoded.

        Returns:
        A BufferedReader containing the body of the request.
        Throws:
        UnsupportedEncodingException - If the character set encoding used is not supported and the text cannot be decoded.
        IllegalStateException - If getInputStream() method has been called on this request.
        IOException - If an input or output exception occurred.
        See Also:
        getInputStream()
      • getInputStream

        public javax.servlet.ServletInputStream getInputStream()
                                                        throws IOException
        Retrieves the body of the request as binary data using a ServletInputStream.

        Either this method or getReader() may be called to read the body, not both.

        This method should not be called if the request has content type multipart/form-data or application/x-www-form-urlencoded.

        Returns:
        A ServletInputStream object containing the body of the request.
        Throws:
        IllegalStateException - If the getReader() method has already been called for this request.
        IOException - If an input or output exception occurred.
      • hasUploadFiles

        public boolean hasUploadFiles()
        Description copied from interface: IServerBridgeRequest
        Check if files were uploaded with this request.
        Specified by:
        hasUploadFiles in interface IServerBridgeRequest
        Returns:
        true if files were uploaded with this request, or false otherwise.
      • getUploadFiles

        public de.uplanet.lucy.server.connector.IUploadFiles getUploadFiles()
        Description copied from interface: IServerBridgeRequest
        Get the files that were uploaded with this request.
        Specified by:
        getUploadFiles in interface IServerBridgeRequest
        Returns:
        The files that were uploaded with this request, or null.
      • isEmpty

        public boolean isEmpty()
      • getProperty

        public Object getProperty​(String p_strKey)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
        Overrides:
        getProperty in class groovy.lang.GroovyObjectSupport
      • setProperty

        public void setProperty​(String p_strKey,
                                Object p_value)
        Specified by:
        setProperty in interface groovy.lang.GroovyObject
        Overrides:
        setProperty in class groovy.lang.GroovyObjectSupport
      • putAt

        @Deprecated
        public void putAt​(String p_strKey,
                          Object p_value)
        Deprecated.
        DO ABSOLUTELY NOT USE THIS METHOD!