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(AccessControlManager acm, java.lang.String path, java.lang.String[] privilegeNames)
PrivilegeRenderCondition(AccessControlManager acm, java.lang.String path, Privilege[] privileges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check()
Returnstrue
if the component should be rendered;false
otherwise.
-
-
-
Constructor Detail
-
PrivilegeRenderCondition
public PrivilegeRenderCondition(@Nonnull AccessControlManager acm, @Nonnull java.lang.String path, @Nonnull java.lang.String[] privilegeNames) throws RepositoryException
- Throws:
RepositoryException
-
PrivilegeRenderCondition
public PrivilegeRenderCondition(@Nonnull AccessControlManager acm, @Nonnull java.lang.String path, @Nonnull Privilege[] privileges)
-
-
Method Detail
-
check
public boolean check() throws ServletException
Description copied from interface:RenderCondition
Returnstrue
if the component should be rendered;false
otherwise.- Specified by:
check
in interfaceRenderCondition
- Returns:
true
if the component should be rendered,false
otherwise- Throws:
ServletException
- in case a servlet error occurs
-
-