Class ReturnValueAsStringResourceResolver
- java.lang.Object
-
- org.apereo.inspektr.audit.spi.support.ReturnValueAsStringResourceResolver
-
- All Implemented Interfaces:
AuditResourceResolver
- Direct Known Subclasses:
MessageBundleAwareResourceResolver,ShortenedReturnValueAsStringAuditResourceResolver
public class ReturnValueAsStringResourceResolver extends java.lang.Object implements AuditResourceResolver
Implementation ofAuditResourceResolverthat uses the toString version of the return value as the resource.- Since:
- 1.0
- Author:
- Scott Battaglia
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditTrailManager.AuditFormatsauditFormatprotected java.util.function.Function<java.lang.String[],java.lang.String[]>resourcePostProcessor
-
Constructor Summary
Constructors Constructor Description ReturnValueAsStringResourceResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringpostProcess(java.lang.String value)java.lang.String[]resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Exception exception)Resolve the auditable resource for an audit-able action that has incurred an exception.java.lang.String[]resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Object retval)Resolve the auditable resource.voidsetAuditFormat(AuditTrailManager.AuditFormats auditFormat)voidsetResourcePostProcessor(java.util.function.Function<java.lang.String[],java.lang.String[]> resourcePostProcessor)java.lang.StringtoResourceString(java.lang.Object arg)
-
-
-
Field Detail
-
auditFormat
protected AuditTrailManager.AuditFormats auditFormat
-
resourcePostProcessor
protected java.util.function.Function<java.lang.String[],java.lang.String[]> resourcePostProcessor
-
-
Method Detail
-
setAuditFormat
public void setAuditFormat(AuditTrailManager.AuditFormats auditFormat)
- Specified by:
setAuditFormatin interfaceAuditResourceResolver
-
setResourcePostProcessor
public void setResourcePostProcessor(java.util.function.Function<java.lang.String[],java.lang.String[]> resourcePostProcessor)
-
resolveFrom
public java.lang.String[] resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Object retval)Description copied from interface:AuditResourceResolverResolve the auditable resource.- Specified by:
resolveFromin interfaceAuditResourceResolver- Parameters:
auditableTarget- the join point that contains the arguments.retval- The returned value- Returns:
- The resource String.
-
resolveFrom
public java.lang.String[] resolveFrom(org.aspectj.lang.JoinPoint auditableTarget, java.lang.Exception exception)Description copied from interface:AuditResourceResolverResolve the auditable resource for an audit-able action that has incurred an exception.- Specified by:
resolveFromin interfaceAuditResourceResolver- Parameters:
auditableTarget- the join point that contains the arguments.exception- The exception incurred when the join point proceeds.- Returns:
- The resource String.
-
toResourceString
public java.lang.String toResourceString(java.lang.Object arg)
-
postProcess
protected java.lang.String postProcess(java.lang.String value)
-
-