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;
@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,
@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,
@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,
@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,
@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,