/*
DELETE request to webServiceURL/version/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber}
494022
@Delete("json")
	public final void deleteDeviceRegistrationRequest(final Representation entity) {
		Request request = getRequest();
		Map<String, Object> requestAttributes = request.getAttributes();
		String deviceLibraryIdentifier = (String) requestAttributes.get("deviceLibraryIdentifier");
		String passTypeIdentifier = (String) requestAttributes.get("passTypeIdentifier");
		String serialNumber = (String) requestAttributes.get("serialNumber");
		ChallengeResponse authString = request.getChallengeResponse();

		LOGGER.debug("deleteDeviceRegistrationRequest - deviceLibraryIdentifier: {}", deviceLibraryIdentifier);
		LOGGER.debug("deleteDeviceRegistrationRequest - passTypeIdentifier: {}", passTypeIdentifier);
		LOGGER.debug("deleteDeviceRegistrationRequest - serialNumber: {}", serialNumber);
		LOGGER.debug("deleteDeviceRegistrationRequest - authString: {}", authString);

		Status responseStatus;
		try {
			responseStatus = handleUnregisterDeviceRequest(deviceLibraryIdentifier, passTypeIdentifier, serialNumber, authString);
		} catch (PKAuthTokenNotValidException e) {
			responseStatus = Status.CLIENT_ERROR_UNAUTHORIZED;
		}
		setStatusIntoResponse(responseStatus, getResponse());
	}
106705
private <TResponse> void callDeleteApi(
            BasicCredentials credentials, String path,
            Map<String, String> queryParams) throws AuthleteApiException
    {
        callApi(HttpMethod.DELETE, credentials, path, queryParams, (Object)null, (Class<TResponse>)null);
    }
108141
@DELETE
    @Consumes(Servlets.JSON_MEDIA_TYPE)
    @Produces(Servlets.JSON_MEDIA_TYPE)
    @Path("/uniqueAttribute/type/{typeName}")
    public EntityMutationResponse deleteByUniqueAttribute(@PathParam("typeName") String typeName,
                                                          @Context HttpServletRequest servletRequest) throws AtlasBaseException {
        AtlasPerfTracer perf = null;

        try {
            Map<String, Object> attributes = getAttributes(servletRequest);

            if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
                perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.deleteByUniqueAttribute(" + typeName + "," + attributes + ")");
            }

            AtlasEntityType entityType = ensureEntityType(typeName);

            return entitiesStore.deleteByUniqueAttributes(entityType, attributes);
        } finally {
            AtlasPerfTracer.log(perf);
        }
    }
888265
public static base_responses delete(nitro_service client, String limitidentifier[]) throws Exception {
		base_responses result = null;
		if (limitidentifier != null && limitidentifier.length > 0) {
			nslimitidentifier deleteresources[] = new nslimitidentifier[limitidentifier.length];
			for (int i=0;i<limitidentifier.length;i++){
				deleteresources[i] = new nslimitidentifier();
				deleteresources[i].limitidentifier = limitidentifier[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
644625
private static DeleteRequestType checkType(
			final HttpServletRequest request,
			final DeleteResponse deleteResponse) {
		{
			final String sType = request
					.getParameter(ProtocolConstants.Parameters.Delete.TYPE);
			if (sType != null) {
				if (DeleteRequestType.USER.getIdentifier().equals(sType)) {
					return DeleteRequestType.USER;
				} else if (DeleteRequestType.FOLLOW.getIdentifier().equals(
						sType)) {
					return DeleteRequestType.FOLLOW;
				} else if (DeleteRequestType.STATUS_UPDATE.getIdentifier()
						.equals(sType)) {
					return DeleteRequestType.STATUS_UPDATE;
				} else {
					deleteResponse.typeInvalid(sType);
				}
			} else {
				deleteResponse.typeMissing();
			}

			return null;
		}

	}
776983
public static void clearGrailsWebRequest() {
        RequestAttributes reqAttrs = RequestContextHolder.getRequestAttributes();
        if (reqAttrs != null) {
            // First remove the web request from the HTTP request attributes.
            GrailsWebRequest webRequest = (GrailsWebRequest) reqAttrs;
            webRequest.getRequest().removeAttribute(GrailsApplicationAttributes.WEB_REQUEST);

            // Now remove it from RequestContextHolder.
            RequestContextHolder.resetRequestAttributes();
        }
    }
1194074
public static void removeRequest (@Nonnull @Nonempty final String sRequestID)
  {
    final RequestTracker aTracker = getGlobalSingletonIfInstantiated (RequestTracker.class);
    if (aTracker != null)
      aTracker.m_aRequestTrackingMgr.removeRequest (sRequestID, s_aParallelRunningCallbacks);
  }
700040
@Override
	public Result<Void> deleteNS(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp, String ns) {
		TimeTaken tt = trans.start(DELETE_NS + ' ' + ns, Env.SUB|Env.ALWAYS);
		try {
			Result<Void> rp = service.deleteNS(trans,ns);
			switch(rp.status) {
				case OK: 
					setContentType(resp,nsRequestDF.getOutType());
					return Result.ok();
				default:
					return Result.err(rp);
			}
		} catch (Exception e) {
			trans.error().log(e,IN,DELETE_NS);
			return Result.err(e);
		} finally {
			tt.done();
		}
	}
722631
private DeleteInternetGatewayResponseType deleteInternetGateway(
            final String internetGatewayId) {
        DeleteInternetGatewayResponseType ret = new DeleteInternetGatewayResponseType();
        ret.setRequestId(UUID.randomUUID().toString());
        mockInternetGatewayController.deleteInternetGateway(internetGatewayId);
        return ret;
    }
403778
@Override
    public void delete(
            final ObjectClass objClass,
            final Uid uid,
            final OperationOptions options) {

        LOG.ok("Account deletion");

        // check objectclass
        if (objClass == null || (!objClass.equals(ObjectClass.ACCOUNT))) {
            throw new IllegalArgumentException("Invalid objectclass");
        }

        // get web service client
        final Provisioning provisioning = connection.getProvisioning();
        if (provisioning == null) {
            throw new IllegalStateException("Web Service client not found");
        }

        try {
            provisioning.delete(uid.getUidValue());
        } catch (ProvisioningException e) {
            throw new ConnectorException("Deletion failed", e);
        } catch (Throwable t) {
            throw new ConnectorException("Communication exception", t);
        }
    }
915509
@DELETE
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/revoke_oauth_access/{appName}")
    @Description("Revokes Oauth access of app from argus for a particular user")
    public Response removeAccess(@Context HttpServletRequest req,@PathParam("appName") String appName) {
        String userName=findUserByToken(req);

        if(appName.equalsIgnoreCase(applicationName))
        {
            authService.deleteByUserId(userName);
            return Response.status(Status.OK).build();
        }
        else
        {
            throw new OAuthException(ResponseCodes.ERR_DELETING_APP, HttpResponseStatus.BAD_REQUEST);
        }

    }
624733
protected void removePendingRequestForType(ResourceRequestInfo req) {
    Context c = getContext(req.getType());
    Object removed = Utilities.removeReference(c.pendingRequests, req);
    if (removed != null) {
      c.pendingRequestCount--;
    }
  }
1112949
public static BaseResult deviceDelete(String accessToken, DeviceDelete deviceDelete) {
        return deviceDelete(accessToken, JsonUtil.toJSONString(deviceDelete));
    }
157400
@Override
	public DeleteMethodOutcome deleteByUrl(String theUrl, List<DeleteConflict> deleteConflicts, RequestDetails theRequest) {
		StopWatch w = new StopWatch();

		Set<Long> resourceIds = myMatchResourceUrlService.processMatchUrl(theUrl, myResourceType);
		if (resourceIds.size() > 1) {
			if (myDaoConfig.isAllowMultipleDelete() == false) {
				throw new PreconditionFailedException(getContext().getLocalizer().getMessage(BaseHapiFhirDao.class, "transactionOperationWithMultipleMatchFailure", "DELETE", theUrl, resourceIds.size()));
			}
		}

		List<ResourceTable> deletedResources = new ArrayList<>();
		for (Long pid : resourceIds) {
			ResourceTable entity = myEntityManager.find(ResourceTable.class, pid);
			deletedResources.add(entity);

			T resourceToDelete = toResource(myResourceType, entity, null, false);

			// Notify IServerOperationInterceptors about pre-action call
			HookParams hooks = new HookParams()
				.add(IBaseResource.class, resourceToDelete)
				.add(RequestDetails.class, theRequest)
				.addIfMatchesType(ServletRequestDetails.class, theRequest);
			myInterceptorBroadcaster.callHooks(Pointcut.STORAGE_PRESTORAGE_RESOURCE_DELETED, hooks);

			validateOkToDelete(deleteConflicts, entity, false);

			// Notify interceptors
			IdDt idToDelete = entity.getIdDt();
			if (theRequest != null) {
				ActionRequestDetails requestDetails = new ActionRequestDetails(theRequest, idToDelete.getResourceType(), idToDelete);
				notifyInterceptors(RestOperationTypeEnum.DELETE, requestDetails);
			}

			// Perform delete

			updateEntityForDelete(theRequest, entity);
			resourceToDelete.setId(entity.getIdDt());

			// Notify JPA interceptors
			TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
				@Override
				public void beforeCommit(boolean readOnly) {
					HookParams hookParams = new HookParams()
						.add(IBaseResource.class, resourceToDelete)
						.add(RequestDetails.class, theRequest)
						.addIfMatchesType(ServletRequestDetails.class, theRequest);
					myInterceptorBroadcaster.callHooks(Pointcut.STORAGE_PRECOMMIT_RESOURCE_DELETED, hookParams);
				}
			});
		}

		IBaseOperationOutcome oo;
		if (deletedResources.isEmpty()) {
			oo = OperationOutcomeUtil.newInstance(getContext());
			String message = getContext().getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "unableToDeleteNotFound", theUrl);
			String severity = "warning";
			String code = "not-found";
			OperationOutcomeUtil.addIssue(getContext(), oo, severity, message, null, code);
		} else {
			oo = OperationOutcomeUtil.newInstance(getContext());
			String message = getContext().getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "successfulDeletes", deletedResources.size(), w.getMillis());
			String severity = "information";
			String code = "informational";
			OperationOutcomeUtil.addIssue(getContext(), oo, severity, message, null, code);
		}

		ourLog.debug("Processed delete on {} (matched {} resource(s)) in {}ms", theUrl, deletedResources.size(), w.getMillis());

		DeleteMethodOutcome retVal = new DeleteMethodOutcome();
		retVal.setDeletedEntities(deletedResources);
		retVal.setOperationOutcome(oo);
		return retVal;
	}
1153863
private <TResponse> void callServiceOwnerDeleteApi(String path) throws AuthleteApiException
    {
        callServiceOwnerDeleteApi(path, (Map<String, String>)null);
    }
1086105
public boolean delete(final RegisteredService service) {
        val del = new DeleteItemRequest().withTableName(dynamoDbProperties.getTableName())
            .withKey(CollectionUtils.wrap(ColumnNames.ID.getColumnName(), new AttributeValue(String.valueOf(service.getId()))));
        LOGGER.debug("Submitting delete request [{}] for service [{}]", del, service);
        val res = amazonDynamoDBClient.deleteItem(del);
        LOGGER.debug("Delete request came back with result [{}]", res);
        return res != null;
    }
372242
func DeleteCertificateSigningRequest(d Depot, name string) error {
	return d.Delete(CsrTag(name))
}