public class NavigationHelper extends Object
Constructor and Description |
---|
NavigationHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canMoveDown(MenuElement elem) |
static boolean |
canMoveToChild(MenuElement elem) |
static boolean |
canMoveToParent(MenuElement elem) |
static boolean |
canMoveUp(MenuElement elem) |
static void |
changeStepPriority(List<MenuElement> elems,
int newStep) |
static void |
changeStepPriority(MenuElement[] elems,
int newStep) |
static void |
copyElement(ContentContext ctx,
MenuElement src,
MenuElement target)
copy all element attribute (without children)
|
static int |
countUnvalidChildren(MenuElement elem) |
static MenuElement |
createChildPageAutoName(MenuElement page,
ContentContext ctx) |
static MenuElement |
firstSelectionElement(ContentContext ctx) |
static List<String> |
getAllRSSChannels(ContentContext ctx,
MenuElement page) |
static String |
getBreadCrumb(ContentContext ctx,
MenuElement page) |
static MenuElement |
getChildWithContent(ContentContext ctx,
MenuElement page) |
static String |
getLinkedURL(MenuElement elem)
get the linked url of the current page, maybe defined in a parent node.
|
static String |
getPageBookmark(ContentContext ctx,
MenuElement page)
get the page bookmark for the html header. used for pdf generation.
|
static MenuElement |
getPageById(ContentContext ctx,
String id) |
static List<String> |
getRSSChannels(ContentContext ctx,
MenuElement page) |
static void |
importPage(ContentContext ctx,
PersistenceService persistenceService,
NodeXML pageNode,
MenuElement currentPage,
String lang,
boolean readOnly) |
static boolean |
isParent(MenuElement page,
List<MenuElement> parents)
check if pages are parent of a other page.
|
static boolean |
isParent(MenuElement page,
MenuElement parent)
check if a page is a parent of a other page.
|
static void |
movePage(ContentContext ctx,
MenuElement parent,
MenuElement previousBrother,
MenuElement page) |
static void |
publishNavigation(ContentContext ctx,
MenuElement srcRoot,
MenuElement targetRoot) |
static void |
publishOneComponent(ContentContext ctx,
String componentId) |
static List<MenuElement> |
searchLinkTo(ContentContext ctx,
MenuElement elem)
search page with a link to a specific page
|
static MenuElement |
searchPage(ContentContext ctx,
String idOrNameOrPath) |
public static final boolean canMoveDown(MenuElement elem)
public static final boolean canMoveToChild(MenuElement elem)
public static final boolean canMoveToParent(MenuElement elem)
public static final boolean canMoveUp(MenuElement elem)
public static final void changeStepPriority(List<MenuElement> elems, int newStep)
public static final void changeStepPriority(MenuElement[] elems, int newStep)
public static void copyElement(ContentContext ctx, MenuElement src, MenuElement target) throws Exception
src
- source MenuElementtarget
- target MenuElementException
public static int countUnvalidChildren(MenuElement elem)
public static MenuElement firstSelectionElement(ContentContext ctx) throws Exception
Exception
public static List<String> getAllRSSChannels(ContentContext ctx, MenuElement page) throws Exception
Exception
public static String getLinkedURL(MenuElement elem)
elem
- public static List<String> getRSSChannels(ContentContext ctx, MenuElement page) throws Exception
Exception
public static final void importPage(ContentContext ctx, PersistenceService persistenceService, NodeXML pageNode, MenuElement currentPage, String lang, boolean readOnly) throws Exception
Exception
public static void publishNavigation(ContentContext ctx, MenuElement srcRoot, MenuElement targetRoot) throws Exception
Exception
public static void publishOneComponent(ContentContext ctx, String componentId) throws Exception
Exception
public static List<MenuElement> searchLinkTo(ContentContext ctx, MenuElement elem) throws Exception
elem
- a specific pageException
public static boolean isParent(MenuElement page, MenuElement parent)
page
- a page with parentparent
- the suposed parent pagepublic static boolean isParent(MenuElement page, List<MenuElement> parents)
page
- a page with parentparent
- the suposed parent pagepublic static String getPageBookmark(ContentContext ctx, MenuElement page) throws Exception
Exception
public static void movePage(ContentContext ctx, MenuElement parent, MenuElement previousBrother, MenuElement page)
public static MenuElement createChildPageAutoName(MenuElement page, ContentContext ctx) throws Exception
Exception
public static MenuElement getPageById(ContentContext ctx, String id) throws Exception
Exception
public static MenuElement getChildWithContent(ContentContext ctx, MenuElement page) throws Exception
Exception
public static String getBreadCrumb(ContentContext ctx, MenuElement page) throws Exception
Exception
public static MenuElement searchPage(ContentContext ctx, String idOrNameOrPath) throws Exception
Exception
Copyright © 2012-2018. All Rights Reserved.