Class FileResourceUtil

  • public class FileResourceUtil
    extends Object
    • Constructor Detail

      • FileResourceUtil

        public FileResourceUtil()
    • Method Detail

      • parentMayView

        public static boolean parentMayView​(javax.jcr.Node startNode,
                                            FileResource file,
                                            javax.servlet.http.HttpServletRequest request)
        Call FileResourceSecurityPolicy.mayView() on an ancestor node. This climbs from the given JCR towards the root looking for a node that implements the FileResourceSecurityPolicy interface and calls its mayView() method and returns the result. This utility method is typically used for calling the mayView() method on the PageVersion object belonging to a element.
        startNode - Node whose's ancesters will be searched.
        file - Second parameter for FileResourceSecurityPolicy.mayView().
        request - The current request object.
        True if mayView() return true, otherwise false. Also false if no node can be found.