import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic;
import org.openecomp.sdc.be.config.BeEcompErrorManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
import org.openecomp.sdc.be.config.BeEcompErrorManager;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.log.wrappers.Logger;
import org.openecomp.sdc.exception.ResponseFormat;
@Servers({@Server(url = "/sdc2/rest")})
@Controller
public class AdditionalInformationServlet extends BeGenericServlet {
@Servers({@Server(url = "/sdc2/rest")})
@Controller
public class AdditionalInformationServlet extends BeGenericServlet {
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response createResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "Additional information key value to be created", required = true) String data,
public Response createResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "Additional information key value to be created", required = true) String data,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response createServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "Additional information key value to be created", required = true) String data,
public Response createServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "Additional information key value to be created", required = true) String data,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response updateResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId,
public Response updateResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response updateServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId,
public Response updateServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response updateResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
public Response updateResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response deleteServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
public Response deleteServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response getResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
public Response getResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response getServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
public Response getServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Parameter(description = "label id", required = true) @PathParam("labelId") final String labelId, @Context final HttpServletRequest request,
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response getAllResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
public Response getAllResourceAdditionalInformationLabel(
@Parameter(description = "resource id to update with new property", required = true) @PathParam("resourceId") final String resourceId,
@Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
@ApiResponse(responseCode = "403", description = "Restricted operation"),
@ApiResponse(responseCode = "400", description = "Invalid content / Missing content"),
@ApiResponse(responseCode = "409", description = "Additional information key already exist")})
public Response getAllServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
public Response getAllServiceAdditionalInformationLabel(
@Parameter(description = "service id to update with new property", required = true) @PathParam("serviceId") final String serviceId,
@Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {