com.github.inspektr.audit.spi.support
Class ObjectCreationAuditActionResolver

java.lang.Object
  extended by com.github.inspektr.audit.spi.support.AbstractSuffixAwareAuditActionResolver
      extended by com.github.inspektr.audit.spi.support.ObjectCreationAuditActionResolver
All Implemented Interfaces:
AuditActionResolver

public final class ObjectCreationAuditActionResolver
extends AbstractSuffixAwareAuditActionResolver

Uses the success/failure suffixes when an object is returned (or NULL is returned)

Version:
$Revision$ $Date$, 1.0
Author:
Scott Battaglia

Constructor Summary
ObjectCreationAuditActionResolver(String successSuffix, String failureSuffix)
          Constructs the ObjectCreationAuditActionResolver with a success suffix and failure suffix.
 
Method Summary
 String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, Exception exception, Audit audit)
          Resolve the action for the audit event that has incurred an exception.
 String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, Object retval, Audit audit)
          Resolve the action for the audit event.
 
Methods inherited from class com.github.inspektr.audit.spi.support.AbstractSuffixAwareAuditActionResolver
getFailureSuffix, getSuccessSuffix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectCreationAuditActionResolver

public ObjectCreationAuditActionResolver(String successSuffix,
                                         String failureSuffix)
Constructs the ObjectCreationAuditActionResolver with a success suffix and failure suffix. CANNOT be NULL.

Parameters:
successSuffix - the suffix to use in the event of a success.
failureSuffix - the suffix to use in the event of a failure.
Method Detail

resolveFrom

public String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget,
                          Object retval,
                          Audit audit)
Description copied from interface: AuditActionResolver
Resolve the action for the audit event.

retval - The returned value
audit - the Audit annotation that may contain additional information.
Returns:
The resource String

resolveFrom

public String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget,
                          Exception exception,
                          Audit audit)
Description copied from interface: AuditActionResolver
Resolve the action for the audit event that has incurred an exception.

exception - The exception incurred when the join point proceeds.
audit - the Audit annotation that may contain additional information.
Returns:
The resource String


Copyright © 2007-2012 Rutgers, the State University of New Jersey. All Rights Reserved.