Class PrivilegeRenderCondition

  • All Implemented Interfaces:
    RenderCondition

    public class PrivilegeRenderCondition
    extends java.lang.Object
    implements RenderCondition
    A condition that decides based on AccessControlManager.hasPrivileges(String, Privilege[]).
    • Constructor Summary

      Constructors 
      Constructor Description
      PrivilegeRenderCondition​(javax.jcr.security.AccessControlManager acm, java.lang.String path, java.lang.String[] privilegeNames)  
      PrivilegeRenderCondition​(javax.jcr.security.AccessControlManager acm, java.lang.String path, javax.jcr.security.Privilege[] privileges)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean check()
      Returns true if the component should be rendered; false otherwise.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrivilegeRenderCondition

        public PrivilegeRenderCondition​(@Nonnull
                                        javax.jcr.security.AccessControlManager acm,
                                        @Nonnull
                                        java.lang.String path,
                                        @Nonnull
                                        java.lang.String[] privilegeNames)
                                 throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • PrivilegeRenderCondition

        public PrivilegeRenderCondition​(@Nonnull
                                        javax.jcr.security.AccessControlManager acm,
                                        @Nonnull
                                        java.lang.String path,
                                        @Nonnull
                                        javax.jcr.security.Privilege[] privileges)
    • Method Detail

      • check

        public boolean check()
                      throws javax.servlet.ServletException
        Description copied from interface: RenderCondition
        Returns true if the component should be rendered; false otherwise.
        Specified by:
        check in interface RenderCondition
        Returns:
        true if the component should be rendered, false otherwise
        Throws:
        javax.servlet.ServletException - in case a servlet error occurs