Class PrivilegeRenderCondition
- java.lang.Object
-
- com.adobe.granite.ui.components.rendercondition.PrivilegeRenderCondition
-
- All Implemented Interfaces:
RenderCondition
public class PrivilegeRenderCondition extends java.lang.Object implements RenderCondition
A condition that decides based onAccessControlManager.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 booleancheck()Returnstrueif the component should be rendered;falseotherwise.
-
-
-
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.ServletExceptionDescription copied from interface:RenderConditionReturnstrueif the component should be rendered;falseotherwise.- Specified by:
checkin interfaceRenderCondition- Returns:
trueif the component should be rendered,falseotherwise- Throws:
javax.servlet.ServletException- in case a servlet error occurs
-
-