X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog-be%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdc%2Fbe%2Fservlets%2FAdditionalInformationServlet.java;h=25a86b9ccbee678e6e8953ce9c2902eb6932381a;hb=5f3e9912406897ee18c424b940881ce08d59bb44;hp=d9e5aed187e9cb8f7c4c5b7ead3199d10bba57aa;hpb=b1fc8c337d3b9750eff6e62b626c0bc3a1467a88;p=sdc.git diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java index d9e5aed187..25a86b9ccb 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java @@ -47,15 +47,12 @@ import javax.ws.rs.core.Context; 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.components.impl.aaf.AafPermission; -import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed; 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.user.UserBusinessLogic; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.log.wrappers.Logger; import org.openecomp.sdc.exception.ResponseFormat; @@ -63,7 +60,7 @@ import org.springframework.stereotype.Controller; @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") -@Tags({@Tag(name = "SDC Internal APIs")}) +@Tags({@Tag(name = "SDCE-2 APIs")}) @Servers({@Server(url = "/sdc2/rest")}) @Controller public class AdditionalInformationServlet extends BeGenericServlet { @@ -75,9 +72,9 @@ public class AdditionalInformationServlet extends BeGenericServlet { private final AdditionalInformationBusinessLogic businessLogic; @Inject - public AdditionalInformationServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, + public AdditionalInformationServlet(ComponentsUtils componentsUtils, AdditionalInformationBusinessLogic businessLogic) { - super(userBusinessLogic, componentsUtils); + super(componentsUtils); this.businessLogic = businessLogic; } @@ -98,7 +95,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -123,7 +119,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -149,7 +144,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -176,7 +170,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -202,7 +195,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -227,7 +219,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -252,7 +243,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -277,7 +267,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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, @@ -301,7 +290,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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) { @@ -324,7 +312,6 @@ 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")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) 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) {