Class SystemController

java.lang.Object
org.qubership.atp.environments.service.rest.server.SystemController

@RequestMapping("/api") @RestController public class SystemController extends Object
  • Constructor Details

  • Method Details

    • getAll

      @GetMapping("/systems") public List<System> getAll()
    • getCachedVersion

      @GetMapping("/public/v1/systems/{systemId}/version") public org.springframework.http.ResponseEntity getCachedVersion(@PathVariable("systemId") UUID id)
      TODO Make javadoc documentation for this method.
    • getSystem

      @GetMapping("/systems/{systemId}") public org.springframework.http.ResponseEntity<System> getSystem(@PathVariable("systemId") UUID id)
      TODO Make javadoc documentation for this method.
    • getShortSystem

      @GetMapping("/systems/short/{systemId}") @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#id),\'READ\')") public org.springframework.http.ResponseEntity<System> getShortSystem(@PathVariable("systemId") UUID id)
      TODO Make javadoc documentation for this method.
    • getSystemByName

      @GetMapping("/systems/byName/{environmentId}/{name}") @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#environmentId),\'READ\')") public org.springframework.http.ResponseEntity<System> getSystemByName(@PathVariable("environmentId") UUID environmentId, @PathVariable("name") String name)
      TODO Make javadoc documentation for this method.
    • getSystemV2

      @GetMapping("/v2/systems/{systemId}") public org.springframework.http.ResponseEntity<System> getSystemV2(@PathVariable("systemId") UUID id)
      Getting a system with the ability to expand information on the environments and system categories.
    • getSystemConnections

      @GetMapping("/systems/{systemId}/connections") public List<Connection> getSystemConnections(@PathVariable("systemId") UUID uuid)
    • getAllSystems

      @GetMapping("/systems/short") public List<System> getAllSystems()
      Endpoint for getting list of systems on all projects in abbreviated form ({"id":"","name":"","environmentIds":[]}).
    • createSystem

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#system.getEnvironmentId()),\'CREATE\')") @PostMapping("/systems") public System createSystem(@RequestBody CreateSystemDto system)
      Creating new system.
    • copy

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#system.getEnvironmentId()),\'CREATE\')") @PostMapping("/systems/{systemId}/copy") public System copy(@PathVariable("systemId") UUID id, @RequestBody CreateSystemDto system)
      Copying the system.
    • share

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#id),\'UPDATE\')") @PutMapping("/systems/{systemId}/share") public org.springframework.http.ResponseEntity<System> share(@PathVariable("systemId") UUID id, @RequestBody SharingRequestDto sharingRequestDto, @RequestParam(value="modified",required=false) Long modified)
      Sharing the system.
    • openshiftUpdateRoutes

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#system.getEnvironmentId()),\'UPDATE\')") @PutMapping("/systems/openshift") public List<Connection> openshiftUpdateRoutes(@RequestBody CreateSystemDto system)
      Updating the openshift routes.
    • updateSystem

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#systemDto.getId()),\'UPDATE\')") @PutMapping("/systems") public org.springframework.http.ResponseEntity<System> updateSystem(@RequestBody SystemDto systemDto)
      Updating the system.
    • deleteSystem

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#environmentId),\'DELETE\')") @DeleteMapping("/systems/{systemId}") @ResponseStatus(NO_CONTENT) public void deleteSystem(@PathVariable("systemId") UUID id, @RequestParam("environmentId") UUID environmentId)
      Deleting the system.
    • deleteLinkedSystems

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#environmentId),\'DELETE\')") @DeleteMapping("/systems/link/{systemId}/{environmentId}") @ResponseStatus(NO_CONTENT) public void deleteLinkedSystems(@PathVariable("systemId") UUID systemId, @PathVariable("environmentId") UUID environmentId)
      Deleting the system.
    • saveStatusAndDateOfLastCheck

      public System saveStatusAndDateOfLastCheck(UUID id, Status status)
    • updateVersion

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#id),\'UPDATE\')") @GetMapping("/systems/{systemId}/version") public org.springframework.http.ResponseEntity<System> updateVersion(@PathVariable("systemId") UUID id)
      TODO Make javadoc documentation for this method.
    • getHtmlVersion

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#id),\'UPDATE\')") @RequestMapping(value="/systems/{systemId}/htmlVersion", method=GET, produces="text/plain") public org.springframework.http.ResponseEntity<String> getHtmlVersion(@PathVariable("systemId") UUID id)
      Get version with HTML-marking.
    • getPublicHtmlVersion

      @RequestMapping(value="/public/v1/systems/{systemId}/htmlVersion", method=GET, produces="text/plain") public org.springframework.http.ResponseEntity<String> getPublicHtmlVersion(@PathVariable("systemId") UUID systemId)
      Get version with HTML-marking without authorization.
    • updateParametersGettingVersion

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#systemId),\'UPDATE\')") @PutMapping("/systems/{systemId}/parametersGettingVersion") public System updateParametersGettingVersion(@PathVariable("systemId") UUID systemId, @RequestBody ParametersGettingVersion parametersGettingVersion)
    • synchronizeServicesFromKubernetes

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#environmentId),\'CREATE\')") @PostMapping("/systems/kubeServices/{environmentId}/{systemId}") public List<System> synchronizeServicesFromKubernetes(@PathVariable("systemId") UUID systemId, @PathVariable("environmentId") UUID environmentId, @RequestBody SynchronizeCloudServicesRequest request)
      synchronizing managed services for Kubernetes.
    • updateServicesFromKubernetes

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#systemId),\'UPDATE\')") @GetMapping("/systems/kubeServices/{systemId}") public List<System> updateServicesFromKubernetes(@PathVariable("systemId") UUID systemId)
    • synchronizeServicesFromOpenShift

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdByEnvironmentId(#environmentId),\'CREATE\')") @PostMapping("/systems/openshiftServices/{environmentId}/{systemId}") public List<System> synchronizeServicesFromOpenShift(@PathVariable("systemId") UUID systemId, @PathVariable("environmentId") UUID environmentId, @RequestBody SynchronizeCloudServicesRequest request)
      synchronizing managed services for OpenShift.
    • updateServicesFromOpenshift

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.environments.enums.UserManagementEntities).SYSTEM.getName(),@environmentService.getProjectIdBySystemId(#systemId),\'UPDATE\')") @GetMapping("/systems/openshiftServices/{systemId}") public List<System> updateServicesFromOpenshift(@PathVariable("systemId") UUID systemId)
    • getKubernetesServiceNames

      @GetMapping("/systems/shortKubeServices/{systemId}") public List<ShortExternalService> getKubernetesServiceNames(@PathVariable("systemId") UUID systemId)
    • getOpenshiftServiceNames

      @GetMapping("/systems/shortOpenshiftServices/{systemId}") public List<ShortExternalService> getOpenshiftServiceNames(@PathVariable("systemId") UUID systemId)
    • getLinkedCloudServices

      @GetMapping("/systems/link/{systemId}") public List<System> getLinkedCloudServices(@PathVariable("systemId") UUID systemId)