org.springframework.cloud.dataflow.server.controller

## Class AuditRecordController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.AuditRecordController

-     @RestController
       @RequestMapping(value="/audit-records")
       @ExposesResourceFor(value=AuditRecordResource.class)
      public class AuditRecordController
      extends Object

  Controller for retrieving `AuditRecord`s.
  Author:
    Gunnar Hillert, Daniel Serleg

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuditRecordController(org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService)` Create a `AuditController` that delegates to `AuditRecordService`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuditRecordResource` | `display(Long id)` Return a given `AuditRecordResource`.
    `AuditActionType[]` | `getAuditActionTypes()` Return an array of `AuditActionType`s.
    `AuditOperationType[]` | `getAuditOperationTypes()` Return an array of `AuditOperationType`s.
    `org.springframework.hateoas.PagedModel<AuditRecordResource>` | `list(org.springframework.data.domain.Pageable pageable, AuditActionType[] actions, AuditOperationType[] operations, String fromDate, String toDate, org.springframework.data.web.PagedResourcesAssembler<AuditRecord> assembler)` Return a page-able list of `AuditRecordResource`s.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AuditRecordController

          public AuditRecordController(org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService)

      Create a `AuditController` that delegates to `AuditRecordService`.
      Parameters:
        `auditRecordService` - the audit record service to use

  - ### Method Detail

    - #### list

          @RequestMapping(value="",
                          method=GET)
           @ResponseStatus(value=OK)
          public org.springframework.hateoas.PagedModel<AuditRecordResource> list(org.springframework.data.domain.Pageable pageable,
                                                                                                                                                                   @RequestParam(required=false)
                                                                                                                                                                   AuditActionType[] actions,
                                                                                                                                                                   @RequestParam(required=false)
                                                                                                                                                                   AuditOperationType[] operations,
                                                                                                                                                                   @RequestParam(required=false)
                                                                                                                                                                   String fromDate,
                                                                                                                                                                   @RequestParam(required=false)
                                                                                                                                                                   String toDate,
                                                                                                                                                                   org.springframework.data.web.PagedResourcesAssembler<AuditRecord> assembler)

      Return a page-able list of `AuditRecordResource`s.
      Parameters:
        `pageable` - Pagination information
        `assembler` - assembler for `AuditRecord`
        `actions` - Optional. For which `AuditActionType`s do you want to retrieve `AuditRecord`s
        `fromDate` - Optional. The fromDate must be `DateTimeFormatter`.ISO_DATE_TIME formatted. eg.: 2019-02-03T00:00:30
        `toDate` - Optional. The toDate must be `DateTimeFormatter`.ISO_DATE_TIME formatted. eg.: 2019-02-05T23:59:30
        `operations` - Optional. For which `AuditOperationType`s do you want to retrieve `AuditRecord`s
      Returns:
        list of audit records

    - #### display

          @RequestMapping(value="/{id}",
                          method=GET)
           @ResponseStatus(value=OK)
          public AuditRecordResource display(@PathVariable(value="id")
                                                                                                                                   Long id)

      Return a given `AuditRecordResource`.
      Parameters:
        `id` - the id of an existing audit record (required)
      Returns:
        the audit record or null if the audit record does not exist

    - #### getAuditOperationTypes

          @RequestMapping(value="/audit-operation-types",
                          method=GET)
           @ResponseStatus(value=OK)
          public AuditOperationType[] getAuditOperationTypes()

      Return an array of `AuditOperationType`s.
      Returns:
        Array of AuditOperationTypes

    - #### getAuditActionTypes

          @RequestMapping(value="/audit-action-types",
                          method=GET)
           @ResponseStatus(value=OK)
          public AuditActionType[] getAuditActionTypes()

      Return an array of `AuditActionType`s.
      Returns:
        Array of AuditActionTypes

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.