Class DefaultAuditActionResolver
- java.lang.Object
-
- org.apereo.inspektr.audit.spi.support.AbstractSuffixAwareAuditActionResolver
-
- org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver
-
- All Implemented Interfaces:
AuditActionResolver
public class DefaultAuditActionResolver extends AbstractSuffixAwareAuditActionResolver
Default resolver. If a suffix is defined for success and failure, the failure suffix is appended if an exception is thrown. Otherwise, the success suffix is used.- Since:
- 1.0
- Author:
- Scott Battaglia
-
-
Constructor Summary
Constructors Constructor Description DefaultAuditActionResolver()Constructs the resolver with empty values for the two suffixes.DefaultAuditActionResolver(java.lang.String successSuffix)Constructs theDefaultAuditActionResolverwith a success suffix.DefaultAuditActionResolver(java.lang.String successSuffix, java.lang.String failureSuffix)Constructs theDefaultAuditActionResolverwith a success suffix and failure suffix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringresolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Exception exception, Audit audit)Resolve the action for the audit event that has incurred an exception.java.lang.StringresolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Object retval, Audit audit)Resolve the action for the audit event.-
Methods inherited from class org.apereo.inspektr.audit.spi.support.AbstractSuffixAwareAuditActionResolver
getFailureSuffix, getSuccessSuffix
-
-
-
-
Constructor Detail
-
DefaultAuditActionResolver
public DefaultAuditActionResolver()
Constructs the resolver with empty values for the two suffixes.
-
DefaultAuditActionResolver
public DefaultAuditActionResolver(java.lang.String successSuffix)
Constructs theDefaultAuditActionResolverwith a success suffix.- Parameters:
successSuffix- the suffix to use in the event of a success.
-
DefaultAuditActionResolver
public DefaultAuditActionResolver(java.lang.String successSuffix, java.lang.String failureSuffix)Constructs theDefaultAuditActionResolverwith 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 java.lang.String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Object retval, Audit audit)Description copied from interface:AuditActionResolverResolve the action for the audit event.retval- The returned valueaudit- the Audit annotation that may contain additional information.- Returns:
- The resource String
-
resolveFrom
public java.lang.String resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Exception exception, Audit audit)Description copied from interface:AuditActionResolverResolve 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
-
-