Class OfbizUrlBuilder


  • public final class OfbizUrlBuilder
    extends java.lang.Object
    OFBiz URL builder.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean buildFullUrl​(java.lang.Appendable buffer, java.lang.String url, boolean useSSL)
      Builds a full URL - including scheme, host, servlet path and resource.
      boolean buildHostPart​(java.lang.Appendable buffer, java.lang.String url, boolean useSSL)
      Builds a partial URL - including the scheme and host, but not the servlet path or resource.
      void buildPathPart​(java.lang.Appendable buffer, java.lang.String url)
      Builds a partial URL - including the servlet path and resource, but not the scheme or host.
      static OfbizUrlBuilder from​(javax.servlet.http.HttpServletRequest request)
      Returns an OfbizUrlBuilder instance.
      static OfbizUrlBuilder from​(ComponentConfig.WebappInfo webAppInfo, Delegator delegator)
      Returns an OfbizUrlBuilder instance.
      • Methods inherited from class java.lang.Object

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

      • module

        public static final java.lang.String module
    • Method Detail

      • buildFullUrl

        public boolean buildFullUrl​(java.lang.Appendable buffer,
                                    java.lang.String url,
                                    boolean useSSL)
                             throws WebAppConfigurationException,
                                    java.io.IOException
        Builds a full URL - including scheme, host, servlet path and resource.
        Parameters:
        buffer -
        url -
        useSSL - Default value to use - will be replaced by request-map setting if one is found.
        Returns:
        true if the URL uses https
        Throws:
        WebAppConfigurationException
        java.io.IOException
      • buildHostPart

        public boolean buildHostPart​(java.lang.Appendable buffer,
                                     java.lang.String url,
                                     boolean useSSL)
                              throws WebAppConfigurationException,
                                     java.io.IOException
        Builds a partial URL - including the scheme and host, but not the servlet path or resource.
        Parameters:
        buffer -
        url -
        useSSL - Default value to use - will be replaced by request-map setting if one is found with security=true set.
        Returns:
        true if the URL uses https
        Throws:
        WebAppConfigurationException
        java.io.IOException
      • buildPathPart

        public void buildPathPart​(java.lang.Appendable buffer,
                                  java.lang.String url)
                           throws WebAppConfigurationException,
                                  java.io.IOException
        Builds a partial URL - including the servlet path and resource, but not the scheme or host.
        Parameters:
        buffer -
        url -
        Throws:
        WebAppConfigurationException
        java.io.IOException