Remove

@param Endpoint                      $endpoint
@param ExecutableDefinitionInterface $executableDefinition
@param array|string[]                $forbiddenTypes
352495
protected function secureOperations(Endpoint $endpoint, ExecutableDefinitionInterface $executableDefinition, $forbiddenTypes)
    {
        $type = $endpoint->hasType($executableDefinition->getType()) ? $endpoint->getType($executableDefinition->getType()) : null;

        $node = null;
        //resolve the related node using interface
        if ($executableDefinition instanceof NodeAwareDefinitionInterface) {
            $node = $endpoint->hasType($executableDefinition->getNode()) ? $endpoint->getType($executableDefinition->getNode()) : null;
        }

        //resolve related node using metadata
        if (!$node) {
            $node = $endpoint->hasType($executableDefinition->getMeta('node')) ? $endpoint->getType($executableDefinition->getMeta('node')) : null;
        }

        $granted = true;
        $endpoints = $this->normalizeConfig($executableDefinition, $executableDefinition->getMeta('endpoints', []));

        //if the operation has endpoints defined use that,
        //otherwise check by related type and node
        if ($endpoints) {
            $granted = $this->isGranted($endpoint, $executableDefinition);
        } elseif (($type && \in_array($type->getName(), $forbiddenTypes, true))
                  || ($node && \in_array($node->getName(), $forbiddenTypes, true))) {
            $granted = false;
        }

        if (!$granted) {
            if ($executableDefinition instanceof MutationDefinition) {
                $endpoint->removeMutation($executableDefinition->getName());
            } elseif ($executableDefinition instanceof SubscriptionDefinition) {
                $endpoint->removeSubscription($executableDefinition->getName());
            } else {
                $endpoint->removeQuery($executableDefinition->getName());
            }
        } else {
            foreach ($executableDefinition->getArguments() as $argument) {
                //remove forbidden argument
                if (!$this->isGranted($endpoint, $argument)) {
                    $executableDefinition->removeArgument($argument->getName());
                }

                //remove argument related to forbidden type
                $argumentType = $endpoint->hasType($argument->getType()) ? $endpoint->getType($argument->getType()) : null;
                if ($argumentType && \in_array($argumentType->getName(), $forbiddenTypes, true)) {
                    $executableDefinition->removeArgument($argument->getName());
                }
            }
        }
    }
676171
private function validateBlockTypes(array $blockTypes, array $blockDefinitions): void
    {
        foreach ($blockTypes as $identifier => $blockType) {
            if (!isset($blockDefinitions[$blockType['definition_identifier']])) {
                throw new RuntimeException(
                    sprintf(
                        'Block definition "%s" used in "%s" block type does not exist.',
                        $blockType['definition_identifier'],
                        $identifier
                    )
                );
            }
        }
    }
1051177
public function deleteContentTypeGroup($contentTypeGroupId)
    {
        $contentTypeGroup = $this->contentTypeService->loadContentTypeGroup($contentTypeGroupId);

        $contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
        if (!empty($contentTypes)) {
            throw new ForbiddenException('Only empty content type groups can be deleted');
        }

        $this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);

        return new Values\NoContent();
    }
262559
public synchronized void removeControlPoint(ControlPoint controlPoint) {
        if (controlPoint.decreaseReferenceCount() == 0) {
            ControlPointIdentifier id = new ControlPointIdentifier(controlPoint.getDeployment(), controlPoint.getEntryPoint());
            entryPoints.remove(id);
        }
    }
335343
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPDefinition deleteCPDefinition(CPDefinition cpDefinition)
		throws PortalException {
		return cpDefinitionPersistence.remove(cpDefinition);
	}
428529
protected function removeStandards(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        $srcStandards = $this->getSourceStandards($package);
        $dstStandards = $this->getDestinationStandards($repo);
        $this->io->writeError('    Removing PHP-CodeSniffer Standards:', false);
        foreach ($srcStandards as $srcStandard) {
            if (! $dstStandards->hasStandard($srcStandard)) {
                continue;
            }
            $this->io->writeError(sprintf(' <info>%s</info>', $srcStandard->getName()));
            $dstStandard = $dstStandards->getStandard($srcStandard);

            $this->filesystem->removeDirectory($dstStandard->getPath());
        }
    }
1308455
def delete(self, endpoint: str, **kwargs) -> dict:
        """"""

        return self._request('DELETE', endpoint, **kwargs)
1059663
@Nonnull
  public FineUploader5DeleteFile setEndpoint (@Nonnull final ISimpleURL aEndpoint)
  {
    ValueEnforcer.notNull (aEndpoint, "Endpoint");
    m_aDeleteFileEndpoint = aEndpoint;
    return this;
  }
637891
public void deactivateEndpoint(Object activationSpec, WSMessageEndpointFactory messageEndpointFactory) throws ResourceException {
        try {
            if (activationSpec instanceof ActivationSpec) {
                if (endpointActivationParams.remove(new ActivationParams(activationSpec, messageEndpointFactory)))
                    endpointDeactivation((ActivationSpec) activationSpec, messageEndpointFactory);
                else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(this, tc, "already deactivated");
            } else {
                //TODO We need to handle the case when @Activation is used.
                throw new UnsupportedOperationException();
            }
        } catch (Exception ex) {
            Tr.error(tc, "J2CA8803.deactivation.failed", bootstrapContextRef.getReference().getProperty(Constants.SERVICE_PID), ex);
            throw new ResourceException(ex);
        }
    }
511054
def delete_endpoint(endpoint_id)
      endpoint = EndPoint.new({:id => endpoint_id}, @client)
      endpoint.domain_id = id
      endpoint.delete()
    end
112010
protected function setCurrentEndpoint(EndpointInterface $Endpoint)
    {
        if (isset($this->currentEndPoint)){
            unset($this->lastEndPoint);
            $this->lastEndPoint = $this->currentEndPoint;
            unset($this->currentEndPoint);
        }
        $this->currentEndPoint = $Endpoint;
        return $this;
    }
956849
private function getOrCreateEndpoint($endpoint)
    {
        if (!array_key_exists($endpoint, $this->endpoints)) {
            if (!array_key_exists($endpoint, self::$endpointClassMap)) {
                throw new \Exception(sprintf('Unknown endpoint "%s"', $endpoint));
            }

            $endpointClass = self::$endpointClassMap[$endpoint];
            $this->endpoints[$endpoint] = $this->createEndpoint($endpointClass);
        }

        return $this->endpoints[$endpoint];
    }
700661
public function delete($endpoint, array $parameters = array())
    {
        return $this->execute("DELETE", sprintf("%s%s", $this->host, $endpoint) . "/", $parameters);
    }
934031
public Response delete(String endpoint) {
        return call(Method.DELETE, endpoint, null, null);
    }
1373913
private function createConnection(Endpoint $endpoint, DefinitionInterface $node): ObjectDefinition
    {
        $connection = new ObjectDefinition();
        $connection->setName("{$node->getName()}Connection");

        if (!$endpoint->hasType($connection->getName())) {
            $endpoint->addType($connection);

            $totalCount = new FieldDefinition();
            $totalCount->setName('totalCount');
            $totalCount->setType('Int');
            $totalCount->setNonNull(true);
            $connection->addField($totalCount);

            $pages = new FieldDefinition();
            $pages->setName('pages');
            $pages->setType('Int');
            $pages->setNonNull(true);
            $connection->addField($pages);

            $pageInfo = new FieldDefinition();
            $pageInfo->setName('pageInfo');
            $pageInfo->setType('PageInfo');
            $pageInfo->setNonNull(true);
            $connection->addField($pageInfo);

            $edgeObject = new ObjectDefinition();
            $edgeObject->setName("{$node->getName()}Edge");
            if (!$endpoint->hasType($edgeObject->getName())) {
                $endpoint->addType($edgeObject);

                $nodeField = new FieldDefinition();
                $nodeField->setName('node');
                $nodeField->setType($node->getName());
                $nodeField->setNonNull(true);
                $edgeObject->addField($nodeField);

                $cursor = new FieldDefinition();
                $cursor->setName('cursor');
                $cursor->setType('string');
                $cursor->setNonNull(true);
                $edgeObject->addField($cursor);
            }

            $edges = new FieldDefinition();
            $edges->setName('edges');
            $edges->setType($edgeObject->getName());
            $edges->setList(true);
            $connection->addField($edges);
        } else {
            $connection = $endpoint->getType($connection->getName());
        }

        return $connection;
    }
789736
public function fillEndPoint(string &$endPoint): void
    {
        $endPoint = str_replace("{sms}", $this->smsID, $endPoint);
        $endPoint = str_replace("{bundle}", $this->bundleID ?? "", $endPoint);
    }
27551
@Override
    public void delete(IPermission[] perms) throws AuthorizationException {
        if (perms.length > 0) {
            try {
                primDelete(perms);
            } catch (Exception ex) {
                log.error("Exception deleting permissions " + Arrays.toString(perms), ex);
                throw new AuthorizationException(
                        "Exception deleting permissions " + Arrays.toString(perms), ex);
            }
        }
    }