Class HistoryController

java.lang.Object
org.qubership.atp.environments.service.rest.server.HistoryController
All Implemented Interfaces:
HistoryControllerApi

@RestController public class HistoryController extends Object implements HistoryControllerApi
  • Constructor Details

  • Method Details

    • getAllHistory

      @PreAuthorize("@entityAccess.checkAccess(#projectId,\'READ\')") public org.springframework.http.ResponseEntity<HistoryItemResponseDtoGenerated> getAllHistory(@PathVariable("projectId") UUID projectId, @PathVariable("itemType") String itemType, @PathVariable("id") UUID entityId, @Valid @RequestParam(value="offset",required=false,defaultValue="0") @Valid Integer offset, @Valid @RequestParam(value="limit",required=false,defaultValue="10") @Valid Integer limit)
      Description copied from interface: HistoryControllerApi
      GET /api/history/{projectId}/{itemType}/{id} : finds all changes history for defined object
      Specified by:
      getAllHistory in interface HistoryControllerApi
      Parameters:
      projectId - (required)
      itemType - (required)
      entityId - (required)
      offset - (optional, default to 0)
      limit - (optional, default to 10)
      Returns:
      OK (status code 200) or History for Entity type = '\" + itemType + \"' is not supported (status code 400) or Entity Id not found (status code 404)
    • getEntitiesByVersion

      @PreAuthorize("@entityAccess.checkAccess(#projectId,\'READ\')") public org.springframework.http.ResponseEntity<List<CompareEntityResponseDtoGenerated>> getEntitiesByVersion(@PathVariable("projectId") UUID projectId, @PathVariable("itemType") String itemType, @PathVariable("id") UUID entityId, @PathVariable("revisionIds") List<String> revisionIds)
      Description copied from interface: HistoryControllerApi
      GET /api/history/version/{projectId}/{itemType}/{id}/revision/{revisionIds} : finds all entity's states for provided version ids
      Specified by:
      getEntitiesByVersion in interface HistoryControllerApi
      Parameters:
      projectId - (required)
      itemType - (required)
      entityId - (required)
      revisionIds - (required)
      Returns:
      OK (status code 200) or Versioning for Entity type = '\" + itemType + \"' is not supported (status code 400) or Entity Id not found (status code 404)
    • restoreToRevision

      @PreAuthorize("@entityAccess.checkAccess(#projectId,\'UPDATE\')") public org.springframework.http.ResponseEntity<Void> restoreToRevision(@PathVariable("projectId") UUID projectId, @PathVariable("itemType") String itemType, @PathVariable("id") UUID entityId, @PathVariable("revisionId") Integer revisionId)
      Description copied from interface: HistoryControllerApi
      POST /api/history/restore/{projectId}/{itemType}/{id}/revision/{revisionId} : Restore the state of the provided entity to defined revision
      Specified by:
      restoreToRevision in interface HistoryControllerApi
      Parameters:
      projectId - (required)
      itemType - (required)
      entityId - (required)
      revisionId - (required)
      Returns:
      Revision was restored successfully (status code 200) or Restore for Entity type = '\" + itemType + \"' is not supported (status code 400) or Forbidden (status code 403) or Entity Id not found (status code 404) or Revision was not restored. Reference to the one of the systems is invalid. (status code 500)