Package org.uberfire.security.impl.authz
Class ResourceCheckImpl<C extends ResourceCheckImpl>
- java.lang.Object
-
- org.uberfire.security.impl.authz.ResourceCheckImpl<C>
-
- All Implemented Interfaces:
AuthorizationCheck<C>,ResourceCheck<C>
public class ResourceCheckImpl<C extends ResourceCheckImpl> extends Object implements ResourceCheck<C>
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorizationManagerauthorizationManagerprotected org.uberfire.security.Resourceresourceprotected org.uberfire.security.ResourceActionresourceActionprotected org.uberfire.security.ResourceTyperesourceTypeprotected Booleanresultprotected org.jboss.errai.security.shared.api.identity.Useruserprotected org.uberfire.security.authz.VotingStrategyvotingStrategy
-
Constructor Summary
Constructors Constructor Description ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.Resource resource, org.jboss.errai.security.shared.api.identity.User user)ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.Resource resource, org.jboss.errai.security.shared.api.identity.User user, org.uberfire.security.authz.VotingStrategy votingStrategy)ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.ResourceType resourceType, org.jboss.errai.security.shared.api.identity.User user)ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.ResourceType resourceType, 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 Caction(org.uberfire.security.ResourceAction action)Specifies the action to checkprotected voidcheck(org.uberfire.security.ResourceAction action)Cdenied(org.uberfire.mvp.Command onDenied)Specifies the command instance to execute in case the check result is denied.Cgranted(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
-
authorizationManager
protected AuthorizationManager authorizationManager
-
resource
protected org.uberfire.security.Resource resource
-
resourceAction
protected org.uberfire.security.ResourceAction resourceAction
-
resourceType
protected org.uberfire.security.ResourceType resourceType
-
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
-
ResourceCheckImpl
public ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.Resource resource, org.jboss.errai.security.shared.api.identity.User user)
-
ResourceCheckImpl
public ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.ResourceType resourceType, org.jboss.errai.security.shared.api.identity.User user)
-
ResourceCheckImpl
public ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.Resource resource, org.jboss.errai.security.shared.api.identity.User user, org.uberfire.security.authz.VotingStrategy votingStrategy)
-
ResourceCheckImpl
public ResourceCheckImpl(AuthorizationManager authorizationManager, org.uberfire.security.ResourceType resourceType, org.jboss.errai.security.shared.api.identity.User user, org.uberfire.security.authz.VotingStrategy votingStrategy)
-
-
Method Detail
-
check
protected void check(org.uberfire.security.ResourceAction action)
-
action
public C action(org.uberfire.security.ResourceAction action)
Description copied from interface:ResourceCheckSpecifies the action to check- Specified by:
actionin interfaceResourceCheck<C extends ResourceCheckImpl>- Parameters:
action- The action to check
-
granted
public C 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<C extends ResourceCheckImpl>- Parameters:
onGranted- The command to execute
-
denied
public C 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<C extends ResourceCheckImpl>- Parameters:
onDenied- The command to execute
-
result
public boolean result()
Description copied from interface:AuthorizationCheckGet the check result value- Specified by:
resultin interfaceAuthorizationCheck<C extends ResourceCheckImpl>- Returns:
- true if granted, false otherwise
-
-