FileDocCategorySizeDatePackage
JACCPreLoadEventListener.javaAPI DocHibernate 3.2.51064Tue Nov 29 11:34:30 GMT 2005org.hibernate.secure

JACCPreLoadEventListener

public class JACCPreLoadEventListener extends Object implements org.hibernate.event.Initializable, JACCSecurityListener, org.hibernate.event.PreLoadEventListener
Check security before any load
author
Kabir Khan
version
$Revision: 8702 $

Fields Summary
private String
contextID
Constructors Summary
Methods Summary
public voidinitialize(org.hibernate.cfg.Configuration cfg)

      contextID = cfg.getProperty(Environment.JACC_CONTEXTID);
   
public voidonPreLoad(org.hibernate.event.PreLoadEvent event)


		EJBMethodPermission loadPermission = new EJBMethodPermission(
				event.getPersister().getEntityName(),
				HibernatePermission.READ,
				null,
				null
		);

		JACCPermissions.checkPermission( event.getEntity().getClass(), contextID, loadPermission );