|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.context.FacesContext
org.edorasframework.extfaces.context.ExtFacesContext
org.edorasframework.portletfaces.context.PortletFacesContext
public abstract class PortletFacesContext
This class provides a variety of useful utility methods for use by JSF portlets.
| Field Summary |
|---|
| Fields inherited from class org.edorasframework.extfaces.context.ExtFacesContext |
|---|
JAVAX_FACES_UPLOADED_FILES_MAP |
| Constructor Summary | |
|---|---|
PortletFacesContext()
|
|
| Method Summary | |
|---|---|
abstract void |
addGlobalSuccessInfoMessage()
Adds a global information message to the current FacesContext with the standard Liferay "your-request-processed-successfully" key as the messageId. |
abstract void |
addGlobalUnexpectedErrorMessage()
Adds a global error message to the current FacesContext with the standard Liferay "an-unexpected-error-occurred" key as the messageId. |
abstract void |
checkUserPortletPermission(String actionId)
Checks to see if the current user has permission to execute the specified actionId (which, in turn, is assumed to be an action defined for the current portlet). |
abstract javax.portlet.PortletURL |
createActionURL()
Retrieves a render URL for the current facesContext. |
abstract javax.portlet.PortletURL |
createPopupUrl(String viewId)
Creates a URL capable of displaying a specified view Id in "Popup" mode. |
abstract javax.portlet.PortletURL |
createRenderURL()
Retrieves a render URL for the current facesContext. |
abstract javax.portlet.ActionResponse |
getActionResponse()
Retrieves the javax.portlet.ActionResponse object associated with the current JSF FacesContext. |
abstract long |
getCompanyId()
Returns the company Id associated with the community that is hosting the portlet associated with the current JSF FacesContext. |
abstract String |
getDocumentLibraryURL()
Returns an absolute URL to the Liferay document library, which is the main part of different struts action paths. |
abstract org.edorasframework.extfaces.context.ExtFacesContext |
getExtFacesContext()
|
abstract javax.faces.context.FacesContext |
getFacesContext()
Returns the current facesContext. |
abstract com.liferay.portal.model.User |
getGroupUser()
Returns the user associated with the group (Liferay community) associated with the layout (portal page) that the portlet resides on. |
abstract long |
getHostGroupId()
Returns the "group Id" associated with the community that is hosting the portlet associated with the current JSF FacesContext. |
abstract String |
getImageGalleryURL()
Returns an absolute URL to the Liferay image gallery, which is the main part of different struts action paths. |
static PortletFacesContext |
getInstance()
Returns the implementation singleton instance. |
abstract com.liferay.portal.model.Layout |
getLayout()
Returns the layout being displayed in the current context. |
abstract org.edorasframework.liferayadapter.ServiceMap |
getLiferayServiceMap()
Returns a Map of Liferay Services. |
abstract String |
getMessage(long companyId,
Locale locale,
String messageId)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the specified Liferay companyId and specified locale. |
abstract String |
getMessage(long companyId,
Locale locale,
String messageId,
Object... arguments)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the specified Liferay companyId, and specified locale and arguments that are to be substituted. |
abstract org.edorasframework.liferayadapter.PermissionCheckerWrapper |
getPermissionChecker()
Returns the Liferay PermissionChecker associated with the request. |
abstract long |
getPlid()
Returns the "Plid" (the "portal layout id"), which is the identifier of the specific "page" the portlet exists on. |
abstract javax.portlet.PortalContext |
getPortalContext()
Retrieves the javax.portlet.PortalContext object associated with the current JSF FacesContext. |
abstract String |
getPortalURL()
Returns an absolute URL which is the context-path of the portal webapp. |
abstract com.liferay.portal.model.Portlet |
getPortlet()
Returns the com.liferay.portal.model.Portlet object for the portlet associated with the current
request. |
abstract javax.portlet.PortletConfig |
getPortletConfig()
Retrieves the javax.portlet.PortletConfig object associated with the current JSF FacesContext. |
abstract javax.portlet.PortletContext |
getPortletContext()
Retrieves the javax.portlet.PortletContext object associated with the current JSF FacesContext. |
abstract String |
getPortletContextName()
Retrieves the name of the portlet associated with the current JSF FacesContext (usually, its the name of the portlet .war) |
abstract String |
getPortletInstanceId()
Returns the "portlet instance Id" of the currently running portlet. |
abstract String |
getPortletName()
Retrieves the name of the portlet associated with the current JSF FacesContext (as defined in portlet.xml's <portlet-name> tag). |
abstract String |
getPortletNamespace()
Returns a namespace prefix to be used for the portlet associated with the current JSF FacesContext instance. |
abstract Object |
getPortletPreference(String preferenceName,
Object defaultValue)
Returns String representation of the value of the portlet preference associated with the specified name in from the javax.portlet.PortletPreferences object associated with the current JSF FacesContext. |
abstract boolean |
getPortletPreferenceAsBool(String preferenceName,
boolean defaultValue)
Returns boolean representation of the value of the portlet preference associated with the specified name in from the PortletPreferenceMap object associated with the current JSF FacesContext. |
abstract int |
getPortletPreferenceAsInt(String preferenceName,
int defaultValue)
Returns integer representation of the value of the portlet preference associated with the specified name in from the PortletPreferenceMap object associated with the current JSF FacesContext. |
abstract short |
getPortletPreferenceAsShort(String preferenceName,
short defaultValue)
Returns short representation of the value of the portlet preference associated with the specified name in from the PortletPreferenceMap object associated with the current JSF FacesContext. |
abstract String |
getPortletPreferenceAsString(String preferenceName,
String defaultValue)
Returns short representation of the value of the portlet preference associated with the specified name in from the PortletPreferenceMap object associated with the current JSF FacesContext. |
abstract PortletPreferenceMap |
getPortletPreferenceMap()
Returns the PortletPreferenceMap associated with the current JSF FacesContext. |
abstract javax.portlet.PortletPreferences |
getPortletPreferences()
Retrieves the javax.portlet.PortletPreferences object associated with the current JSF FacesContext. |
abstract javax.portlet.RenderRequest |
getPortletRenderRequest()
Retrieves the javax.portlet.RenderRequest object associated with the current JSF FacesContext. |
abstract javax.portlet.RenderResponse |
getPortletRenderResponse()
Retrieves the javax.portlet.RenderResponse object associated with the current JSF FacesContext. |
abstract javax.portlet.PortletRequest |
getPortletRequest()
Retrieves the javax.portlet.PortletRequest object associated with the current JSF FacesContext. |
abstract javax.portlet.PortletResponse |
getPortletResponse()
Retrieves the javax.portlet.PortletResponse object associated with the current JSF FacesContext. |
abstract String |
getPortletRootId()
Returns the "portlet root Id" of the currently running portlet. |
abstract javax.portlet.PortletSession |
getPortletSession()
Retrieves the javax.portlet.PortletSession object associated with the current JSF FacesContext. |
abstract String |
getRemoteUser()
Returns the user name/id of the user associated with the current JSF FacesContext |
abstract org.edorasframework.liferayadapter.ServiceContext |
getServiceContext(String className)
Returns an instance of a ServiceContext associated with the specified className. |
abstract Object |
getSessionSharedAttribute(String name)
Returns the value of the session attribute associated with the specified name from PortletSession.APPLICATION_SCOPE |
abstract com.liferay.portal.model.Theme |
getTheme()
Returns the theme being displayed in the current context. |
abstract org.edorasframework.liferayadapter.ThemeDisplayClone |
getThemeDisplay()
Returns the com.liferay.portal.theme.ThemeDisplay object, which contains a variety methods for
rendering theme specific look and feels. |
abstract String |
getThemeImagesURL()
Returns an absolute URL which is the path to the images of the theme associated with the current Layout. |
abstract com.liferay.portal.model.User |
getUser()
Returns the user record of the user associated with the current JSF FacesContext. |
abstract long |
getUserId()
Returns the user Id of the user associated with the current JSF FacesContext |
abstract List<com.liferay.portal.model.Role> |
getUserRoles()
Returns a list of all of the roles played by the user associated with the current JSF FacesContext. |
abstract javax.portlet.WindowState |
getWindowState()
Returns the window state of the portlet associated with the current JSF FacesContext |
abstract boolean |
isUserInRole(String roleName)
Returns TRUE if the current user is associated with the specified role. |
abstract boolean |
isWindowMaximized()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED |
abstract boolean |
isWindowNormal()
Returns TRUE if the Window state of the current portlet is set to MAXIMIZED |
abstract void |
postLifecycleCleanup()
Performs cleanup operations that are intended to be performed after the JSF lifecycle executes. |
static void |
setInstance(PortletFacesContext portletFacesContext)
Sets the implementation singleton instance. |
abstract void |
setPortletMode(javax.portlet.PortletMode portletMode)
Sets the portlet mode of the portlet associated with the current JSF FacesContext to the specified portlet mode. |
abstract void |
setSessionSharedAttribute(String name,
Object value)
Sets the value of the a session attribute using the specified name and value within PortletSession.APPLICATION_SCOPE |
abstract void |
setWindowState(javax.portlet.WindowState windowState)
Sets the window state of the portlet associated with the current JSF FacesContext to the specified window state. |
abstract void |
setWindowStateToMaximized()
A short-cut method for calling setWindowState(WindowState.MAXIMIZED) |
abstract void |
setWindowStateToNormal()
A short-cut method for calling setWindowState(WindowState.NORMAL) |
abstract boolean |
userHasPortletPermission(String actionId)
Returns TRUE if the current user has permission to execute the specified actionId (which, in turn, is assumed to be an action defined for the current portlet). |
abstract boolean |
userHasRole(String roleName)
Returns TRUE if the current user has the specified role name. |
| Methods inherited from class org.edorasframework.extfaces.context.ExtFacesContext |
|---|
addComponentErrorMessage, addComponentErrorMessage, addComponentErrorMessage, addComponentInfoMessage, addComponentInfoMessage, addComponentInfoMessage, addGlobalErrorMessage, addGlobalErrorMessage, addGlobalErrorMessage, addGlobalInfoMessage, addGlobalInfoMessage, addGlobalInfoMessage, addMessage, addMessage, addMessage, getLocale, getMessage, getMessage, getMessage, getMessage, getParentForm, getRequestAttribute, getRequestContextPath, getRequestParameter, getRequestParameterAsBool, getRequestParameterAsInt, getRequestParameterAsLong, getRequestParameterFromMap, getRequestQueryString, getRequestQueryStringParameter, getSession, getSessionAttribute, getUploadedFilesMap, matchComponentInHierarchy, matchComponentInViewRoot, navigate, navigateTo, recreateComponentTree, registerPhaseListener, removeChildrenFromComponentTree, removeMessages, removeMessagesForImmediateComponents, removeMessagesForImmediateComponents, removeParentFormFromComponentTree, resetView, resetView, resolveExpression, setInstance, setRequestAttribute, setSessionAttribute |
| Methods inherited from class javax.faces.context.FacesContext |
|---|
addMessage, getApplication, getClientIdsWithMessages, getCurrentInstance, getELContext, getExternalContext, getMaximumSeverity, getMessages, getMessages, getRenderKit, getRenderResponse, getResponseComplete, getResponseStream, getResponseWriter, getViewRoot, release, renderResponse, responseComplete, setCurrentInstance, setResponseStream, setResponseWriter, setViewRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortletFacesContext()
| Method Detail |
|---|
public abstract void addGlobalUnexpectedErrorMessage()
public abstract void addGlobalSuccessInfoMessage()
public abstract javax.portlet.PortletURL createActionURL()
public abstract javax.portlet.PortletURL createRenderURL()
public abstract javax.portlet.ActionResponse getActionResponse()
javax.portlet.ActionResponse object associated with the current JSF FacesContext.
public abstract org.edorasframework.extfaces.context.ExtFacesContext getExtFacesContext()
public abstract javax.faces.context.FacesContext getFacesContext()
getFacesContext in class org.edorasframework.extfaces.context.ExtFacesContext
public abstract String getMessage(long companyId,
Locale locale,
String messageId)
public abstract String getMessage(long companyId,
Locale locale,
String messageId,
Object... arguments)
public abstract javax.portlet.PortalContext getPortalContext()
javax.portlet.PortalContext object associated with the current JSF FacesContext.
public abstract javax.portlet.PortletConfig getPortletConfig()
javax.portlet.PortletConfig object associated with the current JSF FacesContext.
public abstract javax.portlet.PortletContext getPortletContext()
javax.portlet.PortletContext object associated with the current JSF FacesContext.
public abstract String getPortletContextName()
public abstract void setPortletMode(javax.portlet.PortletMode portletMode)
public abstract String getPortletName()
public abstract String getPortletNamespace()
public abstract Object getPortletPreference(String preferenceName,
Object defaultValue)
javax.portlet.PortletPreferences object associated with the current JSF FacesContext.
public abstract boolean getPortletPreferenceAsBool(String preferenceName,
boolean defaultValue)
public abstract int getPortletPreferenceAsInt(String preferenceName,
int defaultValue)
public abstract short getPortletPreferenceAsShort(String preferenceName,
short defaultValue)
public abstract String getPortletPreferenceAsString(String preferenceName,
String defaultValue)
public abstract PortletPreferenceMap getPortletPreferenceMap()
public abstract javax.portlet.PortletPreferences getPortletPreferences()
javax.portlet.PortletPreferences object associated with the current JSF FacesContext.
public abstract javax.portlet.RenderRequest getPortletRenderRequest()
javax.portlet.RenderRequest object associated with the current JSF FacesContext.
public abstract javax.portlet.RenderResponse getPortletRenderResponse()
javax.portlet.RenderResponse object associated with the current JSF FacesContext.
public abstract javax.portlet.PortletRequest getPortletRequest()
javax.portlet.PortletRequest object associated with the current JSF FacesContext.
public abstract javax.portlet.PortletResponse getPortletResponse()
javax.portlet.PortletResponse object associated with the current JSF FacesContext.
public abstract javax.portlet.PortletSession getPortletSession()
javax.portlet.PortletSession object associated with the current JSF FacesContext.
public abstract String getRemoteUser()
public abstract Object getSessionSharedAttribute(String name)
public abstract void setSessionSharedAttribute(String name,
Object value)
public abstract boolean isUserInRole(String roleName)
public abstract boolean isWindowMaximized()
public abstract boolean isWindowNormal()
public abstract javax.portlet.WindowState getWindowState()
public abstract void setWindowState(javax.portlet.WindowState windowState)
public abstract void setWindowStateToMaximized()
public abstract void setWindowStateToNormal()
public abstract void checkUserPortletPermission(String actionId)
throws AuthorizationException
actionId -
AuthorizationExceptionuserHasPortletPermission(String)public abstract javax.portlet.PortletURL createPopupUrl(String viewId)
public abstract boolean userHasPortletPermission(String actionId)
actionId - checkUserPortletPermission(String)public abstract boolean userHasRole(String roleName)
public abstract void postLifecycleCleanup()
public abstract long getCompanyId()
public abstract String getDocumentLibraryURL()
public abstract com.liferay.portal.model.User getGroupUser()
public abstract long getHostGroupId()
public abstract String getImageGalleryURL()
public abstract com.liferay.portal.model.Layout getLayout()
public abstract org.edorasframework.liferayadapter.ServiceMap getLiferayServiceMap()
public abstract org.edorasframework.liferayadapter.PermissionCheckerWrapper getPermissionChecker()
public abstract long getPlid()
public abstract String getPortalURL()
public abstract com.liferay.portal.model.Portlet getPortlet()
com.liferay.portal.model.Portlet object for the portlet associated with the current
request.
public abstract String getPortletInstanceId()
getPortletName()public abstract String getPortletRootId()
getPortletName()public abstract com.liferay.portal.model.Theme getTheme()
public abstract org.edorasframework.liferayadapter.ThemeDisplayClone getThemeDisplay()
com.liferay.portal.theme.ThemeDisplay object, which contains a variety methods for
rendering theme specific look and feels.
public abstract String getThemeImagesURL()
public abstract com.liferay.portal.model.User getUser()
public abstract long getUserId()
public abstract org.edorasframework.liferayadapter.ServiceContext getServiceContext(String className)
public abstract List<com.liferay.portal.model.Role> getUserRoles()
public static PortletFacesContext getInstance()
public static void setInstance(PortletFacesContext portletFacesContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||