@Override public boolean add(final DescriptiveUrl url) { if(url.equals(DescriptiveUrl.EMPTY)) { return false; } return super.add(url); }
public static NSAttributedString create(final DescriptiveUrl url) { if(url.equals(DescriptiveUrl.EMPTY)) { return NSAttributedString.attributedString(StringUtils.EMPTY); } return create(url.getUrl()); }
if(file.getType().contains(Path.Type.placeholder)) { final DescriptiveUrl link = new DriveUrlProvider().toUrl(file).find(DescriptiveUrl.Type.http); if(DescriptiveUrl.EMPTY.equals(link)) { log.warn(String.format("Missing web link for file %s", file)); return new NullInputStream(file.attributes().getSize());
if(file.getType().contains(Path.Type.placeholder)) { final DescriptiveUrl link = new OneDriveUrlProvider().toUrl(file).find(DescriptiveUrl.Type.http); if(DescriptiveUrl.EMPTY.equals(link)) { log.warn(String.format("Missing web link for file %s", file)); return new NullInputStream(file.attributes().getSize());
if(!DescriptiveUrl.EMPTY.equals(provider)) { try { if(options.quarantine) {
private void initWebUrl() { // Web URL if(this.numberOfFiles() > 1) { this.updateField(webUrlField, String.format("(%s)", LocaleFactory.localizedString("Multiple files"))); webUrlField.setToolTip(StringUtils.EMPTY); } else { this.updateField(webUrlField, LocaleFactory.localizedString("Unknown")); final Path file = this.getSelected(); final DescriptiveUrl http = session.getFeature(UrlProvider.class).toUrl(file).find(DescriptiveUrl.Type.http); if(!http.equals(DescriptiveUrl.EMPTY)) { webUrlField.setAttributedStringValue(HyperlinkAttributedStringFactory.create(http)); webUrlField.setToolTip(LocaleFactory.localizedString("Open in Web Browser")); } } }
if(!origin.equals(DescriptiveUrl.EMPTY)) { distributionOriginField.setAttributedStringValue(HyperlinkAttributedStringFactory.create(origin)); if(!url.equals(DescriptiveUrl.EMPTY)) { distributionUrlField.setAttributedStringValue(HyperlinkAttributedStringFactory.create(url)); distributionUrlField.setToolTip(LocaleFactory.localizedString("CDN URL")); distributionCnameField.setStringValue(StringUtils.join(cnames, ' ')); final DescriptiveUrl url = cdn.toUrl(file).find(DescriptiveUrl.Type.cname); if(!url.equals(DescriptiveUrl.EMPTY)) {
if(file.isFile()) { final DescriptiveUrl authenticated = session.getFeature(UrlProvider.class).toUrl(file).find(DescriptiveUrl.Type.authenticated); if(!authenticated.equals(DescriptiveUrl.EMPTY)) { aclUrlField.setAttributedStringValue(HyperlinkAttributedStringFactory.create(authenticated)); aclUrlField.setToolTip(authenticated.getHelp());