Class DecoratorUtil
- java.lang.Object
-
- com.atlassian.confluence.impl.util.DecoratorUtil
-
public class DecoratorUtil extends Object
This class provides helper methods for deferred rendering of page sections in main decorator- Since:
- 5.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DecoratorUtil.ContentNavigationContext
static class
DecoratorUtil.SideBarContext
-
Constructor Summary
Constructors Constructor Description DecoratorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DecoratorUtil.ContentNavigationContext
getContentNavContext()
Methods returns page/blogpost context, saved into request for deferred (sitemesh) content nav execution.static DecoratorUtil.SideBarContext
getSidebarContext()
Methods returns page/blogpost context, saved into request for deferred (sitemesh) sidebar execution.static boolean
hasContentNavContext()
Methods returnstrue
if content navigation context was set to http request,false
otherwisestatic boolean
hasSidebarContext()
Methods returnstrue
if sidebar context was set to http request,false
otherwisestatic void
setContentNavContext(AbstractPage page, String mode, String context, ThemeHelper helper)
Page/blogpost context should be saved for deferred (sitemesh) content navigation execution, because main sitemesh decorator is executed underDecoratorAction
, which does not contain page/space context of the main request.static void
setSidebarContext(Space space, AbstractPage page, String pageId, String context, String contextKey, String collectorKey)
Page/blogpost context should be saved for deferred (sitemesh) sidebar execution, because main sitemesh decorator is executed underDecoratorAction
, which does not contain page/space context of the main request.
-
-
-
Method Detail
-
setSidebarContext
public static void setSidebarContext(Space space, AbstractPage page, String pageId, String context, String contextKey, String collectorKey)
Page/blogpost context should be saved for deferred (sitemesh) sidebar execution, because main sitemesh decorator is executed underDecoratorAction
, which does not contain page/space context of the main request. Context is saved as attribute inHttpServletRequest
.- Parameters:
page
- current pagepageId
- current page idcontext
- execution context namecontextKey
- context keycollectorKey
- collector key- Since:
- 5.10
-
setContentNavContext
public static void setContentNavContext(AbstractPage page, String mode, String context, ThemeHelper helper)
Page/blogpost context should be saved for deferred (sitemesh) content navigation execution, because main sitemesh decorator is executed underDecoratorAction
, which does not contain page/space context of the main request. Context is saved as attribute inHttpServletRequest
.- Parameters:
page
- current pagemode
- modecontext
- execution context namehelper
- page helper- Since:
- 5.10
-
hasSidebarContext
public static boolean hasSidebarContext()
Methods returnstrue
if sidebar context was set to http request,false
otherwise- Since:
- 5.10
-
hasContentNavContext
public static boolean hasContentNavContext()
Methods returnstrue
if content navigation context was set to http request,false
otherwise- Since:
- 5.10
-
getSidebarContext
public static DecoratorUtil.SideBarContext getSidebarContext()
Methods returns page/blogpost context, saved into request for deferred (sitemesh) sidebar execution.- Since:
- 5.10
- See Also:
DecoratorUtil.SideBarContext
-
getContentNavContext
public static DecoratorUtil.ContentNavigationContext getContentNavContext()
Methods returns page/blogpost context, saved into request for deferred (sitemesh) content nav execution.- Since:
- 5.10
- See Also:
DecoratorUtil.ContentNavigationContext
-
-