lumis.portal.urlshortener
Class MigreMeURLShortener

Package class diagram package MigreMeURLShortener
java.lang.Object
  extended by lumis.portal.urlshortener.MigreMeURLShortener
All Implemented Interfaces:
IURLShortener

public class MigreMeURLShortener
extends java.lang.Object

IURLShortener that uses the Migre.me URL shortening service.

Since:
6.1.0

Field Summary
static java.lang.String PARAMETER_URL
          This is the URL parameter to be used in API URLs.
 
Constructor Summary
MigreMeURLShortener()
           
 
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 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

PARAMETER_URL

public static final java.lang.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
Constructor Detail

MigreMeURLShortener

public MigreMeURLShortener()
Method Detail

getApiURL

protected java.lang.String getApiURL()
Returns the URL shortener API URL to be used.

Returns:

expand

public java.lang.String expand(java.lang.String url)
                        throws PortalException
Expands the given URL.

Parameters:
url - the URL to be expanded.
Returns:
the expanded URL.
Throws:
PortalException

shorten

public java.lang.String shorten(java.lang.String url)
                         throws PortalException
Description copied from interface: IURLShortener
Shortens a given URL.

Specified by:
shorten in interface IURLShortener
Parameters:
url - the URL to be shortened.
Returns:
the shortened URL.
Throws:
PortalException - if some error occur in shortening process.


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.