Class WebSiteProperties


  • @ThreadSafe
    public final class WebSiteProperties
    extends java.lang.Object
    Web site properties.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static WebSiteProperties defaults​(Delegator delegator)
      Returns a WebSiteProperties instance initialized to the settings found in the url.properties file.
      static WebSiteProperties from​(HttpServletRequest request)
      Returns a WebSiteProperties instance initialized to the settings found in the application's WebSite entity value.
      static WebSiteProperties from​(GenericValue webSiteValue)
      Returns a WebSiteProperties instance initialized to the settings found in the WebSite entity value.
      boolean getEnableHttps()
      Returns true if https is enabled.
      java.lang.String getHttpHost()
      Returns the configured http host, or an empty String if not configured.
      java.lang.String getHttpPort()
      Returns the configured http port, or an empty String if not configured.
      java.lang.String getHttpsHost()
      Returns the configured https host, or an empty String if not configured.
      java.lang.String getHttpsPort()
      Returns the configured https port, or an empty String if not configured.
      java.lang.String getWebappPath()
      Returns the configured webapp path on website linked to webapp or null.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • defaults

        public static WebSiteProperties defaults​(Delegator delegator)
        Returns a WebSiteProperties instance initialized to the settings found in the url.properties file.
      • from

        public static WebSiteProperties from​(HttpServletRequest request)
                                      throws GenericEntityException
        Returns a WebSiteProperties instance initialized to the settings found in the application's WebSite entity value. If the application does not have a WebSite entity value then the instance is initialized to the settings found in the url.properties file.
        Parameters:
        request -
        Throws:
        GenericEntityException
      • from

        public static WebSiteProperties from​(GenericValue webSiteValue)
        Returns a WebSiteProperties instance initialized to the settings found in the WebSite entity value.
        Parameters:
        webSiteValue -
      • getHttpPort

        public java.lang.String getHttpPort()
        Returns the configured http port, or an empty String if not configured.
      • getHttpHost

        public java.lang.String getHttpHost()
        Returns the configured http host, or an empty String if not configured.
      • getHttpsPort

        public java.lang.String getHttpsPort()
        Returns the configured https port, or an empty String if not configured.
      • getHttpsHost

        public java.lang.String getHttpsHost()
        Returns the configured https host, or an empty String if not configured.
      • getEnableHttps

        public boolean getEnableHttps()
        Returns true if https is enabled.
      • getWebappPath

        public java.lang.String getWebappPath()
        Returns the configured webapp path on website linked to webapp or null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object