Interface PortalPageManager

All Superinterfaces:
SharedEntityAccessor<PortalPage>
All Known Implementing Classes:
DefaultPortalPageManager

public interface PortalPageManager extends SharedEntityAccessor<PortalPage>
This is the manager for the PortalPageService
Since:
v3.13
  • Method Details

    • getPortalPage

      PortalPage getPortalPage(ApplicationUser user, Long portalPageId)
      Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.
      Parameters:
      user - the User in play
      portalPageId - the id of the PortalPage to return
      Returns:
      a PortalPage if the user is allowed to see it or null if they are not allowed
    • getAllOwnedPortalPages

      Collection<PortalPage> getAllOwnedPortalPages(ApplicationUser owner)
      Returns a Collection of PortalPage objects that are owned by the specified User
      Parameters:
      owner - the User who owns the PortalPage's
      Returns:
      a Collection of PortalPage objects that are owned by the specified User
    • getAll

      Get all PortalPages.
      Specified by:
      getAll in interface SharedEntityAccessor<PortalPage>
      Returns:
      an EnclosedIterable of PortalPages
    • getPortalPageById

      PortalPage getPortalPageById(Long portalPageId)
      Gets a PortalPage by id regardless of owner
      Parameters:
      portalPageId - the id of the PortalPage to retrieve
      Returns:
      a PortalPage object or null if it cant be found
    • getPortalPageByName

      PortalPage getPortalPageByName(ApplicationUser owner, String pageName)
      Returns a PortalPage by searching for it by owner and pageName.
      Parameters:
      owner - the owner in play
      pageName - the name of the PortalPage
      Returns:
      a PortalPage object if one can be found with the name and owner or null if not
    • getSystemDefaultPortalPage

      PortalPage getSystemDefaultPortalPage()
      Returns the system default PortalPage. This has no owner and is used when a User has no PortalPage objects defined for them
      Returns:
      a non null system default PortalPage object
    • create

      PortalPage create(PortalPage portalPage)
      Creates the specified PortalPage in the database
      Parameters:
      portalPage - the PortalPage to create
      Returns:
      the newly created PortalPage with its new id
    • createBasedOnClone

      PortalPage createBasedOnClone(ApplicationUser pageOwner, PortalPage portalPage, PortalPage clonePortalPage)
      Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPage
      Parameters:
      pageOwner - the User who will own the cloned portal page
      portalPage - the PortalPage to create
      clonePortalPage - the PortalPage to clone Portlet content from
      Returns:
      the newly created PortalPage with its new id
    • update

      PortalPage update(PortalPage portalPage)
      Updates the specified PortalPage in the database
      Parameters:
      portalPage - the PortalPage to update
      Returns:
      the newly updated PortalPage
    • delete

      void delete(Long portalPageId)
      Deletes the PortalPage with the specified portalPageId
      Parameters:
      portalPageId - the id of the PortalPage to delete
    • saveLegacyPortletConfiguration

      void saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
      This can be called to save a PortletConfiguration object inside a PortalPage object to the underlying database store.
      Parameters:
      portletConfiguration - The portletConfiguration to save.
    • search

      SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth)
      Search for the PortalPages that match the passed SearchParameters. The result can be paged so that a subset of the results can be returned.
      Specified by:
      search in interface SharedEntityAccessor<PortalPage>
      Parameters:
      searchParameters - the SearchParameters to query.
      user - the user performing the search.
      pagePosition - the page to return.
      pageWidth - the number of results per page.
      Returns:
      the result containing the PortalPages objects that match the request.
    • getPortletConfigurations

      List<List<PortletConfiguration>> getPortletConfigurations(Long portalPageId)
      Returns a sorted immutable list of lists of portletconfigurations for a particular portal page. The outer list represents columns and the inner lists represent rows within a column. This method will return portlet configs sorted correctly as returned by the underlying persistance layer.
      Parameters:
      portalPageId - The portal page id to fetch portlet configs for
      Returns:
      immutable list of lists representing portletconfigs on a dashboard
    • hasShareRights

      @ExperimentalApi boolean hasShareRights(@Nullable ApplicationUser user, @Nonnull PortalPage portalPage, @Nonnull ShareRight shareRight)
      Checks if provided user has share rights for given portal page.
      Parameters:
      user - user which wants for example view or edit the portal page
      portalPage - portal page which permissions and ownership are going to be checked
      shareRight - share right which will be checked if user has it
      Returns:
      true in case provided user has specified rights for the portal page, false otherwise
      Since:
      v7.12