gov.nih.nci.caarray.util
Class CaArrayAuditLogProcessor

java.lang.Object
  extended by com.fiveamsolutions.nci.commons.audit.DefaultProcessor
      extended by gov.nih.nci.caarray.util.CaArrayAuditLogProcessor

public class CaArrayAuditLogProcessor
extends com.fiveamsolutions.nci.commons.audit.DefaultProcessor

Author:
gax

Method Summary
 java.util.Map<com.fiveamsolutions.nci.commons.audit.AuditLogRecord,java.util.Set<AuditLogSecurity>> getSecurityEntries()
          Returns a mapping of audit records with their associated security entries.
 boolean isAuditableEntity(java.lang.Object o)
          
 void postProcessDetail(org.hibernate.Session session, java.util.Collection<com.fiveamsolutions.nci.commons.audit.AuditLogRecord> records)
          This method is called for any post processing required after the work from processDetail has been saved.
 void processDetail(com.fiveamsolutions.nci.commons.audit.AuditLogRecord record, java.lang.Object entity, java.io.Serializable key, java.lang.String property, java.lang.String columnName, java.lang.Object oldVal, java.lang.Object newVal)
          
 
Methods inherited from class com.fiveamsolutions.nci.commons.audit.DefaultProcessor
escape, getAutitableClasses, getHibernateHelper, getId, isAuditableClass, isPersistent, newAuditLogRecord, processDetail, processDetailCollection, processDetailMap, processDetailObject, processDetailString, setHibernateHelper, unescape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isAuditableEntity

public boolean isAuditableEntity(java.lang.Object o)

Overrides:
isAuditableEntity in class com.fiveamsolutions.nci.commons.audit.DefaultProcessor

processDetail

public void processDetail(com.fiveamsolutions.nci.commons.audit.AuditLogRecord record,
                          java.lang.Object entity,
                          java.io.Serializable key,
                          java.lang.String property,
                          java.lang.String columnName,
                          java.lang.Object oldVal,
                          java.lang.Object newVal)

Overrides:
processDetail in class com.fiveamsolutions.nci.commons.audit.DefaultProcessor

postProcessDetail

public void postProcessDetail(org.hibernate.Session session,
                              java.util.Collection<com.fiveamsolutions.nci.commons.audit.AuditLogRecord> records)
This method is called for any post processing required after the work from processDetail has been saved. This method was added for ARRAY-1933, which required access to the session to save some security entries. However, this should be eventually incorporated into DefaultProcessor in nci-commons. See ARRAY-2496.

Parameters:
session - hibernate session
records - collection of audit records to process

getSecurityEntries

public java.util.Map<com.fiveamsolutions.nci.commons.audit.AuditLogRecord,java.util.Set<AuditLogSecurity>> getSecurityEntries()
Returns a mapping of audit records with their associated security entries. The security entries are created in the processDetail method, but not persisted. This map allows us to store the security object created in processDetail and retrieve them later to persist them to the database.

Returns:
map of AuditLogRecord to AuditLogSecurity entries