Class PortletService

java.lang.Object
fr.paris.lutece.portal.service.portlet.PortletService

@ApplicationScoped public class PortletService extends Object
class PortletService
  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static PortletService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the PortletService instance. This method will be removed in future versions.
      Returns the unique instance of the PortletService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the PortletService instance 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 filter
      user - the current user
      Returns:
      a collection of portlet associated to a given user
    • isAuthorized

      public boolean isAuthorized(int idPortlet, AdminUser user)
      Check if a portlet should be visible to the user
      Parameters:
      idPortlet - the id of the portlet
      user - the current user
      Returns:
      true if authorized, otherwise false
    • isAuthorized

      public boolean isAuthorized(Portlet portlet, AdminUser user)
      Check if a portlet should be visible to the user
      Parameters:
      portlet - the portlet
      user - the current user
      Returns:
      true if authorized, otherwise false