protected Optional<Remote> _call() { if (name == null || name.isEmpty()) { throw new RemoteException(StatusCode.MISSING_NAME);
/** * Executes the remote remove command. */ @Override public void runInternal(GeogigCLI cli) { if (params == null || params.size() != 1) { printUsage(cli); throw new CommandFailedException(); } try { cli.getGeogig().command(RemoteRemoveOp.class).setName(params.get(0)).call(); } catch (RemoteException e) { switch (e.statusCode) { case REMOTE_NOT_FOUND: throw new InvalidParameterException( "Could not find a remote called '" + params.get(0) + "'.", e); default: throw new CommandFailedException(e.getMessage(), e); } } }
protected Remote _call() { if (name == null || name.isEmpty()) { throw new RemoteException(StatusCode.MISSING_NAME); throw new RemoteException(StatusCode.REMOTE_NOT_FOUND);
protected Remote _call() { if (name == null || name.isEmpty()) { throw new RemoteException(StatusCode.MISSING_NAME); throw new RemoteException(StatusCode.MISSING_URL); List<String> allRemotes = config.getAllSubsections("remote"); if (allRemotes.contains(name)) { throw new RemoteException(StatusCode.REMOTE_ALREADY_EXISTS);