public class TinyURLShortener extends Object
IURLShortener
that uses the TinyURL
URL shortening service.Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_URL
This is the URL parameter to be used in API URLs.
|
Constructor and Description |
---|
TinyURLShortener() |
Modifier and Type | Method and Description |
---|---|
String |
expand(String url)
Expands the given URL.
|
protected String |
getApiURL()
Returns the URL shortener API URL to be used.
|
String |
shorten(String url)
Shortens a given URL.
|
public static final String PARAMETER_URL
protected String getApiURL()
public String expand(String url) throws PortalException
url
- the URL to be expanded.PortalException
public String shorten(String url) throws PortalException
IURLShortener
shorten
in interface IURLShortener
url
- the URL to be shortened.PortalException
- if some error occur in shortening process.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.