Package org.wildfly.security.authz
Class SimplePermissionMapper.Builder
- java.lang.Object
 - 
- org.wildfly.security.authz.SimplePermissionMapper.Builder
 
 
- 
- Enclosing class:
 - SimplePermissionMapper
 
public static class SimplePermissionMapper.Builder extends Object
A builder for simple permission mappers. 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimplePermissionMapper.BuilderaddMapping(Set<String> principals, Set<String> roles, PermissionVerifier permissionVerifier)Add a new mapping to aPermissionVerifier, if thePermissionMappablebeing mapped has a principal name that is in theSetof principals or of any of the assigned roles are matched this mapping will be a match.SimplePermissionMapper.BuilderaddMatchAllPrincipals(PermissionVerifier permissionVerifier)Add a new mapping to aPermissionVerifier, if thePermissionMappablebeing mapped has a principal or any of the assigned roles are matched this mapping will be a match.PermissionMapperbuild()Build and return the resultingPermissionMapper.SimplePermissionMapper.BuildersetMappingMode(SimplePermissionMapper.MappingMode mappingMode)Set the mapping mode that the newly createdPermissionMappershould use. 
 - 
 
- 
- 
Method Detail
- 
setMappingMode
public SimplePermissionMapper.Builder setMappingMode(SimplePermissionMapper.MappingMode mappingMode)
Set the mapping mode that the newly createdPermissionMappershould use.- Parameters:
 mappingMode- the mapping mode.- Returns:
 thisbuilder to allow chaining.
 
- 
addMapping
public SimplePermissionMapper.Builder addMapping(Set<String> principals, Set<String> roles, PermissionVerifier permissionVerifier)
Add a new mapping to aPermissionVerifier, if thePermissionMappablebeing mapped has a principal name that is in theSetof principals or of any of the assigned roles are matched this mapping will be a match.- Parameters:
 principals- the principal names to compare with thePermissionMappableprincipal.roles- the role names to compare with the roles being passed for mapping.permissionVerifier- thePermissionVerifierto use in the event of a resulting match.- Returns:
 thisbuilder to allow chaining.
 
- 
addMatchAllPrincipals
public SimplePermissionMapper.Builder addMatchAllPrincipals(PermissionVerifier permissionVerifier)
Add a new mapping to aPermissionVerifier, if thePermissionMappablebeing mapped has a principal or any of the assigned roles are matched this mapping will be a match.- Parameters:
 permissionVerifier- thePermissionVerifierto use in the event of a resulting match.- Returns:
 thisbuilder to allow chaining.
 
- 
build
public PermissionMapper build()
Build and return the resultingPermissionMapper.- Returns:
 - the resulting 
PermissionMapper 
 
 - 
 
 -