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=========================================================
21 package org.openecomp.sdcrests.vsp.rest.services;
23 import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.GENERAL_COMPONENT_ID;
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 {
42 private ComponentProcesses componentProcesses;
45 public Response list(String vspId, String version, String user) {
46 return componentProcesses.list(vspId, GENERAL_COMPONENT_ID, version, user);
50 public Response deleteList(String vspId, String user) {
51 return componentProcesses.deleteList(vspId, GENERAL_COMPONENT_ID, user);
55 public Response create(ProcessRequestDto request, String vspId, String user) {
56 return componentProcesses.create(request, vspId, GENERAL_COMPONENT_ID, user);
60 public Response get(String vspId, String processId, String version, String user) {
61 return componentProcesses.get(vspId, GENERAL_COMPONENT_ID, processId, version, user);
65 public Response delete(String vspId, String processId, String user) {
66 return componentProcesses.delete(vspId, GENERAL_COMPONENT_ID, processId, user);
70 public Response update(ProcessRequestDto request, String vspId, String processId, String user) {
71 return componentProcesses.update(request, vspId, GENERAL_COMPONENT_ID, processId, user);
75 public Response getUploadedFile(String vspId, String processId, String version, String user) {
76 return componentProcesses
77 .getUploadedFile(vspId, GENERAL_COMPONENT_ID, processId, version, user);
81 public Response deleteUploadedFile(String vspId, String processId, String user) {
82 return componentProcesses.deleteUploadedFile(vspId, GENERAL_COMPONENT_ID, processId, user);
86 public Response uploadFile(Attachment attachment, String vspId, String processId, String user) {
87 return componentProcesses.uploadFile(attachment, vspId, GENERAL_COMPONENT_ID, processId, user);