Class PageLayoutService

java.lang.Object
io.meeds.layout.service.PageLayoutService

@Service public class PageLayoutService extends Object
  • Field Details

    • PAGE_UPDATED_EVENT

      public static final String PAGE_UPDATED_EVENT
      Broadcast after a page's layout has been persisted (content added/removed/reordered).
      See Also:
    • PAGE_PERMISSIONS_UPDATED_EVENT

      public static final String PAGE_PERMISSIONS_UPDATED_EVENT
      Broadcast after a page's access/edit permissions have been persisted.
      See Also:
  • Constructor Details

    • PageLayoutService

      public PageLayoutService()
  • Method Details

    • getPages

      public List<org.exoplatform.portal.mop.page.PageContext> getPages(String siteTypeName, String siteName, String pageDisplayName, int offset, int limit, String username)
    • getPage

      public org.exoplatform.portal.mop.page.PageContext getPage(org.exoplatform.portal.mop.page.PageKey pageKey, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getPageApplicationLayout

      public org.exoplatform.portal.config.model.Application getPageApplicationLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • impersonateSite

      public void impersonateSite(org.exoplatform.portal.mop.SiteKey siteKey)
    • impersonatePage

      public void impersonatePage(org.exoplatform.portal.mop.page.PageKey pageKey)
    • getPageLayout

      public org.exoplatform.portal.config.model.ModelObject getPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getPageLayout

      public org.exoplatform.portal.config.model.ModelObject getPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long siteId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getPageLayout

      public org.exoplatform.portal.config.model.ModelObject getPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long siteId, boolean impersonate, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getPageLayout

      public org.exoplatform.portal.config.model.Page getPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey)
    • createPage

      public org.exoplatform.portal.mop.page.PageContext createPage(PageCreateModel pageModel, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException, IllegalArgumentException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
      IllegalArgumentException
    • clonePage

      public org.exoplatform.portal.mop.page.PageKey clonePage(org.exoplatform.portal.mop.page.PageKey pageKey, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • cloneSection

      public void cloneSection(org.exoplatform.portal.mop.page.PageKey pageKey, long containerId, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updatePageApplicationPreferences

      public void updatePageApplicationPreferences(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, List<PortletInstancePreference> preferences, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updatePageApplicationPreferences

      public void updatePageApplicationPreferences(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, List<PortletInstancePreference> preferences, String username, boolean keepExisting) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updatePageLayout

      public org.exoplatform.portal.mop.page.PageContext updatePageLayout(String pageRef, org.exoplatform.portal.config.model.Page page, boolean publish, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • restorePageLayout

      public org.exoplatform.portal.mop.page.PageContext restorePageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Restores a single page's layout to its shipped default, preserving the page's current access and edit permissions (only the layout is reset, not who can see/edit the page).
      Parameters:
      pageKey - the key of the page to restore
      username - the user requesting the restore
      Returns:
      the restored PageContext
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the page doesn't exist
      IllegalAccessException - when the user can't edit the page's layout
      IllegalStateException - when the page isn't part of any default/product configuration
    • updatePageLink

      public void updatePageLink(org.exoplatform.portal.mop.page.PageKey pageKey, String link, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException, IllegalStateException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
      IllegalStateException
    • updatePagePermissions

      public void updatePagePermissions(org.exoplatform.portal.mop.page.PageKey pageKey, PermissionUpdateModel permissionUpdateModel, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • impersonateModel

      public void impersonateModel(org.exoplatform.portal.config.model.ModelObject object)