public class LiferayUtils
extends java.lang.Object
Constructor and Description |
---|
LiferayUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDefaultLocale()
Returns the default locale for the container.
|
static java.lang.String |
getPortalContext()
Retrieves the main context path for the portal.
|
static java.util.Properties |
getPortalProperties()
Retrieves all properties from portal-ext.properties.
|
static java.util.Properties |
getPortalProperties(java.lang.String prefix)
Retrieves all properties from portal-ext.properties that start with a given prefix
|
static java.lang.String |
getPortalProperty(java.lang.String key)
Retrieves a single property from portal-ext.properties.
|
static java.lang.String |
getRequestLocale(javax.portlet.PortletRequest request)
Returns the locale to be used for the current request.
|
static java.lang.String |
getStaticResourceContext()
Retrieves the URL path prefix to be used for static resources.
|
static boolean |
hasPrivilege(javax.portlet.PortletRequest request,
java.lang.String privilege) |
static boolean |
hasUpdatePrivileges(javax.portlet.PortletRequest request) |
static boolean |
hasViewPrivileges(javax.portlet.PortletRequest request) |
public static java.lang.String getPortalContext()
public static java.lang.String getStaticResourceContext()
getPortalContext()
. Users
can customize this value in portal-ext.properties by setting the value of
"endeca.static.resource.context". Setting a value of "/foo/" will reference that path on the
current host; you can also set a fully-qualified url prefix such as "http://foo/bar/" to point to a different host.public static java.lang.String getPortalProperty(java.lang.String key)
key
- the property to returnpublic static java.util.Properties getPortalProperties()
public static java.util.Properties getPortalProperties(java.lang.String prefix)
prefix
- the prefix by which to filter the propertiespublic static boolean hasPrivilege(javax.portlet.PortletRequest request, java.lang.String privilege)
public static boolean hasUpdatePrivileges(javax.portlet.PortletRequest request)
public static boolean hasViewPrivileges(javax.portlet.PortletRequest request)
public static java.lang.String getDefaultLocale()
public static java.lang.String getRequestLocale(javax.portlet.PortletRequest request)
request
- the requestCopyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.