use of com.agiletec.aps.system.services.page.IPage in project entando-core by entando.
the class ProtectedResourceProvider method executeLoginRedirect.
protected void executeLoginRedirect(HttpServletRequest request, HttpServletResponse response) throws ServletException {
try {
StringBuilder targetUrl = new StringBuilder(request.getRequestURL());
Map<String, String> params = new HashMap<String, String>();
params.put("returnUrl", targetUrl.toString());
String loginPageCode = this.getConfigManager().getParam(SystemConstants.CONFIG_PARAM_LOGIN_PAGE_CODE);
IPage page = this.getPageManager().getOnlinePage(loginPageCode);
Lang defaultLang = this.getLangManager().getDefaultLang();
String url = this.getUrlManager().createURL(page, defaultLang, params);
response.sendRedirect(url);
} catch (Throwable t) {
_logger.error("Error executing redirect login page", t);
throw new ServletException("Error executing redirect login page", t);
}
}
use of com.agiletec.aps.system.services.page.IPage in project entando-core by entando.
the class CmsPageManagerWrapper method getContentUtilizers.
@Override
public List getContentUtilizers(String contentId) throws ApsSystemException {
List<IPage> pages = new ArrayList<IPage>();
try {
IPage root = this.getPageManager().getOnlineRoot();
this.searchContentUtilizers(root, pages, contentId);
} catch (Throwable t) {
_logger.error("Error loading referenced pages", t);
throw new ApsSystemException("Error loading referenced pages with content " + contentId, t);
}
return pages;
}
use of com.agiletec.aps.system.services.page.IPage in project entando-core by entando.
the class TestContentListHelper method valueRequestContext.
private RequestContext valueRequestContext(String pageCode, int frame) throws Throwable {
RequestContext reqCtx = this.getRequestContext();
try {
Widget widgetToAdd = this.getShowletForTest("content_viewer_list", null);
this.setPageWidgets(pageCode, frame, widgetToAdd);
IPage page = this._pageManager.getOnlinePage(pageCode);
reqCtx.addExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE, page);
Widget widget = page.getWidgets()[frame];
reqCtx.addExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET, widget);
reqCtx.addExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME, new Integer(frame));
} catch (Throwable t) {
this.setPageWidgets(pageCode, frame, null);
throw t;
}
return reqCtx;
}
use of com.agiletec.aps.system.services.page.IPage in project entando-core by entando.
the class RowContentListViewerWidgetAction method addPages.
private void addPages(IPage page, List<IPage> pages) {
pages.add(page);
String[] children = page.getChildrenCodes();
for (int i = 0; i < children.length; i++) {
IPage child = this.getPageManager().getOnlinePage(children[i]);
this.addPages(child, pages);
}
}
use of com.agiletec.aps.system.services.page.IPage in project entando-core by entando.
the class RowContentListViewerWidgetAction method getPages.
public List<IPage> getPages() {
if (this._pages == null) {
this._pages = new ArrayList<IPage>();
IPage root = this.getPageManager().getOnlineRoot();
this.addPages(root, this._pages);
}
return this._pages;
}
Aggregations