ch.cyberduck.core.Protocol.isHostnameConfigurable()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中ch.cyberduck.core.Protocol.isHostnameConfigurable()方法的一些代码示例,展示了Protocol.isHostnameConfigurable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.isHostnameConfigurable()方法的具体详情如下:
包路径:ch.cyberduck.core.Protocol
类名称:Protocol
方法名:isHostnameConfigurable

Protocol.isHostnameConfigurable介绍

暂无

代码示例

代码示例来源:origin: iterate-ch/cyberduck

@Override
public boolean isHostnameConfigurable() {
  if(StringUtils.isBlank(this.value("Hostname Configurable"))) {
    return parent.isHostnameConfigurable();
  }
  return this.bool("Hostname Configurable");
}

代码示例来源:origin: iterate-ch/cyberduck

private static void append(final Protocol protocol, final StringBuilder builder) {
  final String url;
  switch(protocol.getType()) {
    case b2:
    case s3:
    case googlestorage:
    case swift:
    case azure:
      url = String.format("%s://<container>/<key>", getScheme(protocol));
      break;
    default:
      if(protocol.isHostnameConfigurable()) {
        url = String.format("%s://<hostname>/<folder>/<file>", getScheme(protocol));
      }
      else {
        // case file:
        // case googledrive:
        // case dropbox:
        // case onedrive:
        url = String.format("%s://<folder>/<file>", getScheme(protocol));
      }
      break;
  }
  builder
    .append(String.format("%s %s", StringUtils.leftPad(protocol.getDescription(), 50), url))
    .append(StringUtils.LF);
}

代码示例来源:origin: iterate-ch/cyberduck

if(!protocol.isHostnameConfigurable()) {

代码示例来源:origin: iterate-ch/cyberduck

@Override
public void awakeFromNib() {
  super.awakeFromNib();
  if(bookmark.getProtocol().isHostnameConfigurable()) {
    window.makeFirstResponder(hostField);
  }
  else {
    if(options.user) {
      window.makeFirstResponder(usernameField);
    }
  }
  this.update();
}

代码示例来源:origin: iterate-ch/cyberduck

@Override
public boolean check(final Session<?> session, final Cache<Path> cache, final CancelCallback callback) throws BackgroundException {
  final Host bookmark = session.getHost();
  if(bookmark.getProtocol().isHostnameConfigurable() && StringUtils.isBlank(bookmark.getHostname())) {
    throw new ConnectionCanceledException();
  }
  if(session.isConnected()) {
    if(log.isDebugEnabled()) {
      log.debug(String.format("Skip opening connection for session %s", session));
    }
    // Connection already open
    return false;
  }
  // Obtain password from keychain or prompt
  synchronized(login) {
    login.validate(bookmark,
      MessageFormat.format(LocaleFactory.localizedString(
        "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(bookmark)),
      prompt, new LoginOptions(bookmark.getProtocol()));
  }
  this.connect(session, cache, callback);
  return true;
}

代码示例来源:origin: iterate-ch/cyberduck

@Override
  public void change(final Host bookmark) {
    updateField(hostField, bookmark.getHostname());
    hostField.setEnabled(bookmark.getProtocol().isHostnameConfigurable());
    hostField.cell().setPlaceholderString(bookmark.getProtocol().getDefaultHostname());
  }
});

代码示例来源:origin: iterate-ch/cyberduck

if(!bookmark.getProtocol().isHostnameConfigurable()) {
if(!selected.isHostnameConfigurable()) {

相关文章