portletconnection.java

来自「RESIN 3.2 最新源码」· Java 代码 · 共 759 行 · 第 1/2 页

JAVA
759
字号
  abstract public int getServerPort();  /**   * Return the path to the portal portion of the url that was used to make the   * request.   *   * @see javax.portlet.PortletRequest#getContextPath   */  abstract public String getContextPath();  /**   * Return the authentication scheme used for the current request.   *    * @return PortletRequest.BASIC_AUTH, PortletRequest.CLIENT_CERT_AUTH,   * PortletRequest.DIGEST_AUTH, PortletRequest.FORM_AUTH, or a custom method.   *   * @see javax.portlet.PortletRequest#getAuthType   */  abstract public String getAuthType();  /**   * Return true if the connection for the current request is secure, for   * example it uses HTTPS.   *   * @see javax.portlet.PortletRequest#isSecure   */  abstract public boolean isSecure();  /**   * Return the session id that was supplied by the client for the current   * request.   *    * @see javax.portlet.PortletRequest#getRequestedSessionId   */  abstract public String getRequestedSessionId();  /**   * Return true the session id that was supplied by the client for the current   * request is valid.   *    * @see javax.portlet.PortletRequest#isRequestedSessionIdValid   */  abstract public boolean isRequestedSessionIdValid();  /**   * Return the identity of the remote user, null if the identity has not been   * established.   *   * @see javax.portlet.PortletRequest#getRemoteUser   */  abstract public String getRemoteUser();  /**   * Return a {@link java.security.Principal} that contains the identity of    * the remote user, null if the identity has not been established.    *   * @see javax.portlet.PortletRequest#getUserPrincipal   */  abstract public Principal getUserPrincipal();  /**   * Return true if the identity of remote user has been established and the   * user has been assigned the role.   *   * @see javax.portlet.PortletRequest#isUserInRole   */  abstract public boolean isUserInRole(String role);  /**   * Return the value of the specified connection property as a String, null   * if the property was not provided by the request from the client.   *   * "properties" correspond to HTTP headers in the request for HTTP   * connections.   *   * @see javax.portlet.PortletRequest#getProperty   */  abstract public String getProperty(String propertyName);  /**   * Return the values of the specified connection property as an array of   * Strings, null if the property was not provided by the request from the   * client.   *   * "properties" correspond to HTTP headers in the request for HTTP   * connections.   *   * @return an Enumeration of String   *   * @see javax.portlet.PortletRequest#getProperties   */  abstract public Enumeration getProperties(String propertyName);  /**   * Return the names of available properties for the connection.   *   * "properties" correspond to HTTP headers in the request for HTTP   * connections.   *   * @return an Enumeration of String   *   * @see javax.portlet.PortletRequest#getPropertyNames   */  abstract public Enumeration getPropertyNames();  /**   * Get the content types acceptable to the client.  The returned Set    * is ordered, the most preferrable content types appear before the least   * preferred.   *   * A return of null or an empty Set indicates that the client content types   * cannot be determiend, and is treated as an indication that any locale is   * acceptable.   */  abstract public Set<String> getClientContentTypes();  /**   * Get the locales acceptable to the client.  The returned Set is ordered,   * the most preferrable locale appears before the least preferred.  If the   * client supports all locales, then a Locale("","","") will be present  in   * the returned Set.   *   * A return of null or an empty Set indicates that the client locales cannot   * be determiend, and is treated as an indication that any locale is   * acceptable.   */  abstract public Set<Locale> getClientLocales();  /**   * Get the character encodings acceptable to the client.  The returned Set is   * order, the most preferrable character encoding appears before the least   * preferred.   *   * A return of null or an empty Set indicates that the client character   * encodings cannot be determiend, and is treated as an indication that any   * locale is   * acceptable.   */  abstract public Set<String> getClientCharacterEncodings();  /**   * Return the MIME type of the data supplied as the "body" of the request,   * null if not known.    *   * @see javax.portlet.ActionRequest#getContentType   */  abstract public String getSubmitContentType();  /**   * Return the length of of the data supplied as the "body" of the request,   * -1 if not known.    *   * @see javax.portlet.ActionRequest#getContentLength   */  abstract public int getSubmitContentLength();  /**   * Return the binary body of the current request.    *   * @throws IllegalStateException if getReader() has already been   * called for this connection.   *   * @throws IOException   *   * @see javax.portlet.ActionRequest#getPortletInputStream   */  abstract public InputStream getSubmitInputStream()    throws IOException, IllegalStateException;  /**   * Override the character encoding used by the Reader obtained   * using {@link #getReader}. This method must be called prior to reading   * input using {@link #getReader} or {@link #getPortletInputStream}.    *   * @throws UnsupportedEncodingException   *   * @throws IllegalStateException if getReader() has already been called for   * this connection.   *   * @see javax.portlet.ActionRequest#setCharacterEncoding   */  abstract public void setSubmitCharacterEncoding(String enc)    throws UnsupportedEncodingException, IllegalStateException;  /**   * Return the name of the character encoding that will be used by the Reader   * obtained using {@link #getReader}, null if none.   *   * @see javax.portlet.ActionRequest#getCharacterEncoding   */  abstract public String getSubmitCharacterEncoding();  abstract public BufferedReader getSubmitReader()    throws UnsupportedEncodingException, IOException;  /**   * Encode a url with any special encoding needed by the protocol,   * for example by adding a sesison id.   */  abstract public String encodeURL(String path);  /**   * Resolve a url so that it makes a request to the portal   */  abstract public String resolveURL(String partialUrl);  /**   * Resolve a url so that it makes a request to the portal with    * the specified level of security.   */  abstract public String resolveURL(String partialUrl, boolean isSecure)    throws PortletSecurityException;  abstract public void sendRedirect(String location)    throws IllegalStateException, IOException;  /**   * Set a property to be returned to the client.   *   * "properties" correspond to HTTP headers in the response for HTTP   * connections.   *   * @see javax.portlet.PortletResponse#setProperty   */   abstract public void setProperty(String name, String value);  /**   * Add a value to a property to be returned to the client.   *   * "properties" correspond to HTTP headers in the response for HTTP   * connections.   *   * @see javax.portlet.PortletResponse#addProperty   */   abstract public void addProperty(String name, String value);    /**   * Set the content type to use for the response.   */  abstract public void setContentType(String contentType);  /**    * Return the content type established with setContentType(), or null if   * setContentType() has not been called.   */   abstract public String getContentType();  /**   * Set the locale to use for the response.   */  abstract public void setLocale(Locale locale);  /**   * Return the Locale established with setLocale(), or null if setLocale()   * has not been called.   */  abstract public Locale getLocale();  abstract public void setBufferSize(int size);  abstract public int getBufferSize();  abstract public void flushBuffer()     throws IOException;  abstract public void resetBuffer();  abstract public void reset();  abstract public boolean isCommitted();  /**    * @throws IllegalStatementException if the content type has not been set   * with setContentType.   */  abstract public OutputStream getOutputStream()     throws IOException;  abstract public String getCharacterEncoding();  abstract public void setCharacterEncoding(String enc)     throws UnsupportedEncodingException;  /**     * @throws IllegalStatementException if the content type has not been set    * with setContentType.    */  abstract public PrintWriter getWriter()     throws IOException;  /**   * Get an Action for a namespace.   * Return null if the action stage for the request is complete   * or there is some other reason that the window and it's children   * should not proceed further in the action stage.   *   * @throws PortletException if the namespace has already been seen in the   * actionstagephase of this connection   */   public Action getAction( Window window, String namespace )    throws PortletException, IOException  {    return _context.getAction(window, namespace);  }  /**   * Get the current Action object, established from a call to getRender().   */  public Action getCurrentAction()  {    return _context.getCurrentAction();  }  /**   * Get a Render for a namespace.   * Return null if there is some reason that the window and it's children   * should not be rendered.   *   * @throws PortletException if the namespace has already been seen in the   * render phase of this connection   */   public Render getRender( Window window, String namespace )    throws PortletException, IOException  {    return _context.getRender(window, namespace);  }  /**   * Get the current Render object, established from a call to getRender().   */  public Render getCurrentRender()  {    return _context.getCurrentRender();  }  /**   * Throw an exception if an error was encountered when using this conneciton.   */  public void checkForFailure()    throws PortletException  {    if (_connectionFailed) {      if (_connectionFailedCause == null)        throw new PortletException("connection failed");      else        throw new PortletException(            "connection failed: " + _connectionFailedCause.toString(),            _connectionFailedCause );    }  }  /**   * Used in derived classes during finish() to determine if    * the response is private   */  protected boolean isPrivate()  {    return _context.isConnectionPrivate();  }  /**   * Used in derived classes during finish() to determine   * the maximum expires time for the connection, derived classes use this   * value to send an expires timeout to the client.   * -1 means never expire, 0 means expire immediately, otherwise it is a   *  number in seconds.   */  protected int getExpirationCache()  {    return _context.getConnectionExpirationCache();  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?