Package io.meeds.layout.service
Class PageLayoutService
java.lang.Object
io.meeds.layout.service.PageLayoutService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.portal.mop.page.PageKeyvoidcloneSection(org.exoplatform.portal.mop.page.PageKey pageKey, long containerId, String username) org.exoplatform.portal.mop.page.PageContextcreatePage(PageCreateModel pageModel, String username) org.exoplatform.portal.mop.page.PageContextorg.exoplatform.portal.config.model.ApplicationgetPageApplicationLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, String username) org.exoplatform.portal.config.model.PagegetPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey) org.exoplatform.portal.config.model.ModelObjectgetPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long siteId, boolean impersonate, String username) org.exoplatform.portal.config.model.ModelObjectgetPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, long siteId, String username) org.exoplatform.portal.config.model.ModelObjectgetPageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, String username) List<org.exoplatform.portal.mop.page.PageContext> getPages(String siteTypeName, String siteName, String pageDisplayName, int offset, int limit, String username) voidimpersonateModel(org.exoplatform.portal.config.model.ModelObject object) voidimpersonatePage(org.exoplatform.portal.mop.page.PageKey pageKey) voidimpersonateSite(org.exoplatform.portal.mop.SiteKey siteKey) org.exoplatform.portal.mop.page.PageContextrestorePageLayout(org.exoplatform.portal.mop.page.PageKey pageKey, String username) 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).voidupdatePageApplicationPreferences(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, List<PortletInstancePreference> preferences, String username) voidupdatePageApplicationPreferences(org.exoplatform.portal.mop.page.PageKey pageKey, long applicationId, List<PortletInstancePreference> preferences, String username, boolean keepExisting) org.exoplatform.portal.mop.page.PageContextupdatePageLayout(String pageRef, org.exoplatform.portal.config.model.Page page, boolean publish, String username) voidupdatePageLink(org.exoplatform.portal.mop.page.PageKey pageKey, String link, String username) voidupdatePagePermissions(org.exoplatform.portal.mop.page.PageKey pageKey, PermissionUpdateModel permissionUpdateModel, String username)
-
Field Details
-
PAGE_UPDATED_EVENT
Broadcast after a page's layout has been persisted (content added/removed/reordered).- See Also:
-
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
-
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.ObjectNotFoundExceptionIllegalAccessException
-
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.ObjectNotFoundExceptionIllegalAccessException
-
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.ObjectNotFoundExceptionIllegalAccessException
-
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.ObjectNotFoundExceptionIllegalAccessException
-
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.ObjectNotFoundExceptionIllegalAccessException
-
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.ObjectNotFoundExceptionIllegalAccessExceptionIllegalArgumentException
-
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:
IllegalAccessExceptionorg.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:
IllegalAccessExceptionorg.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:
IllegalAccessExceptionorg.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:
IllegalAccessExceptionorg.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:
IllegalAccessExceptionorg.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 restoreusername- the user requesting the restore- Returns:
- the restored
PageContext - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the page doesn't existIllegalAccessException- when the user can't edit the page's layoutIllegalStateException- 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.ObjectNotFoundExceptionIllegalAccessExceptionIllegalStateException
-
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.ObjectNotFoundExceptionIllegalAccessException
-
impersonateModel
public void impersonateModel(org.exoplatform.portal.config.model.ModelObject object)
-