Class DatabaseRolesMappingProvider
- java.lang.Object
-
- org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
-
- org.jboss.security.mapping.providers.role.DatabaseRolesMappingProvider
-
- All Implemented Interfaces:
MappingProvider<RoleGroup>
public class DatabaseRolesMappingProvider extends AbstractRolesMappingProvider
AMappingProvider
that reads roles from a database. rolesQuery option should be a prepared statement equivalent to "select RoleName from Roles where User=?"- Author:
- Marcus Moyses
-
-
Field Summary
Fields Modifier and Type Field Description protected String
dsJndiName
protected String
rolesQuery
protected boolean
suspendResume
protected TransactionManager
tm
protected String
TX_MGR_JNDI_NAME
-
Fields inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
result
-
-
Constructor Summary
Constructors Constructor Description DatabaseRolesMappingProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TransactionManager
getTransactionManager()
void
init(Map<String,Object> options)
Initialize the provider with the configured module optionsvoid
performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Map the passed object-
Methods inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
getCallerPrincipal, setMappingResult, supports
-
-
-
-
Field Detail
-
dsJndiName
protected String dsJndiName
-
rolesQuery
protected String rolesQuery
-
suspendResume
protected boolean suspendResume
-
TX_MGR_JNDI_NAME
protected String TX_MGR_JNDI_NAME
-
tm
protected TransactionManager tm
-
-
Method Detail
-
init
public void init(Map<String,Object> options)
Description copied from interface:MappingProvider
Initialize the provider with the configured module options
-
performMapping
public void performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Description copied from interface:MappingProvider
Map the passed object- Parameters:
contextMap
- A read-only contextual map that can provide information to the providermappedObject
- an Object on which the mapping will be applied
-
getTransactionManager
protected TransactionManager getTransactionManager() throws NamingException
- Throws:
NamingException
-
-