congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AuditUserApi.getAuditLogs
Code IndexAdd Tabnine to your IDE (free)

How to use
getAuditLogs
method
in
com.ning.billing.util.api.AuditUserApi

Best Java code snippets using com.ning.billing.util.api.AuditUserApi.getAuditLogs (Showing top 9 results out of 315)

origin: com.ning.billing/killbill-jaxrs

@GET
@Path("/{tagDefinitionId:" + UUID_PATTERN + "}")
@Produces(APPLICATION_JSON)
public Response getTagDefinition(@PathParam("tagDefinitionId") final String tagDefId,
                 @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode,
                 @javax.ws.rs.core.Context final HttpServletRequest request) throws TagDefinitionApiException {
  final TenantContext tenantContext = context.createContext(request);
  final TagDefinition tagDefinition = tagUserApi.getTagDefinition(UUID.fromString(tagDefId), tenantContext);
  final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tagDefinition.getId(), ObjectType.TAG_DEFINITION, auditMode.getLevel(), tenantContext);
  final TagDefinitionJson json = new TagDefinitionJson(tagDefinition, auditLogs);
  return Response.status(Status.OK).entity(json).build();
}
origin: com.ning.billing/killbill-jaxrs

@GET
@Path("/{refundId:" + UUID_PATTERN + "}")
@Produces(APPLICATION_JSON)
public Response getRefund(@PathParam("refundId") final String refundId,
             @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode,
             @javax.ws.rs.core.Context final HttpServletRequest request) throws PaymentApiException {
  final TenantContext tenantContext = context.createContext(request);
  final Refund refund = paymentApi.getRefund(UUID.fromString(refundId), false, tenantContext);
  final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(refund.getId(), ObjectType.REFUND, auditMode.getLevel(), tenantContext);
  // TODO Return adjusted items
  return Response.status(Status.OK).entity(new RefundJson(refund, null, auditLogs)).build();
}
origin: com.ning.billing/killbill-jaxrs

@GET
@Produces(APPLICATION_JSON)
public Response getTagDefinitions(@javax.ws.rs.core.Context final HttpServletRequest request,
                 @QueryParam(QUERY_AUDIT) @DefaultValue("NONE") final AuditMode auditMode) {
  final TenantContext tenantContext = context.createContext(request);
  final List<TagDefinition> tagDefinitions = tagUserApi.getTagDefinitions(tenantContext);
  final Collection<TagDefinitionJson> result = new LinkedList<TagDefinitionJson>();
  for (final TagDefinition tagDefinition : tagDefinitions) {
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tagDefinition.getId(), ObjectType.TAG_DEFINITION, auditMode.getLevel(), tenantContext);
    result.add(new TagDefinitionJson(tagDefinition, auditLogs));
  }
  return Response.status(Status.OK).entity(result).build();
}
origin: com.ning.billing/killbill-jaxrs

protected Response getCustomFields(final UUID id, final AuditMode auditMode, final TenantContext context) {
  final List<CustomField> fields = customFieldUserApi.getCustomFieldsForObject(id, getObjectType(), context);
  final List<CustomFieldJson> result = new LinkedList<CustomFieldJson>();
  for (final CustomField cur : fields) {
    // TODO PIERRE - Bulk API
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(cur.getId(), ObjectType.CUSTOM_FIELD, auditMode.getLevel(), context);
    result.add(new CustomFieldJson(cur, auditLogs));
  }
  return Response.status(Response.Status.OK).entity(result).build();
}
origin: com.ning.billing/killbill-jaxrs

  @Override
  public TagJson apply(final Tag tag) {
    final TagDefinition tagDefinition = tagDefinitionsCache.get(tag.getTagDefinitionId());
    // TODO Really slow - we should instead try to figure out the account id
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tag.getId(), ObjectType.TAG, auditMode.getLevel(), tenantContext);
    return new TagJson(tag, tagDefinition, auditLogs);
  }
},
origin: com.ning.billing/killbill-jaxrs

  @Override
  public CustomFieldJson apply(final CustomField customField) {
    // TODO Really slow - we should instead try to figure out the account id
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(customField.getId(), ObjectType.CUSTOM_FIELD, auditMode.getLevel(), tenantContext);
    return new CustomFieldJson(customField, auditLogs);
  }
},
origin: com.ning.billing/killbill-jaxrs

  @Override
  public TagJson apply(final Tag tag) {
    final TagDefinition tagDefinition = tagDefinitionsCache.get(tag.getTagDefinitionId());
    // TODO Really slow - we should instead try to figure out the account id
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(tag.getId(), ObjectType.TAG, auditMode.getLevel(), tenantContext);
    return new TagJson(tag, tagDefinition, auditLogs);
  }
},
origin: com.ning.billing/killbill-jaxrs

  @Override
  public CustomFieldJson apply(final CustomField customField) {
    // TODO Really slow - we should instead try to figure out the account id
    final List<AuditLog> auditLogs = auditUserApi.getAuditLogs(customField.getId(), ObjectType.CUSTOM_FIELD, auditMode.getLevel(), tenantContext);
    return new CustomFieldJson(customField, auditLogs);
  }
},
origin: com.ning.billing/killbill-util

  @Test(groups = "fast")
  public void testForObject() throws Exception {
    for (final ObjectType objectType : ObjectType.values()) {
      for (final UUID objectId : objectIds) {
        for (final AuditLevel level : AuditLevel.values()) {
          if (AuditLevel.NONE.equals(level)) {
            Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext).size(), 0);
          } else if (AuditLevel.MINIMAL.equals(level)) {
            Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext), ImmutableList.<AuditLog>of(auditLogs.get(0)));
          } else {
            Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext), auditLogs);
          }
        }
      }
    }
  }
}
com.ning.billing.util.apiAuditUserApigetAuditLogs

Javadoc

Get all the audit entries for a given object.

Popular methods of AuditUserApi

  • getAccountAuditLogs
    Retrieve all audit logs (for all objects) for a given account

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JPanel (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now