use of org.b3log.solo.service.PageMgmtService in project solo by b3log.
the class CommentProcessorTestCase method addPage.
private String addPage() throws ServiceException {
final PageMgmtService pageMgmtService = getPageMgmtService();
final JSONObject requestJSONObject = new JSONObject();
final JSONObject page = new JSONObject();
requestJSONObject.put(Page.PAGE, page);
page.put(Page.PAGE_CONTENT, "page1 content");
page.put(Page.PAGE_PERMALINK, "page1 permalink");
page.put(Page.PAGE_TITLE, "page1 title");
page.put(Page.PAGE_COMMENTABLE, true);
page.put(Page.PAGE_TYPE, "page");
page.put(Page.PAGE_OPEN_TARGET, "_self");
return pageMgmtService.addPage(requestJSONObject);
}
use of org.b3log.solo.service.PageMgmtService in project solo by b3log.
the class PageProcessorTestCase method addPage.
private JSONObject addPage() throws Exception {
final PageMgmtService pageMgmtService = getPageMgmtService();
final JSONObject requestJSONObject = new JSONObject();
final JSONObject page = new JSONObject();
requestJSONObject.put(Page.PAGE, page);
page.put(Page.PAGE_CONTENT, "page1 content");
page.put(Page.PAGE_PERMALINK, "pagepermalink");
page.put(Page.PAGE_TITLE, "page1 title");
page.put(Page.PAGE_COMMENTABLE, true);
page.put(Page.PAGE_TYPE, "page");
page.put(Page.PAGE_OPEN_TARGET, "_self");
final String pageId = pageMgmtService.addPage(requestJSONObject);
final PageRepository pageRepository = getPageRepository();
return pageRepository.get(pageId);
}
Aggregations