<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(service.iris_audit.qualified_interceptor_impl_name) %>;

@javax.annotation.Generated( "Domgen" )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings( { "UPM_UNCALLED_PRIVATE_METHOD", "CLI_CONSTANT_LIST_INDEX" } )
@javax.interceptor.Interceptor
@javax.annotation.Priority( iris.audit.server.service.AbstractLoggingInterceptor.PRIORITY )
public class <%= service.iris_audit.interceptor_impl_name %>
  extends iris.audit.server.service.AbstractLoggingInterceptor
{
  @javax.inject.Inject
  private iris.audit.server.service.AuditService _auditService;
  @javax.inject.Inject
  private iris.audit.server.service.AuditContext _context;
<% if service.jackson? -%>
  private transient final com.fasterxml.jackson.databind.ObjectMapper _jsonMapper = new com.fasterxml.jackson.databind.ObjectMapper();

  private javax.json.JsonValue toJsonValue( final Throwable throwable )
  {
    try
    {
      return javax.json.Json.createReader( new java.io.StringReader( _jsonMapper.writeValueAsString( throwable ) ) ).read();
    }
    catch ( final Throwable ignored )
    {
      return javax.json.Json.createObjectBuilder().add( "type", throwable.getClass().getName() ).add( "message", throwable.getMessage() ).build();
    }
  }

  private javax.json.JsonValue toJsonValue( final Object object )
  {
    try
    {
      return javax.json.Json.createReader( new java.io.StringReader( _jsonMapper.writeValueAsString( object ) ) ).read();
    }
    catch ( final Throwable ignored )
    {
      return javax.json.JsonValue.NULL;
    }
  }

<% end -%>

  @javax.annotation.Nonnull
  @java.lang.Override
  protected iris.audit.server.service.AuditService getAuditService()
  {
    return _auditService;
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected iris.audit.server.service.AuditContext getAuditContext()
  {
    return _context;
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected String getJobTypeName( @javax.annotation.Nonnull final javax.interceptor.InvocationContext context )
  {
    return "<%= service.name %>." + super.getJobTypeName( context );
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected String describeCall( @javax.annotation.Nonnull final java.lang.reflect.Method method,<commit_msg>Supress CC_CYCLOMATIC_COMPLEXITY check. Case statement in describeCall can get large<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(service.iris_audit.qualified_interceptor_impl_name) %>;

@javax.annotation.Generated( "Domgen" )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings( { "UPM_UNCALLED_PRIVATE_METHOD", "CLI_CONSTANT_LIST_INDEX", "CC_CYCLOMATIC_COMPLEXITY" } )
@javax.interceptor.Interceptor
@javax.annotation.Priority( iris.audit.server.service.AbstractLoggingInterceptor.PRIORITY )
public class <%= service.iris_audit.interceptor_impl_name %>
  extends iris.audit.server.service.AbstractLoggingInterceptor
{
  @javax.inject.Inject
  private iris.audit.server.service.AuditService _auditService;
  @javax.inject.Inject
  private iris.audit.server.service.AuditContext _context;
<% if service.jackson? -%>
  private transient final com.fasterxml.jackson.databind.ObjectMapper _jsonMapper = new com.fasterxml.jackson.databind.ObjectMapper();

  private javax.json.JsonValue toJsonValue( final Throwable throwable )
  {
    try
    {
      return javax.json.Json.createReader( new java.io.StringReader( _jsonMapper.writeValueAsString( throwable ) ) ).read();
    }
    catch ( final Throwable ignored )
    {
      return javax.json.Json.createObjectBuilder().add( "type", throwable.getClass().getName() ).add( "message", throwable.getMessage() ).build();
    }
  }

  private javax.json.JsonValue toJsonValue( final Object object )
  {
    try
    {
      return javax.json.Json.createReader( new java.io.StringReader( _jsonMapper.writeValueAsString( object ) ) ).read();
    }
    catch ( final Throwable ignored )
    {
      return javax.json.JsonValue.NULL;
    }
  }

<% end -%>

  @javax.annotation.Nonnull
  @java.lang.Override
  protected iris.audit.server.service.AuditService getAuditService()
  {
    return _auditService;
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected iris.audit.server.service.AuditContext getAuditContext()
  {
    return _context;
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected String getJobTypeName( @javax.annotation.Nonnull final javax.interceptor.InvocationContext context )
  {
    return "<%= service.name %>." + super.getJobTypeName( context );
  }


  @javax.annotation.Nonnull
  @java.lang.Override
  protected String describeCall( @javax.annotation.Nonnull final java.lang.reflect.Method method,
{'fraction_non_alphanumeric': 0.11439425918108907, 'fraction_numerical': 0.0, 'mean_word_length': 4.330708661417323, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5560431', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1503, 'n_words': 253}