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
Exception
public static void clearCache(ContentContext ctx, GlobalContext globalContext) throws Exception
Exception
public static void clearAllCache(ContentContext ctx, GlobalContext globalContext) throws Exception
Exception
public 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.DAOException
Exception
public String createContentMirrorIfNeeded(ContentContext ctx, MenuElement newPage, IContentVisualComponent comp, String parentId, boolean b) throws Exception
Exception
public String createContent(ContentContext ctx, MenuElement page, ComponentBean inBean, String parentId, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, ComponentBean inBean, String parentId, boolean releaseCache) throws Exception
Exception
public String createContentAtEnd(ContentContext ctx, ComponentBean inBean, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, MenuElement page, Iterable<ComponentBean> inBean, String parentId, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, Collection<ComponentBean> inBean, String parentId, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, MenuElement page, String area, String parentId, String type, String content, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, MenuElement page, String area, String parentId, ComponentBean inBean, boolean releaseCache) throws Exception
Exception
public String createContentWidthId(ContentContext ctx, MenuElement page, String area, String parentId, ComponentBean inBean, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, String parentId, String type, String content, boolean releaseCache) throws Exception
Exception
public String createContent(ContentContext ctx, String parentId, String type, String content, boolean repeat, String renderer) throws Exception
Exception
public 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
Exception
public IContentVisualComponent getComponentNoRealContentType(ContentContext ctx, String id) throws Exception
Exception
public IContentVisualComponent getComponent(ContentContext ctx, String id) throws Exception
Exception
public List<IContentVisualComponent> getComponentByType(ContentContext ctx, String type) throws Exception
Exception
public IContentVisualComponent getComponentAllLanguage(ContentContext ctx, String id) throws Exception
Exception
public Map<String,String> getGlobalMap(ContentContext ctx)
public MenuElement getNavigation(ContentContext ctx) throws Exception
Exception
public MenuElement getTrashPage(ContentContext ctx) throws Exception
Exception
public boolean isNavigationLoaded(ContentContext ctx)
public MenuElement getTimeTravelerNav()
public int getWordCount(ContentContext ctx) throws Exception
Exception
public boolean isModified()
public void releaseAll(ContentContext ctx, GlobalContext globalContext) throws Exception
Exception
public void releasePreviewNav(ContentContext ctx) throws Exception
ctx
- if null context will not be updated (and content not reloaded
now).Exception
public void releaseTimeTravelerNav(ContentContext ctx) throws Exception
Exception
public void releaseViewNav(ContentContext ctx, GlobalContext globalContext) throws Exception
Exception
public 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
Exception
public List<IContentVisualComponent> getAllContent(ContentContext ctx) throws Exception
Exception
public void setPreviewNav(MenuElement previewNav)
public void setTimeTravelerNav(MenuElement timeTravelerNav)
public boolean isViewNav()
public boolean isPreviewNav()
public MenuElement getPageWithShortURL(ContentContext ctx, String shortURL) throws Exception
Exception
public void printInfo(ContentContext ctx, PrintStream out)
printInfo
in interface IPrintInfo
Copyright © 2012-2018. All Rights Reserved.