2 * Copyright © 2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openecomp.sdcrests.item.rest;
18 import io.swagger.annotations.Api;
19 import io.swagger.annotations.ApiOperation;
20 import org.openecomp.sdcrests.item.types.ItemActionRequestDto;
21 import org.springframework.validation.annotation.Validated;
23 import javax.validation.constraints.NotNull;
25 import javax.ws.rs.core.MediaType;
26 import javax.ws.rs.core.Response;
28 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
29 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
32 @Produces(MediaType.APPLICATION_JSON)
33 @Consumes(MediaType.APPLICATION_JSON)
36 public interface Items {
40 @ApiOperation(value = "Get details of a item")
41 Response getItem(@PathParam("itemId") String itemId,
42 @NotNull(message = USER_MISSING_ERROR_MSG)
43 @HeaderParam(USER_ID_HEADER_PARAM) String user);
46 @Path("/{itemId}/actions")
47 @ApiOperation(value = "Acts on item version")
48 Response actOn(ItemActionRequestDto request,
49 @PathParam("itemId") String itemId,
50 @NotNull(message = USER_MISSING_ERROR_MSG)
51 @HeaderParam(USER_ID_HEADER_PARAM) String user);