public class CustomURLShortener extends Object
map
to
create the API URL to be used by the AbstractURLShortener
.Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_URL
This is the URL parameter to be used in API URLs.
|
static String |
PARAMETER_URL_PROPERTY_KEY |
Constructor and Description |
---|
CustomURLShortener() |
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 |
getCustomUrl()
Returns the custom URL set on this shortener.
|
Map<String,String> |
getParameters()
Returns the parameter map associated with this shortener.
|
String |
shorten(String url)
Shortens a given URL.
|
public static final String PARAMETER_URL_PROPERTY_KEY
public static final String PARAMETER_URL
public Map<String,String> getParameters()
protected String getApiURL() throws PortalException
PortalException
public String getCustomUrl() throws PortalException
PortalException
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.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.