Class DefaultSimpleProxyEngine

java.lang.Object
de.hybris.platform.xyformsservices.proxy.orbeonservices.impl.DefaultSimpleProxyEngine
All Implemented Interfaces:
ProxyEngine

@Deprecated(since="2211", forRemoval=true) public class DefaultSimpleProxyEngine extends Object implements ProxyEngine
Deprecated, for removal: This API element is subject to removal in a future version.
ProxyEngine implementation for Orbeon.

It uses a CookieManager to mantain orbeon's session.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Integer
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected CookieManager
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final Set<String>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final Set<String>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final Integer
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final Integer
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected UrlRewriter
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    connect(javax.servlet.http.HttpServletRequest request, String url, String method, Map<String,String> headers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Stablishes an HTTP connection with the given URL.
    extractNamespace(javax.servlet.http.HttpServletRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Extracts the namespace coming from client.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the host part of an URL, including protocol, host, port with no trailing slash.
    protected String
    getPrefixFromRequest(javax.servlet.http.HttpServletRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the prefix from the request URI address.
    protected boolean
    isServerError(int sc)
    Deprecated, for removal: This API element is subject to removal in a future version.
    True if the status code represents an error on the server side
    protected boolean
    isTextFile(String contentType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns true if the given contentType refers to a text file.
    void
    proxy(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url, boolean forceGetMethod, Map<String,String> headers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Proxies content
    protected void
    rewriteLocation(HttpURLConnection conn, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    sendRequestHeaders(Set<String> headers, javax.servlet.http.HttpServletRequest request, HttpURLConnection conn)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sends headers from the request to the remote server.
    protected void
    sendResponseHeaders(Set<String> headers, HttpURLConnection conn, javax.servlet.http.HttpServletResponse response)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get headers from remote connection and copies them back to the current response.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    setHeaders(javax.servlet.http.HttpServletRequest request, Map<String,String> headers)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setHeadersFrom(List<String> headersFrom)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setHeadersTo(List<String> headersTo)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_CHARSET

      protected static final String DEFAULT_CHARSET
      Deprecated, for removal: This API element is subject to removal in a future version.
    • ORBEON_PREFIX

      protected static final String ORBEON_PREFIX
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • ORBEON_PREFIX_PLUS_SLASH

      protected static final String ORBEON_PREFIX_PLUS_SLASH
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • HOST_PART_INDEX

      protected static final Integer HOST_PART_INDEX
      Deprecated, for removal: This API element is subject to removal in a future version.
    • CLIENT_ERROR_MINIMUM

      protected static final Integer CLIENT_ERROR_MINIMUM
      Deprecated, for removal: This API element is subject to removal in a future version.
    • SERVER_ERROR_MAXIMUM

      protected static final Integer SERVER_ERROR_MAXIMUM
      Deprecated, for removal: This API element is subject to removal in a future version.
    • POST_METHOD

      protected static final String POST_METHOD
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • PUT_METHOD

      protected static final String PUT_METHOD
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • HYBRIS_USERNAME

      protected static final String HYBRIS_USERNAME
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • HYBRIS_ROLES

      protected static final String HYBRIS_ROLES
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • ROLE_ANONYMOUS

      protected static final String ROLE_ANONYMOUS
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • LOCATION_HEADER

      protected static final String LOCATION_HEADER
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • cookieManager

      protected CookieManager cookieManager
      Deprecated, for removal: This API element is subject to removal in a future version.
    • urlRewriter

      protected UrlRewriter urlRewriter
      Deprecated, for removal: This API element is subject to removal in a future version.
    • headersTo

      protected final Set<String> headersTo
      Deprecated, for removal: This API element is subject to removal in a future version.
    • headersFrom

      protected final Set<String> headersFrom
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • DefaultSimpleProxyEngine

      public DefaultSimpleProxyEngine()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • extractNamespace

      public String extractNamespace(javax.servlet.http.HttpServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Extracts the namespace coming from client.
      Specified by:
      extractNamespace in interface ProxyEngine
      Parameters:
      request -
    • proxy

      public void proxy(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url, boolean forceGetMethod, Map<String,String> headers) throws ProxyException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ProxyEngine
      Proxies content
      Specified by:
      proxy in interface ProxyEngine
      Parameters:
      request - The HttpServletRequest associated to the call
      response - The HttpServletResponse associated to the call
      namespace - Used for HTML element's id generation
      url - The url to be called
      forceGetMethod - Useful when proxying content, when false it uses the same method used in the original request.
      headers - Extra headers to be passed to the connection, useful for authentication headers.
      Throws:
      ProxyException
    • setHeaders

      protected void setHeaders(javax.servlet.http.HttpServletRequest request, Map<String,String> headers)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • rewriteLocation

      protected void rewriteLocation(HttpURLConnection conn, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url) throws UrlRewriterException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      UrlRewriterException
    • getHostPart

      protected String getHostPart(String url)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the host part of an URL, including protocol, host, port with no trailing slash.
      Parameters:
      url -
    • getPrefixFromRequest

      protected String getPrefixFromRequest(javax.servlet.http.HttpServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the prefix from the request URI address.
      Parameters:
      request -
    • connect

      protected HttpURLConnection connect(javax.servlet.http.HttpServletRequest request, String url, String method, Map<String,String> headers) throws URISyntaxException, MalformedURLException, IOException, org.apache.http.cookie.MalformedCookieException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Stablishes an HTTP connection with the given URL.
      Parameters:
      request - Request to get headers from.
      url - HTTP Address to be connected.
      method - request method for orbeon
      Throws:
      URISyntaxException - If the URI is not well formed
      MalformedURLException - If the URL is not well formed
      IOException - If there is a connection problem with the remote server.
      org.apache.http.cookie.MalformedCookieException - If there is a problem when dealing with Cookies
    • isServerError

      protected boolean isServerError(int sc)
      Deprecated, for removal: This API element is subject to removal in a future version.
      True if the status code represents an error on the server side
      Parameters:
      sc -
    • isTextFile

      protected boolean isTextFile(String contentType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the given contentType refers to a text file.
      Parameters:
      contentType -
    • sendRequestHeaders

      protected void sendRequestHeaders(Set<String> headers, javax.servlet.http.HttpServletRequest request, HttpURLConnection conn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends headers from the request to the remote server.
      Parameters:
      headers - headers that should be sent
      request - Request to take header values from.
      conn - Remote server connection
    • sendResponseHeaders

      protected void sendResponseHeaders(Set<String> headers, HttpURLConnection conn, javax.servlet.http.HttpServletResponse response)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get headers from remote connection and copies them back to the current response.
      Parameters:
      headers - headers that should be copied back
      conn - Remote server connection
      response - Response to copy header values to.
    • setCookieManager

      public void setCookieManager(CookieManager cookieManager)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setUrlRewriter

      public void setUrlRewriter(UrlRewriter urlRewriter)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setHeadersTo

      public void setHeadersTo(List<String> headersTo)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setHeadersFrom

      public void setHeadersFrom(List<String> headersFrom)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getConfigurationService

      protected ConfigurationService getConfigurationService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
      Deprecated, for removal: This API element is subject to removal in a future version.