Go to file
Giancarlo Panichi 7a97006815 Update CHANGELOG.md 2025-10-10 15:19:36 +02:00
.settings migrated to shlink service 2025-07-14 15:34:25 +02:00
src commented JUnit Test 2025-07-29 16:46:54 +02:00
.classpath migrated to shlink service 2025-07-14 15:34:25 +02:00
.gitignore gitignore 2025-05-07 15:58:47 +02:00
.project migrated to shlink service 2025-07-14 15:34:25 +02:00
CHANGELOG.md Update CHANGELOG.md 2025-10-10 15:19:36 +02:00
CITATION.cff updated 2025-07-07 10:18:07 +02:00
FUNDING.md created the branch, updated the readme and the version 2025-07-04 12:03:46 +02:00
LICENSE.md Migrated to git 2019-11-26 15:05:52 +01:00
README.md updated the README 2025-07-16 16:12:09 +02:00
descriptor.xml created the branch, updated the readme and the version 2025-07-04 12:03:46 +02:00
pom.xml Implemented the feature #29758 2025-07-29 15:58:22 +02:00
profile.xml Migrated to git 2019-11-26 15:05:52 +01:00

README.md

gCube URL Shortener jdk8

This Java library integrates with the Shlink service hosted by D4Science to convert long URLs into shorter, more manageable links that are easier to share, tweet, or email to colleagues.

Built With

Documentation

The UrlShortener Java class provides methods to shorten URLs using the Shlink service, with configuration automatically detected for the current scope. It supports both new and legacy Information System (IS) sources for service discovery, and allows optional tags and custom domains when generating short URLs.

Key Features:

  • Read service configuration from resource (HTTP-URL-Shortener-Shlink)
  • Fallback to legacy IS if needed
  • The configuration requires an API key and domain for authentication with the Shlink service
  • Provides methods: shorten(String), shorten(String, String[]), and isAvailable() for URL shortening and service status checks
  • Each instance is scope-specific and not thread-safe
  • Throws exceptions if resource configuration cannot be read or is not valid
  • Gracefully returns the original long URL if shortening fails

Change log

See the URL Shortener Releases

Authors

How to Cite this Software

Tell people how to cite this software.

  • Cite an associated paper?
  • Use a specific BibTeX entry for the software?
    @Manual{,
        title = {gCube URL Shortener},
        author = {Francesco Mangiacrapa at ISTI-CNR Infrascience Group},
        organization = {ISTI - CNR},
        address = {Pisa, Italy},
        year = 2025,
        note = {A Java library for interacting with D4Science Shlink service to create manageable short links},
        url = {http://www.http://gcube-system.org/}
    } 

License

This project is licensed under the terms specified in the LICENSE.md file

About the gCube Framework

This software is part of the gCubeFramework: an open-source software toolkit used for building and operating Hybrid Data Infrastructures enabling the dynamic deployment of Virtual Research Environments by favouring the realisation of reuse oriented policies.

The projects leading to this software have received funding from a series of European Union programmes see FUNDING.md