X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=catalog-be%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdc%2Fbe%2Fservlets%2FPolicyServlet.java;h=f9449e2fc85f1a566a5172d161aa47c193f26ded;hb=5f3e9912406897ee18c424b940881ce08d59bb44;hp=1645e76af64f4473293025edd93a8d7be20b5423;hpb=d4fd2ca0fba827042fc5313efeaf9cdf850be647;p=sdc.git diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java index 1645e76af6..f9449e2fc8 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PolicyServlet.java @@ -51,8 +51,6 @@ import org.apache.commons.lang3.StringUtils; import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; import org.openecomp.sdc.be.components.impl.PolicyBusinessLogic; import org.openecomp.sdc.be.components.impl.ResourceImportManager; -import org.openecomp.sdc.be.components.impl.aaf.AafPermission; -import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed; import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -107,7 +105,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "409", description = "Policy already exist"), @ApiResponse(responseCode = "404", description = "Component not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response createPolicy(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -134,7 +131,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "200", description = "Policy updated"), @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "404", description = "component / policy Not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response updatePolicy(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -165,7 +161,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "404", description = "component / policy Not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response getPolicy(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -187,7 +182,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "404", description = "component / policy Not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response deletePolicy(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -209,7 +203,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "404", description = "component / policy Not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response undeclarePolicy(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -244,7 +237,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "404", description = "Componentorpolicy not found"), @ApiResponse(responseCode = "500", description = "The GET request failed due to internal SDC problem.")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response getPolicyProperties( @Parameter(description = "the id of the component which is the container of the policy") @PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = {ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -266,7 +258,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content"), @ApiResponse(responseCode = "404", description = "component / policy Not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response updatePolicyProperties(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -304,7 +295,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(responseCode = "201", description = "Policy target updated"), @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "400", description = "Invalid content / Missing content")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response updatePolicyTargets(@PathParam("componentId") final String containerComponentId, @Parameter(description = "valid values: resources / services", schema = @Schema(allowableValues = { ComponentTypeEnum.RESOURCE_PARAM_NAME, @@ -324,7 +314,6 @@ public class PolicyServlet extends AbstractValidationsServlet { @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Resource.class)))), @ApiResponse(responseCode = "200", description = "Component found"), @ApiResponse(responseCode = "403", description = "Restricted operation"), @ApiResponse(responseCode = "404", description = "Component not found")}) - @PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE) public Response declareProperties(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId, @Parameter(description = "ComponentIns policies Object to be created", required = true) String componentInstPoliciesMapObj) {