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

JACCPreUpdateEventListener

public class JACCPreUpdateEventListener extends Object implements org.hibernate.event.Initializable, org.hibernate.event.PreUpdateEventListener, JACCSecurityListener
Check security before any update
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 booleanonPreUpdate(org.hibernate.event.PreUpdateEvent event)


		EJBMethodPermission updatePermission = new EJBMethodPermission(
				event.getPersister().getEntityName(),
				HibernatePermission.UPDATE,
				null,
				null
		);

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

		return false;