Remove legacy certificate handling
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / externalapi / servlet / ExternalRefsServlet.java
index 0c3595e..0bfcbec 100644 (file)
@@ -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<String, List<String>> 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,