org.pentaho.platform.engine.security.userroledao.hibernate.sample
Class SampleUsersAndRolesInitHandler

java.lang.Object
  extended by HibernateDaoSupport
      extended by org.pentaho.platform.engine.security.userroledao.hibernate.sample.SampleUsersAndRolesInitHandler
All Implemented Interfaces:
HibernateUserRoleDao.InitHandler

public class SampleUsersAndRolesInitHandler
extends 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

Constructor Summary
SampleUsersAndRolesInitHandler()
           
 
Method Summary
 void handleInit()
           
 void setUserRoleDao(IUserRoleDao userRoleDao)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleUsersAndRolesInitHandler

public SampleUsersAndRolesInitHandler()
Method Detail

handleInit

public void handleInit()
Specified by:
handleInit in interface HibernateUserRoleDao.InitHandler

setUserRoleDao

public void setUserRoleDao(IUserRoleDao userRoleDao)