-
Method Summary
Modifier and TypeMethodDescriptionstatic <R extends PageReferrer>
Set<R> filterNotMissingBook
(Set<R> pageReferrers) Filters for all pageRefs that are present (not missing books).static boolean
findAllowRobots
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page) Finds the allowRobots setting for the given page.getApplicableParents
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, View view, Page page) Gets all the parents of the given page that are not in missing books and are applicable to the given view.static String
getShortTitle
(PageRef parentPageRef, Page page) Determines the short title for a page and one of its parents.static boolean
static boolean
hasElement
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page, Class<? extends Element> elementType, boolean recursive) static <E extends Element>
booleanhasElement
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page, Class<E> elementType, boolean recursive, IOPredicateE<? super E, ? extends ServletException> filter) static ReadableDateTime
toDateTime
(Object o)
-
Method Details
-
hasChild
-
hasElement
public static <E extends Element> boolean hasElement(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page, Class<E> elementType, boolean recursive, IOPredicateE<? super E, ? extends ServletException> filter) throws ServletException, IOException- Throws:
ServletException
IOException
-
hasElement
public static boolean hasElement(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page, Class<? extends Element> elementType, boolean recursive) throws ServletException, IOException - Throws:
ServletException
IOException
-
findAllowRobots
public static boolean findAllowRobots(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page) throws ServletException, IOException Finds the allowRobots setting for the given page.
When no allowRobots provided, will use the allowRobots(s) of any parent page that is within the same book. If there are no parent pages in this same book, uses the book's allowRobots.
When inheriting allowRobots from multiple parent pages, the allowRobots must be in exact agreement. This means exactly the same order and all values matching precisely. Any mismatch in allowRobots will result in an exception.
- Throws:
ServletException
IOException
-
filterNotMissingBook
Filters for all pageRefs that are present (not missing books). -
getShortTitle
Determines the short title for a page and one of its parents. -
getApplicableParents
public static Set<Page> getApplicableParents(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, View view, Page page) throws ServletException, IOException Gets all the parents of the given page that are not in missing books and are applicable to the given view.- Returns:
- The filtered set of parents, in the order declared by the page.
- Throws:
ServletException
IOException
-
toDateTime
-