Class PortletService

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

public final class PortletService extends Object
class PortletService
  • Method Details

    • getInstance

      public static PortletService getInstance()
      Get the unique instance of the service
      Returns:
      The unique instance
    • 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