|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.portal.urlshortener.CustomURLShortener
public class CustomURLShortener
Custom URL shortener. This shortener uses a parameter map
to
create the API URL to be used by the AbstractURLShortener
.
Field Summary | |
---|---|
static java.lang.String |
PARAMETER_URL
This is the URL parameter to be used in API URLs. |
static java.lang.String |
PARAMETER_URL_PROPERTY_KEY
|
Constructor Summary | |
---|---|
CustomURLShortener()
|
Method Summary | |
---|---|
java.lang.String |
expand(java.lang.String url)
Expands the given URL. |
protected java.lang.String |
getApiURL()
Returns the URL shortener API URL to be used. |
java.lang.String |
getCustomUrl()
Returns the custom URL set on this shortener. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Returns the parameter map associated with this shortener. |
java.lang.String |
shorten(java.lang.String url)
Shortens a given URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PARAMETER_URL_PROPERTY_KEY
public static final java.lang.String PARAMETER_URL
Constructor Detail |
---|
public CustomURLShortener()
Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.String> getParameters()
protected java.lang.String getApiURL() throws PortalException
PortalException
public java.lang.String getCustomUrl() throws PortalException
PortalException
public java.lang.String expand(java.lang.String url) throws PortalException
url
- the URL to be expanded.
PortalException
public java.lang.String shorten(java.lang.String url) throws PortalException
IURLShortener
shorten
in interface IURLShortener
url
- the URL to be shortened.
PortalException
- if some error occur in shortening process.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |