Package org.apache.ofbiz.webapp.website
Class WebSiteProperties
- java.lang.Object
-
- org.apache.ofbiz.webapp.website.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 aWebSiteProperties
instance initialized to the settings found in theurl.properties
file.static WebSiteProperties
from(javax.servlet.http.HttpServletRequest request)
Returns aWebSiteProperties
instance initialized to the settings found in the application's WebSite entity value.static WebSiteProperties
from(GenericValue webSiteValue)
Returns aWebSiteProperties
instance initialized to the settings found in the WebSite entity value.boolean
getEnableHttps()
Returnstrue
if https is enabled.java.lang.String
getHttpHost()
Returns the configured http host, or an emptyString
if not configured.java.lang.String
getHttpPort()
Returns the configured http port, or an emptyString
if not configured.java.lang.String
getHttpsHost()
Returns the configured https host, or an emptyString
if not configured.java.lang.String
getHttpsPort()
Returns the configured https port, or an emptyString
if not configured.java.lang.String
getWebappPath()
Returns the configured webapp path on website linked to webapp or null.java.lang.String
toString()
-
-
-
Method Detail
-
defaults
public static WebSiteProperties defaults(Delegator delegator)
Returns aWebSiteProperties
instance initialized to the settings found in theurl.properties
file.
-
from
public static WebSiteProperties from(javax.servlet.http.HttpServletRequest request) throws GenericEntityException
Returns aWebSiteProperties
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 theurl.properties
file.- Parameters:
request
-- Throws:
GenericEntityException
-
from
public static WebSiteProperties from(GenericValue webSiteValue)
Returns aWebSiteProperties
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 emptyString
if not configured.
-
getHttpHost
public java.lang.String getHttpHost()
Returns the configured http host, or an emptyString
if not configured.
-
getHttpsPort
public java.lang.String getHttpsPort()
Returns the configured https port, or an emptyString
if not configured.
-
getHttpsHost
public java.lang.String getHttpsHost()
Returns the configured https host, or an emptyString
if not configured.
-
getEnableHttps
public boolean getEnableHttps()
Returnstrue
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 classjava.lang.Object
-
-