Class PortletService
java.lang.Object
fr.paris.lutece.portal.service.portlet.PortletService
class PortletService
-
Method Summary
Modifier and TypeMethodDescriptiongetAuthorizedPortletCollection(Collection<Portlet> collectionPortlet, AdminUser user) Filter a collection of portlet associated to a given userstatic PortletServiceDeprecated, for removal: This API element is subject to removal in a future version.booleanisAuthorized(int idPortlet, AdminUser user) Check if a portlet should be visible to the userbooleanisAuthorized(Portlet portlet, AdminUser user) Check if a portlet should be visible to the user
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain thePortletServiceinstance. This method will be removed in future versions.Returns the unique instance of thePortletServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain thePortletServiceinstance instead.- Returns:
- The unique instance of
PortletService.
-
getAuthorizedPortletCollection
public Collection<Portlet> getAuthorizedPortletCollection(Collection<Portlet> collectionPortlet, AdminUser user) Filter a collection of portlet associated to a given user- Parameters:
collectionPortlet- the The collection to filteruser- the current user- Returns:
- a collection of portlet associated to a given user
-
isAuthorized
Check if a portlet should be visible to the user- Parameters:
idPortlet- the id of the portletuser- the current user- Returns:
- true if authorized, otherwise false
-
isAuthorized
Check if a portlet should be visible to the user- Parameters:
portlet- the portletuser- the current user- Returns:
- true if authorized, otherwise false
-
@Injectto obtain thePortletServiceinstance.