class B2UrlProvider implements UrlProvider {

    @Override
    public DescriptiveUrlBag toUrl(final Path file) {
        if(file.isVolume()) {
            return DescriptiveUrlBag.empty();
        }
        final DescriptiveUrlBag list = new DescriptiveUrlBag();
        if(file.isFile()) {
            final String download = String.format("%s/file/%s/%s", session.getClient().getDownloadUrl(),
                URIEncoder.encode(containerService.getContainer(file).getName()),
                URIEncoder.encode(containerService.getKey(file)));
            list.add(new DescriptiveUrl(URI.create(download), DescriptiveUrl.Type.http,
                MessageFormat.format(LocaleFactory.localizedString("{0} URL"), Scheme.https.name().toUpperCase(Locale.ROOT))));
            list.addAll(new WebUrlProvider(session.getHost()).toUrl(file));
        }
        return list;
    }

    public  B2UrlProvider(final B2Session session);

}