Class ClusterPermissionMapper
java.lang.Object
org.infinispan.security.mappers.ClusterPermissionMapper
- All Implemented Interfaces:
Lifecycle
,MutableRolePermissionMapper
,RolePermissionMapper
public class ClusterPermissionMapper
extends Object
implements MutableRolePermissionMapper, Lifecycle
ClusterPermissionMapper. This class implements both a
MutableRolePermissionMapper
storing the mappings in a
persistent replicated internal cache named org.infinispan.PERMISSIONS
- Since:
- 14.0
- Author:
- Tristan Tarrant
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a new roleboolean
removeRole
(String name) Removes a rolevoid
start()
Invoked on component startvoid
stop()
Invoked on component stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.security.RolePermissionMapper
setContext
-
Field Details
-
CLUSTER_PERMISSION_MAPPER_CACHE
- See Also:
-
-
Constructor Details
-
ClusterPermissionMapper
public ClusterPermissionMapper()
-
-
Method Details
-
start
-
stop
-
addRole
Description copied from interface:MutableRolePermissionMapper
Adds a new role- Specified by:
addRole
in interfaceMutableRolePermissionMapper
- Parameters:
role
- the role
-
removeRole
Description copied from interface:MutableRolePermissionMapper
Removes a role- Specified by:
removeRole
in interfaceMutableRolePermissionMapper
- Parameters:
name
- the name of the role to be removed- Returns:
- true if a role with the supplied name was found and removed
-
getAllRoles
- Specified by:
getAllRoles
in interfaceRolePermissionMapper
- Returns:
- all roles handled by this RolePermissionMapper
-
getRole
- Specified by:
getRole
in interfaceRolePermissionMapper
- Parameters:
name
- the name of the role- Returns:
- the
Role
-
hasRole
- Specified by:
hasRole
in interfaceRolePermissionMapper
- Parameters:
name
-- Returns:
- whether this permission mapper contains the named role
-