本文整理了Java中ch.cyberduck.core.Protocol.getDescription()
方法的一些代码示例,展示了Protocol.getDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.getDescription()
方法的具体详情如下:
包路径:ch.cyberduck.core.Protocol
类名称:Protocol
方法名:getDescription
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getDescription() {
final String v = this.value("Description");
if(StringUtils.isBlank(v)) {
return parent.getDescription();
}
return v;
}
代码示例来源:origin: iterate-ch/cyberduck
private String getOAuthPrefix(final Host bookmark) {
if(StringUtils.isNotBlank(bookmark.getCredentials().getUsername())) {
return String.format("%s (%s)", bookmark.getProtocol().getDescription(), bookmark.getCredentials().getUsername());
}
return bookmark.getProtocol().getDescription();
}
代码示例来源: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
private void addProtocol(final Protocol protocol) {
final String title = protocol.getDescription();
this.protocolPopup.addItemWithTitle(title);
this.protocolPopup.lastItem().setRepresentedObject(String.valueOf(protocol.hashCode()));
this.protocolPopup.lastItem().setImage(IconCacheFactory.<NSImage>get().iconNamed(protocol.icon(), 16));
}
代码示例来源:origin: iterate-ch/cyberduck
private void addProtocol(final Protocol protocol) {
final String title = protocol.getDescription();
protocolCombobox.addItemWithTitle(title);
protocolCombobox.lastItem().setRepresentedObject(String.valueOf(protocol.hashCode()));
protocolCombobox.lastItem().setImage(IconCacheFactory.<NSImage>get().iconNamed(protocol.icon(), 16));
}
内容来源于网络,如有侵权,请联系作者删除!