Adds a DELETE request handler with the given roles for the specified path to the instance.
Requires an access manager to be set on the instance.

@see AccessManager
@see <a href="https://javalin.io/documentation#handlers">Handlers in docs</a>
765342
public Javalin delete(@NotNull String path, @NotNull Handler handler, @NotNull Set<Role> permittedRoles) {
        return addHandler(HandlerType.DELETE, path, handler, permittedRoles);
    }
338553
@Path("/{roleName}/users/{cuid}")
    @ApiOperation(value="Delete a role or remove a user from a role",
        notes="If users/{cuid} is present, user is removed from role.", response=StatusMessage.class)
    public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
    throws ServiceException, JSONException {
        String name = getSegment(path, 1);
        String rel = getSegment(path, 2);

        UserServices userServices = ServiceLocator.getUserServices();
        try {
            if (rel == null) {
                userServices.deleteRole(name);
              }
              else if (rel.equals("users")) {
                  String cuid = getSegment(path, 3);
                  userServices.removeUserFromRole(cuid, name);
              }
        }
        catch (DataAccessException ex) {
            throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
        }
        return null;
    }
664046
public String delete(String path, Response data) {
		return request("DELETE", path, data, getDefaultOptions());
	}
392399
public Response delete(String path, Map<String, String> headers) throws IOException, RESTException {
        return parseResponse(getHttpResponse(new HttpDelete(baseUrl + path), headers));
    }
288978
public void removeHandler(Handler handler) throws SecurityException {
        checkPermission();
        if (handler == null) {
            return;
        }
        handlers.remove(handler);
    }
1260940
public Javalin put(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.PUT, path, handler);
    }
555711
public Javalin ws(@NotNull String path, @NotNull Consumer<WsHandler> ws, @NotNull Set<Role> permittedRoles) {
        return addWsHandler(WsHandlerType.WEBSOCKET, path, ws, permittedRoles);
    }
54414
private void registerHandlers(RaftServerProtocol protocol) {
    protocol.registerOpenSessionHandler(request -> runOnContextIfReady(() -> role.onOpenSession(request), OpenSessionResponse::builder));
    protocol.registerCloseSessionHandler(request -> runOnContextIfReady(() -> role.onCloseSession(request), CloseSessionResponse::builder));
    protocol.registerKeepAliveHandler(request -> runOnContextIfReady(() -> role.onKeepAlive(request), KeepAliveResponse::builder));
    protocol.registerMetadataHandler(request -> runOnContextIfReady(() -> role.onMetadata(request), MetadataResponse::builder));
    protocol.registerConfigureHandler(request -> runOnContext(() -> role.onConfigure(request)));
    protocol.registerInstallHandler(request -> runOnContext(() -> role.onInstall(request)));
    protocol.registerJoinHandler(request -> runOnContext(() -> role.onJoin(request)));
    protocol.registerReconfigureHandler(request -> runOnContext(() -> role.onReconfigure(request)));
    protocol.registerLeaveHandler(request -> runOnContext(() -> role.onLeave(request)));
    protocol.registerTransferHandler(request -> runOnContext(() -> role.onTransfer(request)));
    protocol.registerAppendHandler(request -> runOnContext(() -> role.onAppend(request)));
    protocol.registerPollHandler(request -> runOnContext(() -> role.onPoll(request)));
    protocol.registerVoteHandler(request -> runOnContext(() -> role.onVote(request)));
    protocol.registerCommandHandler(request -> runOnContextIfReady(() -> role.onCommand(request), CommandResponse::builder));
    protocol.registerQueryHandler(request -> runOnContextIfReady(() -> role.onQuery(request), QueryResponse::builder));
  }
176699
public JSONObject delete(String path) throws APIError {
        return request(Verb.DELETE, path, null);
    }
1369356
public Javalin post(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.POST, path, handler);
    }
872349
public JsHandlerRegistration addGeometryEditResumeHandler(final GeometryEditResumeHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler() {

			public void onGeometryEditResume(GeometryEditResumeEvent event) {
				handler.onGeometryEditResume(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditResumeEvent(
						event.getGeometry()));
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryEditResumeHandler(h) });
	}
818251
@Override
	public void putHandlerWithView(String url, HandlerDefinition handler) {
		handlerWithViewMappingInfoStorage.put(url, handler);
		removeHandler(url);
	}
1002876
private static void addDeleteDirective(
            Element compViewNode, String elementID, IPerson person, Document plf, Element delSet)
            throws PortalException {
        String ID = null;

        try {
            ID = getDLS().getNextStructDirectiveId(person);
        } catch (Exception e) {
            throw new PortalException(
                    "Exception encountered while "
                            + "generating new delete node "
                            + "Id for userId="
                            + person.getID(),
                    e);
        }
        Element delete = plf.createElement(Constants.ELM_DELETE);
        delete.setAttribute(Constants.ATT_TYPE, Constants.ELM_DELETE);
        delete.setAttribute(Constants.ATT_ID, ID);
        delete.setAttributeNS(Constants.NS_URI, Constants.ATT_NAME, elementID);
        delSet.appendChild(delete);

        // now pass through children and add delete directives for those with
        // IDs indicating that they were incorporated
        Element child = (Element) compViewNode.getFirstChild();

        while (child != null) {
            String childID = child.getAttribute("ID");
            if (childID.startsWith(Constants.FRAGMENT_ID_USER_PREFIX))
                addDeleteDirective(child, childID, person, plf, delSet);
            child = (Element) child.getNextSibling();
        }
    }
834429
public Response delete(String path, Formattable data) throws AuthyException {
        return request("DELETE", path, data, getDefaultOptions());
    }
858722
@POST
  @Path("/db/{authorizerName}/roles/{roleName}/permissions")
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @ResourceFilters(BasicSecurityResourceFilter.class)
  public Response setRolePermissions(
      @Context HttpServletRequest req,
      @PathParam("authorizerName") final String authorizerName,
      @PathParam("roleName") String roleName,
      List<ResourceAction> permissions
  )
  {
    return resourceHandler.setRolePermissions(authorizerName, roleName, permissions);
  }
524504
public Blade delete(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.DELETE);
        return this;
    }
438626
def role_delete(self, role_id, **kwargs):
        ""
        api_path = "/api/v2/roles/{role_id}"
        api_path = api_path.format(role_id=role_id)
        return self.call(api_path, method="DELETE", **kwargs)