Package lumis.portal.urlshortener
Class DummyURLShortener
- java.lang.Object
-
- lumis.portal.urlshortener.DummyURLShortener
-
- All Implemented Interfaces:
IURLShortener
public class DummyURLShortener extends Object
Dummy implementation that returns the same URL.- Since:
- 6.1.0
- Version:
- $Revision: 13752 $ $Date: 2011-10-13 14:10:51 -0300 (Thu, 13 Oct 2011) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAMETER_URL
This is the URL parameter to be used in API URLs.
-
Constructor Summary
Constructors Constructor Description DummyURLShortener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
PARAMETER_URL
public static final String PARAMETER_URL
This is the URL parameter to be used in API URLs. This parameter will be replaced by the URL to be shortened.- Since:
- 6.1.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
shorten
public String shorten(String url) throws PortalException
Description copied from interface:IURLShortener
Shortens a given URL.- Specified by:
shorten
in interfaceIURLShortener
- Parameters:
url
- the URL to be shortened.- Returns:
- the shortened URL.
- Throws:
PortalException
- if some error occur in shortening process.
-
expand
public String expand(String url) throws PortalException
Expands the given URL.- Parameters:
url
- the URL to be expanded.- Returns:
- the expanded URL.
- Throws:
PortalException
-
getApiURL
protected String getApiURL() throws PortalException
Returns the URL shortener API URL to be used.- Returns:
- Throws:
PortalException
-
-