public Page getPageFrom(org.exoplatform.portal.config.model.Page portalPage) { POMSession session = pomManager.getSession(); Site site = session .getWorkspace() .getSite(Mapper.parseSiteType(portalPage.getOwnerType()), portalPage.getOwnerId()); return getPagesFrom(site).getChild(portalPage.getName()); }
public Page getPageFrom(PageKey pageKey) { POMSession session = pomManager.getSession(); final SiteKey siteKey = pageKey.getSite(); final SiteType siteType = siteKey.getType(); final String siteName = siteKey.getName(); Site site = session.getWorkspace().getSite(Mapper.parseSiteType(siteType.getName()), siteName); return getPagesFrom(site).getChild(pageKey.getName()); }
public void saveChangesTo(UIWindow window) { POMSession session = pomManager.getSession(); // mark page for cache invalidation otherwise DataCache will use the previous customization id // when trying to set // the portlet state in UIPortlet.setState and will not find it resulting in an error Page page = window.getPage(); session.scheduleForEviction( new org.exoplatform.portal.pom.data.PageKey( "portal", page.getSite().getName(), page.getName())); // save session.save(); }
public Collection<Page> getPages() { POMSession session = pomManager.getSession(); Workspace workspace = session.getWorkspace(); Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE); List<Page> pages = new ArrayList<Page>(sites.size() * 10); for (Site site : sites) { Page pagesRoot = getPagesFrom(site); if (pagesRoot != null) { Collection<Page> children = pagesRoot.getChildren(); for (Page child : children) { pages.add(child); } } } return pages; }
public UIWindow getWindowFrom(String uuid) { POMSession session = pomManager.getSession(); return session.findObjectById(ObjectType.WINDOW, uuid); }