DDI resource - remove dupplicated annotations (MgmtDownloadArtifactRest) (#2064)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -34,6 +34,7 @@ public interface MgmtDownloadArtifactRestApi {
|
|||||||
*/
|
*/
|
||||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}/download")
|
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}/download")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") Long softwareModuleId,
|
ResponseEntity<InputStream> downloadArtifact(
|
||||||
|
@PathVariable("softwareModuleId") Long softwareModuleId,
|
||||||
@PathVariable("artifactId") Long artifactId);
|
@PathVariable("artifactId") Long artifactId);
|
||||||
}
|
}
|
||||||
@@ -30,13 +30,9 @@ import org.springframework.context.annotation.Scope;
|
|||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@RestController
|
@RestController
|
||||||
@Scope(value = WebApplicationContext.SCOPE_REQUEST)
|
@Scope(value = WebApplicationContext.SCOPE_REQUEST)
|
||||||
public class MgmtDownloadArtifactResource implements MgmtDownloadArtifactRestApi {
|
public class MgmtDownloadArtifactResource implements MgmtDownloadArtifactRestApi {
|
||||||
@@ -55,8 +51,8 @@ public class MgmtDownloadArtifactResource implements MgmtDownloadArtifactRestApi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<InputStream> downloadArtifact(
|
public ResponseEntity<InputStream> downloadArtifact(
|
||||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
final Long softwareModuleId,
|
||||||
@PathVariable("artifactId") final Long artifactId) {
|
final Long artifactId) {
|
||||||
final SoftwareModule module = softwareModuleManagement.get(softwareModuleId)
|
final SoftwareModule module = softwareModuleManagement.get(softwareModuleId)
|
||||||
.orElseThrow(() -> new EntityNotFoundException(SoftwareModule.class, softwareModuleId));
|
.orElseThrow(() -> new EntityNotFoundException(SoftwareModule.class, softwareModuleId));
|
||||||
if (module.isDeleted()) {
|
if (module.isDeleted()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user