Class 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  
    • 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.
      void setAuditFormat​(AuditTrailManager.AuditFormats auditFormat)  
      void setResourcePostProcessor​(java.util.function.Function<java.lang.String[],​java.lang.String[]> resourcePostProcessor)  
      void setResourceString​(java.lang.String resourceString)  
      java.lang.String toResourceString​(java.lang.Object arg)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resourcePostProcessor

        protected java.util.function.Function<java.lang.String[],​java.lang.String[]> resourcePostProcessor
    • Constructor Detail

      • FirstParameterAuditResourceResolver

        public FirstParameterAuditResourceResolver()
    • 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)
      • resolveFrom

        public java.lang.String[] resolveFrom​(org.aspectj.lang.JoinPoint joinPoint,
                                              java.lang.Object retval)
        Description copied from interface: AuditResourceResolver
        Resolve the auditable resource.
        Specified by:
        resolveFrom in interface AuditResourceResolver
        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: AuditResourceResolver
        Resolve the auditable resource for an audit-able action that has incurred an exception.
        Specified by:
        resolveFrom in interface AuditResourceResolver
        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)