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 org.apache.cxf.jaxrs.ext.multipart.Attachment;
24 import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessRequestDto;
25 import org.openecomp.sdcrests.vsp.rest.ComponentProcesses;
26 import org.openecomp.sdcrests.vsp.rest.Processes;
27 import org.springframework.beans.factory.annotation.Autowired;
28 import org.springframework.context.annotation.Scope;
29 import org.springframework.stereotype.Service;
31 import javax.inject.Named;
32 import javax.ws.rs.core.Response;
36 @Scope(value = "prototype")
37 public class ProcessesImpl implements Processes {
40 private ComponentProcesses componentProcesses;
43 public Response list(String vspId, String versionId, String user) {
44 return componentProcesses.list(vspId, versionId, null, user);
48 public Response deleteList(String vspId, String versionId, String user) {
49 return componentProcesses.deleteList(vspId, versionId, null, user);
53 public Response create(ProcessRequestDto request, String vspId, String versionId, String user) {
54 return componentProcesses.create(request, vspId, versionId, null, user);
58 public Response get(String vspId, String versionId, String processId, String user) {
59 return componentProcesses.get(vspId, versionId, null, processId, user);
63 public Response delete(String vspId, String versionId, String processId, String user) {
64 return componentProcesses.delete(vspId, versionId, null, processId, user);
68 public Response update(ProcessRequestDto request, String vspId, String versionId,
69 String processId, String user) {
70 return componentProcesses.update(request, vspId, versionId, null, processId, user);
74 public Response getUploadedFile(String vspId, String versionId, String processId, String user) {
75 return componentProcesses.getUploadedFile(vspId, versionId, null, processId, user);
79 public Response deleteUploadedFile(String vspId, String versionId, String processId,
81 return componentProcesses.deleteUploadedFile(vspId, versionId, null, processId, user);
85 public Response uploadFile(Attachment attachment, String vspId, String versionId,
86 String processId, String user) {
87 return componentProcesses.uploadFile(attachment, vspId, versionId, null, processId, user);