@Test public void testDefaultWebDAVForHttpScheme() throws Exception { final CommandLineParser parser = new PosixParser(); final CommandLine input = parser.parse(new Options(), new String[]{}); final ProtocolFactory factory = new ProtocolFactory(new LinkedHashSet<>(Arrays.asList( new AzureProtocol(), new DAVSSLProtocol() ))); factory.register(new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Azure.cyberduckprofile"))); factory.register(new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/DAVS.cyberduckprofile"))); assertEquals(0, new Host(new DAVSSLProtocol(), "ftp.gnu.org", 443, "/gnu/wget/wget-1.19.1.tar.gz", new Credentials("anonymous", null)) .compareTo(new CommandLineUriParser(input, factory).parse("https: }
public Host parse(final String uri) throws HostParserException { final Host host = new HostParser(factory).get(uri); if(input.hasOption(TerminalOptionsBuilder.Params.region.name())) { host.setRegion(input.getOptionValue(TerminalOptionsBuilder.Params.region.name())); } final Path directory = new CommandLinePathParser(input, factory).parse(uri); if(directory.isDirectory()) { host.setDefaultPath(directory.getAbsolute()); } else { host.setDefaultPath(directory.getParent().getAbsolute()); } if(input.hasOption(TerminalOptionsBuilder.Params.udt.name())) { host.setTransfer(Host.TransferType.udt); } if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", uri, host)); } return host; }
CommandLineUriParser { public Host parse(final String uri) throws HostParserException { final Host host = new HostParser(factory).get(uri); if(input.hasOption(TerminalOptionsBuilder.Params.region.name())) { host.setRegion(input.getOptionValue(TerminalOptionsBuilder.Params.region.name())); } final Path directory = new CommandLinePathParser(input, factory).parse(uri); if(directory.isDirectory()) { host.setDefaultPath(directory.getAbsolute()); } else { host.setDefaultPath(directory.getParent().getAbsolute()); } if(input.hasOption(TerminalOptionsBuilder.Params.udt.name())) { host.setTransfer(Host.TransferType.udt); } if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", uri, host)); } return host; } }
CommandLineUriParser { public Host parse(final String uri) throws HostParserException { final Host host = new HostParser(factory).get(uri); if(input.hasOption(TerminalOptionsBuilder.Params.region.name())) { host.setRegion(input.getOptionValue(TerminalOptionsBuilder.Params.region.name())); } final Path directory = new CommandLinePathParser(input, factory).parse(uri); if(directory.isDirectory()) { host.setDefaultPath(directory.getAbsolute()); } else { host.setDefaultPath(directory.getParent().getAbsolute()); } if(input.hasOption(TerminalOptionsBuilder.Params.udt.name())) { host.setTransfer(Host.TransferType.udt); } if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", uri, host)); } return host; } CommandLineUriParser(final CommandLine input);  CommandLineUriParser(final CommandLine input, final ProtocolFactory factory); }
CommandLineUriParser { public Host parse(final String uri) throws HostParserException { final Host host = new HostParser(factory).get(uri); if(input.hasOption(TerminalOptionsBuilder.Params.region.name())) { host.setRegion(input.getOptionValue(TerminalOptionsBuilder.Params.region.name())); } final Path directory = new CommandLinePathParser(input, factory).parse(uri); if(directory.isDirectory()) { host.setDefaultPath(directory.getAbsolute()); } else { host.setDefaultPath(directory.getParent().getAbsolute()); } if(input.hasOption(TerminalOptionsBuilder.Params.udt.name())) { host.setTransfer(Host.TransferType.udt); } if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", uri, host)); } return host; } CommandLineUriParser(final CommandLine input);  CommandLineUriParser(final CommandLine input, final ProtocolFactory factory); Host parse(final String uri); }
CommandLineUriParser { public Host parse(final String uri) throws HostParserException { final Host host = new HostParser(factory).get(uri); if(input.hasOption(TerminalOptionsBuilder.Params.region.name())) { host.setRegion(input.getOptionValue(TerminalOptionsBuilder.Params.region.name())); } final Path directory = new CommandLinePathParser(input, factory).parse(uri); if(directory.isDirectory()) { host.setDefaultPath(directory.getAbsolute()); } else { host.setDefaultPath(directory.getParent().getAbsolute()); } if(input.hasOption(TerminalOptionsBuilder.Params.udt.name())) { host.setTransfer(Host.TransferType.udt); } if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", uri, host)); } return host; } CommandLineUriParser(final CommandLine input);  CommandLineUriParser(final CommandLine input, final ProtocolFactory factory); Host parse(final String uri);  }