Removes the specified {@link Token} from the specified {@code projectName}. It also removes
every token permission belonging to the {@link Token} from every {@link RepositoryMetadata}.
488935
public CompletableFuture<Revision> removeToken(Author author, String projectName, Token token) {
        return removeToken(author, projectName, requireNonNull(token, "token").appId());
    }
978512
public void deleteProjectBadge(Serializable projectId, Integer badgeId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBadge.URL
                + "/" + badgeId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
1128998
@RequestMapping(value = "projects/{projectId}/{type}/{id}", method = RequestMethod.DELETE)
    public Ack deleteProjectPermission(@PathVariable ID projectId, @PathVariable PermissionTargetType type, @PathVariable int id) {
        return accountService.deleteProjectPermission(projectId, type, id);
    }
1097196
@PostMapping("/removeMappingProject")
  public String deleteMappingProject(@RequestParam() String mappingProjectId) {
    MappingProject project = mappingService.getMappingProject(mappingProjectId);
    LOG.info("Deleting mappingProject {}", project.getName());
    mappingService.deleteMappingProject(mappingProjectId);
    return "redirect:" + getMappingServiceMenuUrl();
  }
415406
@Post("/metadata/{projectName}/tokens")
    public CompletableFuture<Revision> addToken(@Param("projectName") String projectName,
                                                IdentifierWithRole request,
                                                Author author) {
        final ProjectRole role = toProjectRole(request.role());
        return mds.findTokenByAppId(request.id())
                  .thenCompose(token -> mds.addToken(author, projectName, token.appId(), role));
    }
6627
public void deleteProjectPermission(DbSession dbSession, int userId, String permission, long projectId) {
    mapper(dbSession).deleteProjectPermission(userId, permission, projectId);
  }
695725
public void removeEm(String sessionToken)
    {
        if (emMap != null)
        {
            EntityManager em = emMap.get(sessionToken);
            if (em != null)
            {
                em.close();
            }
            emMap.remove(sessionToken);
        }
    }
342953
public CompletableFuture<Revision> removePerTokenPermission(Author author, String projectName,
                                                                String repoName, String appId) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");
        requireNonNull(appId, "appId");

        return removePermissionAtPointer(author, projectName,
                                         perTokenPermissionPointer(repoName, appId),
                                         "Remove permission of the token '" + appId +
                                         "' from the project " + projectName);
    }
703858
def del_token(token):
    '''
    
    '''
    token_path = os.path.join(__opts__['token_dir'], token)
    if os.path.exists(token_path):
        return os.remove(token_path) is None
    return False
864142
public void remove(Token token,
                       boolean requiresCurrentCheckpoint)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "remove",
                        new Object[] { token, new Boolean(requiresCurrentCheckpoint) });

        super.remove(token, requiresCurrentCheckpoint);

        // Cancel any writing.
        managedObjectsToWrite.remove(new Long(token.storedObjectIdentifier));

        // Now Schedule the deletion of the disk copy.

        // TODO see TODO for tokens toWrite in add() above.
        if (storeStrategy == STRATEGY_SAVE_ONLY_ON_SHUTDOWN) {
            // We dont need to add Objects that are not in the directory as they wont need to be 
            // deleted. This is important for Stores only written at shutdown as they may 
            // accumulate a lot of delete operations.
            if (managedObjectsOnDisk.contains(new Long(token.storedObjectIdentifier)))
                tokensToDelete.put(new Long(token.storedObjectIdentifier),
                                   token);

        } else if (requiresCurrentCheckpoint) {
            // The checkpoint logic in ObjectManagerState never calls flush until all of the
            // requiresCurrentCheckpoint transactions have been checkpointed. So no need to synchronize 
            // on checkpointManagedObjectsToWrite.
            if (checkpointTokensToDelete == null)
                captureCheckpointManagedObjects();
            checkpointTokensToDelete.put(new Long(token.storedObjectIdentifier),
                                         token);

        } else {
            // If flush() gets ahead of our addition to this table it will be deleted
            // next time.
            // Repeat attempts to insert the token into the tokensToDelete util we find one that 
            // we can be sure was included in a flush().
            for (;;) {
                java.util.Map myTokensToDelete = tokensToDelete;
                myTokensToDelete.put(new Long(token.storedObjectIdentifier),
                                     token);
                // Make sure the flush() did not steal tokensToDelete while we were adding to it.
                if (myTokensToDelete == tokensToDelete)
                    break;
            } // for (;;).
        }

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "remove");
    }
966686
public CompletableFuture<Revision> removePerUserPermission(Author author, String projectName,
                                                               String repoName, User member) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");
        requireNonNull(member, "member");

        final String memberId = member.id();
        return removePermissionAtPointer(author, projectName,
                                         perUserPermissionPointer(repoName, memberId),
                                         "Remove permission of the '" + memberId +
                                         "' from the project " + projectName);
    }
52662
public CompletableFuture<Revision> updatePerTokenPermission(Author author, String projectName,
                                                                String repoName, String appId,
                                                                Collection<Permission> permission) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");
        requireNonNull(appId, "appId");
        requireNonNull(permission, "permission");

        return replacePermissionAtPointer(author, projectName,
                                          perTokenPermissionPointer(repoName, appId), permission,
                                          "Update permission of the token '" + appId +
                                          "' as '" + permission + "' for the project " + projectName);
    }
458490
public CompletableFuture<Revision> removeProject(Author author, String projectName) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");

        final Change<JsonNode> change = Change.ofJsonPatch(
                METADATA_JSON,
                asJsonArray(new TestAbsenceOperation(PROJECT_REMOVAL),
                            new AddOperation(PROJECT_REMOVAL,
                                             Jackson.valueToTree(UserAndTimestamp.of(author)))));
        return metadataRepo.push(projectName, Project.REPO_DOGMA, author,
                                 "Remove the project: " + projectName, change);
    }
729814
public CompletableFuture<Revision> removeMember(Author author, String projectName, User member) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(member, "member");

        final String commitSummary = "Remove the member '" + member.id() + "' from the project " + projectName;
        return metadataRepo.push(
                projectName, Project.REPO_DOGMA, author, commitSummary,
                () -> fetchMetadata(projectName).thenApply(
                        metadataWithRevision -> {
                            final ImmutableList.Builder<JsonPatchOperation> patches = ImmutableList.builder();
                            metadataWithRevision
                                    .object().repos().values()
                                    .stream().filter(r -> r.perUserPermissions().containsKey(member.id()))
                                    .forEach(r -> patches.add(new RemoveOperation(
                                            perUserPermissionPointer(r.name(), member.id()))));
                            patches.add(new RemoveOperation(JsonPointer.compile("/members" +
                                                                                encodeSegment(member.id()))));
                            final Change<JsonNode> change =
                                    Change.ofJsonPatch(METADATA_JSON, Jackson.valueToTree(patches.build()));
                            return HolderWithRevision.of(change, metadataWithRevision.revision());
                        })
        );
    }
954709
@Override
    public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label) {

        return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label));
    }
554079
public void deleteTag(GitlabProject project, String tagName) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + project + GitlabTag.URL + "/" + tagName;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
335823
public static void delete(final BandwidthClient client, final String domainId, final String endpointId, final String token) throws AppPlatformException, ParseException, IOException {
        assert(client != null && domainId != null && endpointId != null && endpointId != null);
        deleteToken(client, domainId, endpointId, token);
    }