|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.portlet.util.EndecaPortletUtil
public class EndecaPortletUtil
EndecaPortlet
.Constructor Summary | |
---|---|
EndecaPortletUtil()
|
Method Summary | |
---|---|
static java.lang.String |
getDataSourceId(javax.portlet.PortletRequest request)
Retrieve the dataSourceId of the data source that this portlet listens to. |
static java.lang.String |
getDefaultDataSourceId()
Retrieves the value of the default data source |
static java.lang.String |
getDefaultLocale(Container container)
Returns the default locale for the container. |
static java.lang.String |
getDisplayName(javax.portlet.PortletRequest request,
java.lang.String key)
Retrieves the global display name for the specified attribute |
static java.lang.String |
getDisplayName(java.lang.String dataSourceId,
java.lang.String key)
Retrieves the global display name for the specified attribute |
static java.lang.String |
getFullyQualifiedTransitionContext(javax.portlet.PortletRequest request,
java.lang.String viewTransitionPageContext)
Returns a fully-qualified target page context path. |
static java.lang.String |
getRequestLocale(javax.portlet.PortletRequest request,
Container container)
Returns the locale to be used for the current request. |
static boolean |
hasPrivilege(javax.portlet.PortletRequest request,
Container container,
java.lang.String privilege)
|
static boolean |
hasUpdatePrivileges(javax.portlet.PortletRequest request,
Container container)
|
static boolean |
hasViewPrivileges(javax.portlet.PortletRequest request,
Container container)
|
static boolean |
isLiferay(Container container)
|
static void |
writeJSONArrayResponse(org.json.JSONArray jsonArr,
javax.portlet.ResourceResponse response)
Convenience method for outputting a JSONArray to a resource response. |
static void |
writeJSONResponse(org.json.JSONObject jsonObj,
javax.portlet.RenderResponse response)
|
static void |
writeJSONResponse(org.json.JSONObject jsonObj,
javax.portlet.RenderResponse response,
java.lang.String callback)
Convenience method for outputting a JSONObject to a render response, with the name of a JavaScript callback function to be appended to the JSON response. |
static void |
writeJSONResponse(org.json.JSONObject jsonObj,
javax.portlet.ResourceResponse response)
Convenience method for outputting a JSONObject to a resource response. |
static void |
writeJSONResponse(org.json.JSONObject jsonObj,
javax.portlet.ResourceResponse response,
java.lang.String callback)
Convenience method for outputting a JSONObject to a resource response, with the name of a JavaScript callback function to be appended to the JSON response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EndecaPortletUtil()
Method Detail |
---|
public static boolean hasPrivilege(javax.portlet.PortletRequest request, Container container, java.lang.String privilege)
public static boolean hasUpdatePrivileges(javax.portlet.PortletRequest request, Container container)
public static boolean hasViewPrivileges(javax.portlet.PortletRequest request, Container container)
public static boolean isLiferay(Container container)
public static java.lang.String getDataSourceId(javax.portlet.PortletRequest request)
request
- the current request
public static java.lang.String getDisplayName(javax.portlet.PortletRequest request, java.lang.String key)
request
- the current requestkey
- the attribute for which to fetch a display name
public static java.lang.String getDisplayName(java.lang.String dataSourceId, java.lang.String key)
dataSourceId
- the current datasourcekey
- the attribute for which to fetch a display name
public static java.lang.String getDefaultLocale(Container container)
container
- the current container
public static java.lang.String getRequestLocale(javax.portlet.PortletRequest request, Container container)
request
- the requestcontainer
- the current container
public static java.lang.String getDefaultDataSourceId()
public static java.lang.String getFullyQualifiedTransitionContext(javax.portlet.PortletRequest request, java.lang.String viewTransitionPageContext)
Constants.VIEW_TRANSITION_DEFAULT_CONTEXT
.
public static void writeJSONResponse(org.json.JSONObject jsonObj, javax.portlet.RenderResponse response) throws java.io.IOException
java.io.IOException
public static void writeJSONResponse(org.json.JSONObject jsonObj, javax.portlet.RenderResponse response, java.lang.String callback) throws java.io.IOException
jsonObj
- the JSON Objectresponse
- the render responsecallback
- the name of the JavaScript callback function
java.io.IOException
public static void writeJSONResponse(org.json.JSONObject jsonObj, javax.portlet.ResourceResponse response) throws java.io.IOException
jsonObj
- the JSON Objectresponse
- the resource response
java.io.IOException
public static void writeJSONResponse(org.json.JSONObject jsonObj, javax.portlet.ResourceResponse response, java.lang.String callback) throws java.io.IOException
jsonObj
- the JSON Objectresponse
- the resource responsecallback
- the name of the JavaScript callback function
java.io.IOException
public static void writeJSONArrayResponse(org.json.JSONArray jsonArr, javax.portlet.ResourceResponse response) throws java.io.IOException
jsonArr
- the JSON Arrayresponse
- the resource response
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |