X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog-be%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdc%2Fbe%2Fexternalapi%2Fservlet%2FExternalRefsServlet.java;h=0bfcbecce35cd97545611384f161b1b774fad521;hb=5f3e9912406897ee18c424b940881ce08d59bb44;hp=0c3595e05dc9c5f268d54df50745d3bc6fce62bb;hpb=7353fb39790b51c593cb0f72c6ab46d906758244;p=sdc.git diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java index 0c3595e05d..0bfcbecce3 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefsServlet.java @@ -38,14 +38,11 @@ import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.openecomp.sdc.be.components.impl.ExternalRefsBusinessLogic; -import org.openecomp.sdc.be.components.impl.aaf.AafPermission; -import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.dto.ExternalRefDTO; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.servlets.BeGenericServlet; -import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.datastructure.Wrapper; import org.openecomp.sdc.common.log.wrappers.Logger; import org.springframework.stereotype.Controller; @@ -60,16 +57,15 @@ public class ExternalRefsServlet extends BeGenericServlet { private final ExternalRefsBusinessLogic businessLogic; @Inject - public ExternalRefsServlet(UserBusinessLogic userBusinessLogic, ComponentsUtils componentsUtils, + public ExternalRefsServlet(ComponentsUtils componentsUtils, ExternalRefsBusinessLogic externalRefsBusinessLogic) { - super(userBusinessLogic, componentsUtils); + super(componentsUtils); this.businessLogic = externalRefsBusinessLogic; } @GET @Path("/{assetType}/{uuid}/version/{version}/resourceInstances/{componentInstanceName}/externalReferences/{objectType}") @Produces(MediaType.APPLICATION_JSON) - @PermissionAllowed({AafPermission.PermNames.READ_VALUE}) public Response getComponentInstanceExternalRef(@PathParam("assetType") String assetType, @PathParam("uuid") String uuid, @PathParam("version") String version, @PathParam("componentInstanceName") String componentInstanceName, @@ -91,7 +87,6 @@ public class ExternalRefsServlet extends BeGenericServlet { @GET @Path("/{assetType}/{uuid}/version/{version}/externalReferences/{objectType}") @Produces(MediaType.APPLICATION_JSON) - @PermissionAllowed({AafPermission.PermNames.READ_VALUE}) public Map> getAssetExternalRefByObjectType(@PathParam("assetType") String assetType, @PathParam("uuid") String uuid, @PathParam("version") String version, @PathParam("objectType") String objectType, @HeaderParam("USER_ID") String userId, @@ -113,7 +108,6 @@ public class ExternalRefsServlet extends BeGenericServlet { @Path("/{assetType}/{uuid}/resourceInstances/{componentInstanceName}/externalReferences/{objectType}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @PermissionAllowed({AafPermission.PermNames.WRITE_VALUE}) public Response addComponentInstanceExternalRef(@PathParam("assetType") String assetType, @PathParam("uuid") String uuid, @PathParam("componentInstanceName") String componentInstanceName, @PathParam("objectType") String objectType, ExternalRefDTO ref, @@ -138,7 +132,6 @@ public class ExternalRefsServlet extends BeGenericServlet { @DELETE @Path("/{assetType}/{uuid}/resourceInstances/{componentInstanceName}/externalReferences/{objectType}/{reference}") @Produces(MediaType.APPLICATION_JSON) - @PermissionAllowed({AafPermission.PermNames.DELETE_VALUE}) public Response deleteComponentInstanceReference(@PathParam("assetType") String assetType, @PathParam("uuid") String uuid, @PathParam("componentInstanceName") String componentInstanceName, @PathParam("objectType") String objectType, @PathParam("reference") String reference, @@ -164,7 +157,6 @@ public class ExternalRefsServlet extends BeGenericServlet { @Path("/{assetType}/{uuid}/resourceInstances/{componentInstanceName}/externalReferences/{objectType}/{oldRefValue}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) - @PermissionAllowed({AafPermission.PermNames.WRITE_VALUE}) public Response updateComponentInstanceReference(@PathParam("assetType") String assetType, @PathParam("uuid") String uuid, @PathParam("componentInstanceName") String componentInstanceName, @PathParam("objectType") String objectType, @PathParam("oldRefValue") String oldRefValue,