Class PortletService


  • public final class PortletService
    extends java.lang.Object
    class PortletService
    • Method Detail

      • getInstance

        public static PortletService getInstance()
        Get the unique instance of the service
        Returns:
        The unique instance
      • getAuthorizedPortletCollection

        public java.util.Collection<Portlet> getAuthorizedPortletCollection​(java.util.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