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 SummaryAll 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- 
setMappingModepublic 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.
 
 - 
addMappingpublic 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 the- PermissionMappableprincipal.
- roles- the role names to compare with the roles being passed for mapping.
- permissionVerifier- the- PermissionVerifierto use in the event of a resulting match.
- Returns:
- thisbuilder to allow chaining.
 
 - 
addMatchAllPrincipalspublic 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- the- PermissionVerifierto use in the event of a resulting match.
- Returns:
- thisbuilder to allow chaining.
 
 - 
buildpublic PermissionMapper build() Build and return the resultingPermissionMapper.- Returns:
- the resulting PermissionMapper
 
 
- 
 
-