本文整理了Java中ch.cyberduck.core.Protocol.getName()
方法的一些代码示例,展示了Protocol.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.getName()
方法的具体详情如下:
包路径:ch.cyberduck.core.Protocol
类名称:Protocol
方法名:getName
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getName() {
final String v = this.value("Name");
if(StringUtils.isBlank(v)) {
return parent.getName();
}
return v;
}
代码示例来源:origin: iterate-ch/cyberduck
public static String toString(final Host bookmark, final boolean username) {
if(StringUtils.isEmpty(bookmark.getNickname())) {
if(StringUtils.isNotBlank(bookmark.getProtocol().getDefaultNickname())) {
return bookmark.getProtocol().getDefaultNickname();
}
final String prefix;
// Return default bookmark name
if(username && !bookmark.getCredentials().isAnonymousLogin() && StringUtils.isNotBlank(bookmark.getCredentials().getUsername())) {
prefix = String.format("%s@", bookmark.getCredentials().getUsername());
}
else {
prefix = StringUtils.EMPTY;
}
if(StringUtils.isNotBlank(bookmark.getHostname())) {
return String.format("%s%s \u2013 %s", prefix, StringUtils.strip(bookmark.getHostname()), bookmark.getProtocol().getName());
}
if(StringUtils.isNotBlank(bookmark.getProtocol().getDefaultHostname())) {
return String.format("%s%s \u2013 %s", prefix, StringUtils.strip(bookmark.getProtocol().getDefaultHostname()), bookmark.getProtocol().getName());
}
return String.format("%s%s", prefix, bookmark.getProtocol().getName());
}
// Return custom bookmark name set
return bookmark.getNickname();
}
}
代码示例来源:origin: iterate-ch/cyberduck
bookmark.getProtocol().getName(), hostname));
bookmark.getProtocol().getName()));
bookmark.getProtocol().getName()),
MessageFormat.format("{0} {1}.", MessageFormat.format(LocaleFactory.localizedString("{0} will be sent in plaintext.", "Credentials"),
bookmark.getProtocol().getPasswordPlaceholder()),
代码示例来源:origin: iterate-ch/cyberduck
try {
callback.warn(host,
MessageFormat.format(LocaleFactory.localizedString("Unsecured {0} connection", "Credentials"), host.getProtocol().getName()),
MessageFormat.format("{0} {1}.", MessageFormat.format(LocaleFactory.localizedString("The server supports encrypted connections. Do you want to switch to {0}?", "Credentials"),
new DAVSSLProtocol().getName()), LocaleFactory.localizedString("Please contact your web hosting service provider for assistance", "Support")),
代码示例来源:origin: iterate-ch/cyberduck
MessageFormat.format(LocaleFactory.localizedString("Unsecured {0} connection", "Credentials"), host.getProtocol().getName()),
MessageFormat.format("{0} {1}.", MessageFormat.format(LocaleFactory.localizedString("The server supports encrypted connections. Do you want to switch to {0}?", "Credentials"),
ProtocolFactory.get().forScheme(Scheme.ftps).getName()), LocaleFactory.localizedString("Please contact your web hosting service provider for assistance", "Support")),
LocaleFactory.localizedString("Continue", "Credentials"),
LocaleFactory.localizedString("Change", "Credentials"),
代码示例来源:origin: iterate-ch/cyberduck
@Override
public NSToolbarItem toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(final NSToolbar toolbar, final String identifier, final boolean flag) {
NSToolbarItem item = super.toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(toolbar, identifier, flag);
switch(InfoToolbarItem.valueOf(identifier)) {
case distribution:
if(session.getFeature(DistributionConfiguration.class) != null) {
// Give icon and label of the given session
item.setImage(IconCacheFactory.<NSImage>get().iconNamed(session.getHost().getProtocol().icon(), 32));
}
else {
// CloudFront is the default for custom distributions
item.setImage(IconCacheFactory.<NSImage>get().iconNamed(new S3Protocol().icon(), 32));
}
break;
case s3:
// Set icon of cloud service provider
item.setLabel(session.getHost().getProtocol().getName());
item.setImage(IconCacheFactory.<NSImage>get().iconNamed(session.getHost().getProtocol().icon(), 32));
break;
case metadata:
item.setImage(IconCacheFactory.<NSImage>get().iconNamed("pencil.tiff", 32));
break;
case acl:
item.setImage(IconCacheFactory.<NSImage>get().iconNamed("permissions.tiff", 32));
break;
}
return item;
}
内容来源于网络,如有侵权,请联系作者删除!