Class FirstParameterAuditResourceResolver
- java.lang.Object
-
- org.apereo.inspektr.audit.spi.support.FirstParameterAuditResourceResolver
-
- All Implemented Interfaces:
AuditResourceResolver
public class FirstParameterAuditResourceResolver extends java.lang.Object implements AuditResourceResolver
Converts the first argument object into a String resource identifier. If the resource string is set, it will return the argument values into a list, prefixed by the string. otherwise simply returns the argument value as a string.- Author:
- Scott Battaglia, Misagh Moayyed
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.Function<java.lang.String[],java.lang.String[]>resourcePostProcessor
-
Constructor Summary
Constructors Constructor Description FirstParameterAuditResourceResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]resolveFrom(org.aspectj.lang.JoinPoint joinPoint, 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 joinPoint, java.lang.Object retval)Resolve the auditable resource.voidsetAuditFormat(AuditTrailManager.AuditFormats auditFormat)voidsetResourcePostProcessor(java.util.function.Function<java.lang.String[],java.lang.String[]> resourcePostProcessor)voidsetResourceString(java.lang.String resourceString)java.lang.StringtoResourceString(java.lang.Object arg)
-
-
-
Method Detail
-
setResourceString
public void setResourceString(java.lang.String resourceString)
-
setResourcePostProcessor
public void setResourcePostProcessor(java.util.function.Function<java.lang.String[],java.lang.String[]> resourcePostProcessor)
-
setAuditFormat
public void setAuditFormat(AuditTrailManager.AuditFormats auditFormat)
- Specified by:
setAuditFormatin interfaceAuditResourceResolver
-
resolveFrom
public java.lang.String[] resolveFrom(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retval)Description copied from interface:AuditResourceResolverResolve the auditable resource.- Specified by:
resolveFromin interfaceAuditResourceResolver- Parameters:
joinPoint- 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 joinPoint, 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:
joinPoint- 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)
-
-