org.jboss.portal.identity.ldap
Class LDAPExtRoleModuleImpl

java.lang.Object
  extended by org.jboss.portal.identity.service.IdentityModuleService
      extended by org.jboss.portal.identity.service.RoleModuleService
          extended by org.jboss.portal.identity.ldap.LDAPRoleModule
              extended by org.jboss.portal.identity.ldap.LDAPRoleModuleImpl
                  extended by org.jboss.portal.identity.ldap.LDAPExtRoleModuleImpl
All Implemented Interfaces:
RoleModule

public class LDAPExtRoleModuleImpl
extends LDAPRoleModuleImpl

Version:
$Revision: 1.1 $
Author:
Boleslaw Dawidowicz

Field Summary
 
Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService
moduleType
 
Constructor Summary
LDAPExtRoleModuleImpl()
           
 
Method Summary
 Role createRole(java.lang.String name, java.lang.String displayName)
          Create a new role with the specified name.
 Role findRoleByName(java.lang.String name)
          Retrieves a role by its name
 java.util.Set findRoles()
          Get all the roles
 java.util.Set findRolesByNames(java.lang.String[] names)
          Retrieve a collection of role from the role names.
 int getRolesCount()
          Returns the number of roles.
protected  java.util.Set getRoleSearchCtxDNs()
           
 void removeRole(java.lang.Object id)
          Remove a role.
 java.util.List searchRoles(java.lang.String filter, java.lang.Object[] filterArgs)
          This method should be used by other modules to perform searches.
 
Methods inherited from class org.jboss.portal.identity.ldap.LDAPRoleModuleImpl
findRoleById, findRoleById
 
Methods inherited from class org.jboss.portal.identity.ldap.LDAPRoleModule
createRoleInstance, findRoleByDN, getConnectionContext, getContainerDN, getDisplayNameAttributeID, getRidAttributeID, getRoleCtxDN, getRoleSearchFilter, getSearchScope, getSearchTimeLimit, setConnectionContext, start, updateDisplayName
 
Methods inherited from class org.jboss.portal.identity.service.IdentityModuleService
getConnectionJNDIName, getIdentityConfiguration, getIdentityContext, getIdentityEventBroadcaster, getInitOptions, getJndiBinder, getJNDIName, getModuleType, setConnectionJNDIName, setIdentityContext, setInitOptions, setJndiBinder, setJNDIName, setModuleType, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPExtRoleModuleImpl

public LDAPExtRoleModuleImpl()
Method Detail

findRoleByName

public Role findRoleByName(java.lang.String name)
                    throws IdentityException,
                           java.lang.IllegalArgumentException
Description copied from interface: RoleModule
Retrieves a role by its name

Specified by:
findRoleByName in interface RoleModule
Overrides:
findRoleByName in class LDAPRoleModuleImpl
Parameters:
name - the role name
Returns:
the role
Throws:
IdentityException
java.lang.IllegalArgumentException

findRolesByNames

public java.util.Set findRolesByNames(java.lang.String[] names)
                               throws IdentityException,
                                      java.lang.IllegalArgumentException
Description copied from interface: RoleModule
Retrieve a collection of role from the role names.

Specified by:
findRolesByNames in interface RoleModule
Overrides:
findRolesByNames in class LDAPRoleModuleImpl
Parameters:
names - the role names
Returns:
a collection of roles
Throws:
java.lang.IllegalArgumentException
IdentityException

createRole

public Role createRole(java.lang.String name,
                       java.lang.String displayName)
                throws IdentityException,
                       java.lang.IllegalArgumentException
Description copied from interface: RoleModule
Create a new role with the specified name.

Specified by:
createRole in interface RoleModule
Overrides:
createRole in class LDAPRoleModuleImpl
Parameters:
name - the role name
displayName - the role display name
Returns:
the role
Throws:
IdentityException
java.lang.IllegalArgumentException

removeRole

public void removeRole(java.lang.Object id)
                throws IdentityException,
                       java.lang.IllegalArgumentException
Description copied from interface: RoleModule
Remove a role.

Specified by:
removeRole in interface RoleModule
Overrides:
removeRole in class LDAPRoleModuleImpl
Parameters:
id - the role id
Throws:
IdentityException
java.lang.IllegalArgumentException

getRolesCount

public int getRolesCount()
                  throws IdentityException
Description copied from interface: RoleModule
Returns the number of roles.

Specified by:
getRolesCount in interface RoleModule
Overrides:
getRolesCount in class LDAPRoleModuleImpl
Returns:
the number of roles
Throws:
IdentityException

findRoles

public java.util.Set findRoles()
                        throws IdentityException
Description copied from interface: RoleModule
Get all the roles

Specified by:
findRoles in interface RoleModule
Overrides:
findRoles in class LDAPRoleModuleImpl
Returns:
the roles
Throws:
IdentityException

searchRoles

public java.util.List searchRoles(java.lang.String filter,
                                  java.lang.Object[] filterArgs)
                           throws javax.naming.NamingException,
                                  IdentityException
This method should be used by other modules to perform searches. It will allow role module implementation to apply proper filter and search scope from the configuration

Overrides:
searchRoles in class LDAPRoleModuleImpl
Parameters:
filter - that will be concatenated with proper user search filter from the module
Returns:
Throws:
javax.naming.NamingException
IdentityException

getRoleSearchCtxDNs

protected java.util.Set getRoleSearchCtxDNs()
                                     throws IdentityException
Throws:
IdentityException