class SwiftUrlProvider implements UrlProvider {

    @Override
    public DescriptiveUrlBag toUrl(final Path file) {
        final DescriptiveUrlBag list = new DescriptiveUrlBag();
        if(file.isFile()) {
            Region region = null;
            try {
                region = regionService.lookup(file);
            }
            catch(BackgroundException e) {
                log.warn(String.format("Failure looking up region for %s %s", file, e.getMessage()));
            }
            if(null == region) {
                list.addAll(new DefaultUrlProvider(session.getHost()).toUrl(file));
            }
            else {
                list.addAll(new WebUrlProvider(session.getHost()).toUrl(file));
                list.add(new DescriptiveUrl(
                        URI.create(region.getStorageUrl(containerService.getContainer(file).getName(), containerService.getKey(file)).toString()),
                        DescriptiveUrl.Type.provider,
                        MessageFormat.format(LocaleFactory.localizedString("{0} URL"),
                                session.getHost().getProtocol().getScheme().name().toUpperCase(Locale.ROOT))
                ));
                // In one hour
                list.addAll(this.sign(region, file, this.getExpiry((int) TimeUnit.HOURS.toSeconds(1))));
                // Default signed URL expiring in 24 hours.
                list.addAll(this.sign(region, file, this.getExpiry((int) TimeUnit.SECONDS.toSeconds(
                        PreferencesFactory.get().getInteger("s3.url.expire.seconds")))));
                // 1 Week
                list.addAll(this.sign(region, file, this.getExpiry((int) TimeUnit.DAYS.toSeconds(7))));
                // 1 Month
                list.addAll(this.sign(region, file, this.getExpiry((int) TimeUnit.DAYS.toSeconds(30))));
                // 1 Year
                list.addAll(this.sign(region, file, this.getExpiry((int) TimeUnit.DAYS.toSeconds(365))));
            }
        }
        return list;
    }

    public  SwiftUrlProvider(final SwiftSession session);
    public  SwiftUrlProvider(final SwiftSession session, final Map<Region, AccountInfo> accounts);
    public  SwiftUrlProvider(final SwiftSession session, final Map<Region, AccountInfo> accounts, final SwiftRegionService regionService);

}