站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

RoleModuleImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.impl.role
Class RoleModuleImpl

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.portal.common.system.AbstractJBossService
              extended byorg.jboss.portal.core.modules.AbstractModule
                  extended byorg.jboss.portal.core.impl.role.RoleModuleImpl
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, RoleModule, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class RoleModuleImpl
extends AbstractModule
implements RoleModule


Field Summary
protected  HibernateProvider hibernateProvider
          .
protected  org.hibernate.SessionFactory sessionFactory
          .
 
Fields inherited from class org.jboss.portal.core.modules.AbstractModule
JNDIName
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
RoleModuleImpl()
           
 
Method Summary
 Role createRole(java.lang.String name, java.lang.String displayName)
          Create a new role with the specified name.
 Role findRoleByDisplayName(java.lang.String displayName)
          Retrieves a role by its displayname
 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 findRoleMembers(java.lang.String roleName, int offset, int limit, java.lang.String userNameFilter)
          Returns role members based on rolename
 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.
protected  org.hibernate.Session getCurrentSession()
          Can be subclasses to provide testing in a non JTA environement.
 HibernateProvider getHibernateProvider()
           
 int getRolesCount()
          Returns the number of roles.
 void removeRole(java.lang.Object id)
          Remove a role.
 void setHibernateProvider(HibernateProvider hibernateProvider)
           
protected  void startService()
           
 void stopService()
           
 
Methods inherited from class org.jboss.portal.core.modules.AbstractModule
getJNDIName, setJNDIName
 
Methods inherited from class org.jboss.portal.common.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hibernateProvider

protected HibernateProvider hibernateProvider
.


sessionFactory

protected org.hibernate.SessionFactory sessionFactory
.

Constructor Detail

RoleModuleImpl

public RoleModuleImpl()
Method Detail

startService

protected void startService()
                     throws java.lang.Exception
Overrides:
startService in class AbstractModule
Throws:
java.lang.Exception

stopService

public void stopService()
                 throws java.lang.Exception
Overrides:
stopService in class AbstractModule
Throws:
java.lang.Exception

getHibernateProvider

public HibernateProvider getHibernateProvider()

setHibernateProvider

public void setHibernateProvider(HibernateProvider hibernateProvider)

findRoleByName

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

Specified by:
findRoleByName in interface RoleModule
Parameters:
name - the role name
Returns:
the role
Throws:
ModuleException

findRolesByNames

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

Specified by:
findRolesByNames in interface RoleModule
Parameters:
names - the role names
Returns:
a collection of roles
Throws:
ModuleException

findRoleByDisplayName

public Role findRoleByDisplayName(java.lang.String displayName)
                           throws ModuleException
Description copied from interface: RoleModule
Retrieves a role by its displayname

Specified by:
findRoleByDisplayName in interface RoleModule
Returns:
the role
Throws:
ModuleException

findRoleById

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

Specified by:
findRoleById in interface RoleModule
Parameters:
id - the role id
Returns:
the role
Throws:
java.lang.IllegalArgumentException
ModuleException

findRoleById

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

Specified by:
findRoleById in interface RoleModule
Parameters:
id - the role id
Returns:
the role
Throws:
ModuleException

createRole

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

Specified by:
createRole in interface RoleModule
Parameters:
name - the role name
displayName - the role display name
Returns:
the role
Throws:
ModuleException

removeRole

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

Specified by:
removeRole in interface RoleModule
Parameters:
id - the role id
Throws:
ModuleException

getRolesCount

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

Specified by:
getRolesCount in interface RoleModule
Returns:
the number of roles
Throws:
ModuleException

findRoles

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

Specified by:
findRoles in interface RoleModule
Returns:
the roles
Throws:
ModuleException

findRoleMembers

public java.util.Set findRoleMembers(java.lang.String roleName,
                                     int offset,
                                     int limit,
                                     java.lang.String userNameFilter)
                              throws ModuleException
Description copied from interface: RoleModule
Returns role members based on rolename

Specified by:
findRoleMembers in interface RoleModule
Parameters:
roleName -
offset -
limit -
Returns:
Throws:
ModuleException

getCurrentSession

protected org.hibernate.Session getCurrentSession()
Can be subclasses to provide testing in a non JTA environement.