Package org.uberfire.security.impl.authz
Class PermissionCheckImpl
- java.lang.Object
-
- org.uberfire.security.impl.authz.PermissionCheckImpl
-
- All Implemented Interfaces:
AuthorizationCheck,PermissionCheck
public class PermissionCheckImpl extends Object implements PermissionCheck
A check executed over aPermissioninstance.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringpermissionprotected PermissionManagerpermissionManagerprotected Booleanresultprotected org.jboss.errai.security.shared.api.identity.Useruserprotected org.uberfire.security.authz.VotingStrategyvotingStrategy
-
Constructor Summary
Constructors Constructor Description PermissionCheckImpl(PermissionManager permissionManager, String permission, org.jboss.errai.security.shared.api.identity.User user, org.uberfire.security.authz.VotingStrategy votingStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck()AuthorizationCheckdenied(org.uberfire.mvp.Command onDenied)Specifies the command instance to execute in case the check result is denied.AuthorizationCheckgranted(org.uberfire.mvp.Command onGranted)Specifies the command instance to execute in case the check result is granted.booleanresult()Get the check result value
-
-
-
Field Detail
-
permissionManager
protected PermissionManager permissionManager
-
permission
protected String permission
-
user
protected org.jboss.errai.security.shared.api.identity.User user
-
votingStrategy
protected org.uberfire.security.authz.VotingStrategy votingStrategy
-
result
protected Boolean result
-
-
Constructor Detail
-
PermissionCheckImpl
public PermissionCheckImpl(PermissionManager permissionManager, String permission, org.jboss.errai.security.shared.api.identity.User user, org.uberfire.security.authz.VotingStrategy votingStrategy)
-
-
Method Detail
-
check
protected void check()
-
granted
public AuthorizationCheck granted(org.uberfire.mvp.Command onGranted)
Description copied from interface:AuthorizationCheckSpecifies the command instance to execute in case the check result is granted.- Specified by:
grantedin interfaceAuthorizationCheck- Parameters:
onGranted- The command to execute
-
denied
public AuthorizationCheck denied(org.uberfire.mvp.Command onDenied)
Description copied from interface:AuthorizationCheckSpecifies the command instance to execute in case the check result is denied.- Specified by:
deniedin interfaceAuthorizationCheck- Parameters:
onDenied- The command to execute
-
result
public boolean result()
Description copied from interface:AuthorizationCheckGet the check result value- Specified by:
resultin interfaceAuthorizationCheck- Returns:
- true if granted, false otherwise
-
-