@Override
    public void delete(String gatewayId) throws GatewayNotFoundException,
            NotAuthorizedException {
        securityContext.checkAdminPermissions();

        try {
            GatewayBean gateway = storage.getGateway(gatewayId);
            if (gateway == null) {
                throw ExceptionFactory.gatewayNotFoundException(gatewayId);
            }
            storage.deleteGateway(gateway);

            LOGGER.debug(String.format("Successfully deleted gateway %s: %s", gateway.getName(), gateway)); //$NON-NLS-1$
        } catch (AbstractRestException e) {
            throw e;
        } catch (Exception e) {
            throw new SystemErrorException(e);
        }
    }
@see IGatewayResource#delete(java.lang.String)
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/GatewayResourceImpl.java