public class ContentService extends Object implements IPrintInfo
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
logger
create a static logger.
|
static String |
TRASH_PAGE_NAME |
public static final String TRASH_PAGE_NAME
protected static Logger logger
public static void clearAllContextCache(ContentContext ctx) throws Exception
Exceptionpublic static void clearCache(ContentContext ctx, GlobalContext globalContext) throws Exception
Exceptionpublic static void clearAllCache(ContentContext ctx, GlobalContext globalContext) throws Exception
Exceptionpublic static ContentService getInstance(javax.servlet.http.HttpServletRequest request)
protected MenuElement getViewNav()
protected void setViewNav(MenuElement nav)
public static ContentService getInstance(GlobalContext globalContext)
public void clearComponentCache()
public boolean contentExistForContext(ContentContext ctx) throws Exception
ctx - the current context.DAOExceptionExceptionpublic String createContentMirrorIfNeeded(ContentContext ctx, MenuElement newPage, IContentVisualComponent comp, String parentId, boolean b) throws Exception
Exceptionpublic String createContent(ContentContext ctx, MenuElement page, ComponentBean inBean, String parentId, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, ComponentBean inBean, String parentId, boolean releaseCache) throws Exception
Exceptionpublic String createContentAtEnd(ContentContext ctx, ComponentBean inBean, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, MenuElement page, Iterable<ComponentBean> inBean, String parentId, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, Collection<ComponentBean> inBean, String parentId, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, MenuElement page, String area, String parentId, String type, String content, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, MenuElement page, String area, String parentId, ComponentBean inBean, boolean releaseCache) throws Exception
Exceptionpublic String createContentWidthId(ContentContext ctx, MenuElement page, String area, String parentId, ComponentBean inBean, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, String parentId, String type, String content, boolean releaseCache) throws Exception
Exceptionpublic String createContent(ContentContext ctx, String parentId, String type, String content, boolean repeat, String renderer) throws Exception
Exceptionpublic void deleteKeys(String prefix)
public void removePreviewAttributes(Collection<Object> keys)
public String getAttribute(ContentContext ctx, String key)
public String getAttribute(ContentContext ctx, String key, String defaultValue)
public IContentVisualComponent getCachedComponent(ContentContext ctx, String id) throws Exception
Exceptionpublic IContentVisualComponent getComponentNoRealContentType(ContentContext ctx, String id) throws Exception
Exceptionpublic IContentVisualComponent getComponent(ContentContext ctx, String id) throws Exception
Exceptionpublic List<IContentVisualComponent> getComponentByType(ContentContext ctx, String type) throws Exception
Exceptionpublic IContentVisualComponent getComponentAllLanguage(ContentContext ctx, String id) throws Exception
Exceptionpublic Map<String,String> getGlobalMap(ContentContext ctx)
public MenuElement getNavigation(ContentContext ctx) throws Exception
Exceptionpublic MenuElement getTrashPage(ContentContext ctx) throws Exception
Exceptionpublic boolean isNavigationLoaded(ContentContext ctx)
public MenuElement getTimeTravelerNav()
public int getWordCount(ContentContext ctx) throws Exception
Exceptionpublic boolean isModified()
public void releaseAll(ContentContext ctx, GlobalContext globalContext) throws Exception
Exceptionpublic void releasePreviewNav(ContentContext ctx) throws Exception
ctx - if null context will not be updated (and content not reloaded
now).Exceptionpublic void releaseTimeTravelerNav(ContentContext ctx) throws Exception
Exceptionpublic void releaseViewNav(ContentContext ctx, GlobalContext globalContext) throws Exception
Exceptionpublic void removeAttributeRAWKey(ContentContext ctx, String key)
public void removeAttribute(ContentContext ctx, String key)
public void setAttribute(ContentContext ctx, String key, String value)
public Collection<String> getPreviewKeys()
public void setCachedComponent(ContentContext ctx, IContentVisualComponent comp) throws Exception
Exceptionpublic List<IContentVisualComponent> getAllContent(ContentContext ctx) throws Exception
Exceptionpublic void setPreviewNav(MenuElement previewNav)
public void setTimeTravelerNav(MenuElement timeTravelerNav)
public boolean isViewNav()
public boolean isPreviewNav()
public MenuElement getPageWithShortURL(ContentContext ctx, String shortURL) throws Exception
Exceptionpublic void printInfo(ContentContext ctx, PrintStream out)
printInfo in interface IPrintInfoCopyright © 2012-2018. All Rights Reserved.