org.pentaho.platform.engine.security.userroledao.hibernate.sample
Class SampleUsersAndRolesInitHandler
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.pentaho.platform.engine.security.userroledao.hibernate.sample.SampleUsersAndRolesInitHandler
- All Implemented Interfaces:
- HibernateUserRoleDao.InitHandler, org.springframework.beans.factory.InitializingBean
public class SampleUsersAndRolesInitHandler
- extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
- implements HibernateUserRoleDao.InitHandler
Inserts sample users and roles into tables if those tables are empty.
This handler checks to see if the users table is empty. If it is empty, then it inserts sample users and roles.
TODO mlowery Use DefaultPentahoPasswordEncoder to encode the hard-coded passwords.
- Author:
- mlowery
- See Also:
HibernateUserRoleDao.InitHandler
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet |
SampleUsersAndRolesInitHandler
public SampleUsersAndRolesInitHandler()
handleInit
public void handleInit()
- Specified by:
handleInit
in interface HibernateUserRoleDao.InitHandler
setUserRoleDao
public void setUserRoleDao(IUserRoleDao userRoleDao)