org.jboss.portal.identity.ldap
Class LDAPRoleModuleImpl

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
All Implemented Interfaces:
RoleModule
Direct Known Subclasses:
LDAPExtRoleModuleImpl

public class LDAPRoleModuleImpl
extends LDAPRoleModule

Version:
$Revision: 1.1 $
Author:
Boleslaw Dawidowicz

Field Summary
 
Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService
moduleType
 
Constructor Summary
LDAPRoleModuleImpl()
           
 
Method Summary
 Role createRole(java.lang.String name, java.lang.String displayName)
          Create a new role with the specified name.
 Role findRoleById(java.lang.Object id)
          Retrieves a role by its id.
 Role findRoleById(java.lang.String id)
          Retrieves a role by its id.
 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.
 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 over modules to perform searches.
 
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

LDAPRoleModuleImpl

public LDAPRoleModuleImpl()
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

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.

Parameters:
names - the role names
Returns:
a collection of roles
Throws:
java.lang.IllegalArgumentException
IdentityException

findRoleById

public Role findRoleById(java.lang.Object id)
                  throws IdentityException,
                         java.lang.IllegalArgumentException
Description copied from interface: RoleModule
Retrieves a role by its id.

Parameters:
id - the role id
Returns:
the role
Throws:
IdentityException
java.lang.IllegalArgumentException

findRoleById

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

Parameters:
id - the role id
Returns:
the role
Throws:
IdentityException
java.lang.IllegalArgumentException

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.

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.

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.

Returns:
the number of roles
Throws:
IdentityException

findRoles

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

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 over modules to perform searches. It will allow role module implementation to apply proper filter and search scope from the configuration

Specified by:
searchRoles in class LDAPRoleModule
Parameters:
filter - that will be concatenated with proper role search filter from the module
Returns:
Throws:
javax.naming.NamingException
IdentityException