public abstract class LiferayPortletHelperWrapper extends Object implements LiferayPortletHelper, javax.faces.FacesWrapper<LiferayPortletHelper>
Constructor and Description |
---|
LiferayPortletHelperWrapper() |
Modifier and Type | Method and Description |
---|---|
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).
|
long |
getCompanyId()
Returns the company Id associated with the community that is hosting the portlet associated with the current JSF
FacesContext.
|
String |
getDocumentLibraryURL()
Returns an absolute URL to the Liferay document library, which is the main part of different struts action paths.
|
long |
getHostGroupId()
Returns the "group Id" associated with the community that is hosting the portlet associated with the current JSF
FacesContext.
|
String |
getImageGalleryURL()
Returns an absolute URL to the Liferay image gallery, which is the main part of different struts action paths.
|
com.liferay.portal.kernel.model.Layout |
getLayout()
Returns the layout being displayed in the current context.
|
com.liferay.portal.kernel.security.permission.PermissionChecker |
getPermissionChecker()
Returns the Liferay PermissionChecker associated with the request.
|
long |
getPlid()
Returns the "Plid" (the "portal layout id"), which is the identifier of the specific "page" the portlet exists
on.
|
String |
getPortalURL()
Returns an absolute URL which is the context-path of the portal webapp.
|
com.liferay.portal.kernel.model.Portlet |
getPortlet()
Returns the
com.liferay.portal.model.Portlet object for the portlet associated with the current
request. |
String |
getPortletInstanceId()
Returns the "portlet instance Id" of the currently running portlet.
|
String |
getPortletRootId()
Returns the "portlet root Id" of the currently running portlet.
|
com.liferay.portal.kernel.model.Group |
getScopeGroup()
Returns the group (Liferay community) associated with the layout (portal page) that the portlet resides on.
|
long |
getScopeGroupId()
Returns the unique id of the group (Liferay community) associated with the layout (portal page) that the portlet
resides on.
|
com.liferay.portal.kernel.model.User |
getScopeGroupUser()
Returns the user associated with the group (Liferay community) associated with the layout (portal page) that the
portlet resides on.
|
com.liferay.portal.kernel.service.ServiceContext |
getServiceContext()
Returns an instance of a ServiceContext associated with the specified className.
|
com.liferay.portal.kernel.model.Theme |
getTheme()
Returns the theme being displayed in the current context.
|
com.liferay.portal.kernel.theme.ThemeDisplay |
getThemeDisplay()
Returns the
com.liferay.portal.kernel.theme.ThemeDisplay object, which contains a variety methods
for rendering theme specific look and feels. |
String |
getThemeImagesURL()
Returns an absolute URL which is the path to the images of the theme associated with the current Layout.
|
com.liferay.portal.kernel.model.User |
getUser()
Returns the user record of the user associated with the current JSF FacesContext.
|
long |
getUserId()
Returns the user Id of the user associated with the current JSF FacesContext
|
List<com.liferay.portal.kernel.model.Role> |
getUserRoles()
Returns a list of all of the roles played by the user associated with the current JSF FacesContext.
|
abstract LiferayPortletHelper |
getWrapped() |
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). |
boolean |
userHasRole(String roleName)
Returns
true if the current user has the specified role name. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBuildNumber
public abstract LiferayPortletHelper getWrapped()
getWrapped
in interface javax.faces.FacesWrapper<LiferayPortletHelper>
public void checkUserPortletPermission(String actionId) throws AuthorizationException
LiferayPortletHelper
checkUserPortletPermission
in interface LiferayPortletHelper
AuthorizationException
- If the user does not have the portlet permission associated with the specified
actionId.LiferayPortletHelper.userHasPortletPermission(String)
public long getCompanyId()
LiferayPortletHelper
getCompanyId
in interface LiferayPortletHelper
public String getDocumentLibraryURL()
LiferayPortletHelper
getDocumentLibraryURL
in interface LiferayPortletHelper
public long getHostGroupId()
LiferayPortletHelper
getHostGroupId
in interface LiferayPortletHelper
public String getImageGalleryURL()
LiferayPortletHelper
getImageGalleryURL
in interface LiferayPortletHelper
public com.liferay.portal.kernel.model.Layout getLayout()
LiferayPortletHelper
getLayout
in interface LiferayPortletHelper
public com.liferay.portal.kernel.security.permission.PermissionChecker getPermissionChecker()
LiferayPortletHelper
getPermissionChecker
in interface LiferayPortletHelper
public long getPlid()
LiferayPortletHelper
getPlid
in interface LiferayPortletHelper
public String getPortalURL()
LiferayPortletHelper
getPortalURL
in interface LiferayPortletHelper
public com.liferay.portal.kernel.model.Portlet getPortlet()
LiferayPortletHelper
com.liferay.portal.model.Portlet
object for the portlet associated with the current
request.getPortlet
in interface LiferayPortletHelper
public String getPortletInstanceId()
LiferayPortletHelper
getPortletInstanceId
in interface LiferayPortletHelper
PortletHelper.getPortletName()
public String getPortletRootId()
LiferayPortletHelper
getPortletRootId
in interface LiferayPortletHelper
PortletHelper.getPortletName()
public com.liferay.portal.kernel.model.Group getScopeGroup()
LiferayPortletHelper
getScopeGroup
in interface LiferayPortletHelper
public long getScopeGroupId()
LiferayPortletHelper
getScopeGroupId
in interface LiferayPortletHelper
public com.liferay.portal.kernel.model.User getScopeGroupUser()
LiferayPortletHelper
getScopeGroupUser
in interface LiferayPortletHelper
public com.liferay.portal.kernel.service.ServiceContext getServiceContext()
LiferayPortletHelper
getServiceContext
in interface LiferayPortletHelper
public com.liferay.portal.kernel.model.Theme getTheme()
LiferayPortletHelper
getTheme
in interface LiferayPortletHelper
public com.liferay.portal.kernel.theme.ThemeDisplay getThemeDisplay()
LiferayPortletHelper
com.liferay.portal.kernel.theme.ThemeDisplay
object, which contains a variety methods
for rendering theme specific look and feels.getThemeDisplay
in interface LiferayPortletHelper
public String getThemeImagesURL()
LiferayPortletHelper
getThemeImagesURL
in interface LiferayPortletHelper
public com.liferay.portal.kernel.model.User getUser()
LiferayPortletHelper
getUser
in interface LiferayPortletHelper
public long getUserId()
LiferayPortletHelper
getUserId
in interface LiferayPortletHelper
public List<com.liferay.portal.kernel.model.Role> getUserRoles() throws com.liferay.portal.kernel.exception.SystemException
LiferayPortletHelper
getUserRoles
in interface LiferayPortletHelper
com.liferay.portal.kernel.exception.SystemException
public boolean userHasPortletPermission(String actionId)
LiferayPortletHelper
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). Any errors that occur will be caught and re-thrown,
wrapped in a PortletRuntimeException.userHasPortletPermission
in interface LiferayPortletHelper
LiferayPortletHelper.checkUserPortletPermission(String)
public boolean userHasRole(String roleName)
LiferayPortletHelper
true
if the current user has the specified role name.userHasRole
in interface LiferayPortletHelper
Copyright © 2019 Liferay, Inc.. All rights reserved.