2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 * Modifications copyright (c) 2019 Nokia
20 * ================================================================================
23 package org.openecomp.sdcrests.vsp.rest.services;
25 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
26 import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessRequestDto;
27 import org.openecomp.sdcrests.vsp.rest.ComponentProcesses;
28 import org.openecomp.sdcrests.vsp.rest.Processes;
29 import org.springframework.beans.factory.annotation.Autowired;
30 import org.springframework.context.annotation.Scope;
31 import org.springframework.stereotype.Service;
33 import javax.inject.Named;
34 import javax.ws.rs.core.Response;
38 @Scope(value = "prototype")
39 public class ProcessesImpl implements Processes {
41 private final ComponentProcesses componentProcesses;
44 public ProcessesImpl(ComponentProcesses componentProcesses) {
45 this.componentProcesses = componentProcesses;
49 public Response list(String vspId, String versionId, String user) {
50 return componentProcesses.list(vspId, versionId, null, user);
54 public Response deleteList(String vspId, String versionId, String user) {
55 return componentProcesses.deleteList(vspId, versionId, null, user);
59 public Response create(ProcessRequestDto request, String vspId, String versionId, String user) {
60 return componentProcesses.create(request, vspId, versionId, null, user);
64 public Response get(String vspId, String versionId, String processId, String user) {
65 return componentProcesses.get(vspId, versionId, null, processId, user);
69 public Response delete(String vspId, String versionId, String processId, String user) {
70 return componentProcesses.delete(vspId, versionId, null, processId, user);
74 public Response update(ProcessRequestDto request, String vspId, String versionId,
75 String processId, String user) {
76 return componentProcesses.update(request, vspId, versionId, null, processId, user);
80 public Response getUploadedFile(String vspId, String versionId, String processId, String user) {
81 return componentProcesses.getUploadedFile(vspId, versionId, null, processId, user);
85 public Response deleteUploadedFile(String vspId, String versionId, String processId,
87 return componentProcesses.deleteUploadedFile(vspId, versionId, null, processId, user);
91 public Response uploadFile(Attachment attachment, String vspId, String versionId,
92 String processId, String user) {
93 return componentProcesses.uploadFile(attachment, vspId, versionId, null, processId, user);