Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.identity.db
Class HibernateMembershipModuleImpl

    java.lang.Object
      org.jboss.portal.identity.service.IdentityModuleService
          org.jboss.portal.identity.service.MembershipModuleService
              org.jboss.portal.identity.db.HibernateMembershipModuleImpl

All Implemented Interfaces:
  MembershipModule

    public class HibernateMembershipModuleImpl

extends MembershipModuleService

Version:
  $Revision: 1.1 $
Author:
  Boleslaw Dawidowicz

Field Summary
`protected org.hibernate.SessionFactory` | `sessionFactory` .
`protected java.lang.String` | `sessionFactoryJNDIName` .

Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService
`moduleType`

Constructor Summary
`HibernateMembershipModuleImpl()`

Method Summary
`void` | `assignRoles(User user, java.util.Set roles)` Creates a relationship beetween a user and set of roles.
`void` | `assignUsers(Role role, java.util.Set users)` Creates a relationship beetween a role and set of users.
`java.util.Set` | `findRoleMembers(java.lang.String roleName, int offset, int limit, java.lang.String userNameFilter)` Returns role members based on rolename - depreciated method ethod here only for compatibility with old RoleModule interface
`protected org.hibernate.Session` | `getCurrentSession()` Can be subclasses to provide testing in a non JTA environment.
`java.util.Set` | `getRoles(User user)` Return the set of role objects that a given user has.
`java.lang.String` | `getSessionFactoryJNDIName()`
`protected HibernateUserModuleImpl` | `getUserModule()`
`java.util.Set` | `getUsers(Role role)` Returns the set of user objects that a given role has.
`void` | `setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)`
`void` | `start()`
`void` | `stop()`

Methods inherited from class org.jboss.portal.identity.service.MembershipModuleService
`fireMembershipChangedEvent, fireMembershipChangedEvent, fireMembershipChangedEvent, getProfileInfo, setProfileInfo`

Methods inherited from class org.jboss.portal.identity.service.IdentityModuleService
`getConnectionJNDIName, getIdentityConfiguration, getIdentityContext, getIdentityEventBroadcaster, getInitOptions, getJndiBinder, getJNDIName, getModuleType, setConnectionJNDIName, setIdentityContext, setInitOptions, setJndiBinder, setJNDIName, setModuleType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sessionFactory

    protected org.hibernate.SessionFactory sessionFactory

  .

### sessionFactoryJNDIName

    protected java.lang.String sessionFactoryJNDIName

  .

Constructor Detail

### HibernateMembershipModuleImpl

    public HibernateMembershipModuleImpl()

Method Detail

### start

    public void start()
               throws java.lang.Exception

  Overrides:
    `start` in class `IdentityModuleService`
  Throws:
    `java.lang.Exception`

### stop

    public void stop()
              throws java.lang.Exception

  Overrides:
    `stop` in class `IdentityModuleService`
  Throws:
    `java.lang.Exception`

### getSessionFactoryJNDIName

    public java.lang.String getSessionFactoryJNDIName()

### setSessionFactoryJNDIName

    public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)

### getRoles

    public java.util.Set getRoles(User user)
                           throws IdentityException

  Description copied from interface: `MembershipModule`
  Return the set of role objects that a given user has.

  Parameters:
    `user` - the user
  Returns:
    the set of roles of the specified user
  Throws:
    `IdentityException`

### getUsers

    public java.util.Set getUsers(Role role)
                           throws IdentityException

  Description copied from interface: `MembershipModule`
  Returns the set of user objects that a given role has.

  Returns:
  Throws:
    `IdentityException`

### assignUsers

    public void assignUsers(Role role,
                            java.util.Set users)
                     throws IdentityException

  Description copied from interface: `MembershipModule`
  Creates a relationship beetween a role and set of users. Other roles that have assotiontions with those users remain unaffected.

  Throws:
    `IdentityException`

### assignRoles

    public void assignRoles(User user,
                            java.util.Set roles)
                     throws IdentityException

  Description copied from interface: `MembershipModule`
  Creates a relationship beetween a user and set of roles. This operation will erase any other assotientions beetween the user and roles not specified in the provided set.

  Throws:
    `IdentityException`

### findRoleMembers

    public java.util.Set findRoleMembers(java.lang.String roleName,
                                         int offset,
                                         int limit,
                                         java.lang.String userNameFilter)
                                  throws IdentityException

  Description copied from interface: `MembershipModule`
  Returns role members based on rolename - depreciated method ethod here only for compatibility with old RoleModule interface

  Throws:
    `IdentityException`

### getUserModule

    protected HibernateUserModuleImpl getUserModule()
                                             throws IdentityException

  Throws:
    `IdentityException`

### getCurrentSession

    protected org.hibernate.Session getCurrentSession()

  Can be subclasses to provide testing in a non JTA environment.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD