Class CopyrightUtils


public final class CopyrightUtils extends Object
Copyright processing utilities.
  • Method Details

    • findCopyright

      public static Copyright findCopyright(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page) throws ServletException, IOException

      Finds the effective copyright for the given page or null if none. If a copyright is returned, all fields in the resulting copyright will be non-null since all inheriting has been completed.

      Any field not set (or set to null) will be inherited from the parent(s) in the same book. Any field set to "" will have no value and not inherit from parents.

      If there are no parent pages in this same book, uses the fields from the book's copyright.

      When inheriting a field from multiple parent pages, the field must have exactly the same value in all parents. Any mismatch in value will result in an exception.