Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.replacement.flickr
Class ReplacementServiceFlickrImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.replacement.flickr.ReplacementServiceFlickrImpl
All Implemented Interfaces:
ReplacementService

public class ReplacementServiceFlickrImpl
extends Object
implements ReplacementService

Implements the ReplacementService to provide previews for Flickr links.

Author:
Purvesh Sahoo

Field Summary
static String API_KEY
          API Key required to access the Flickr api.
static String FLICKR_CONFIG_LABEL
          Configuration label shown in the config form.
static String FLICKR_PATTERN
          The regex used to match the link in the message.
static String SOURCE_NAME
          Source name; also used as property label.
 
Constructor Summary
ReplacementServiceFlickrImpl()
          Constructor for ReplacementServiceFlickrImpl.
 
Method Summary
 String getPattern()
          Returns the pattern of the source
 String getReplacement(String sourceString)
          Replaces the Flickr image links with their corresponding thumbnails.
 String getSourceName()
          Returns the source name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLICKR_PATTERN

public static final String FLICKR_PATTERN
The regex used to match the link in the message.

See Also:
Constant Field Values

API_KEY

public static final String API_KEY
API Key required to access the Flickr api.

See Also:
Constant Field Values

FLICKR_CONFIG_LABEL

public static final String FLICKR_CONFIG_LABEL
Configuration label shown in the config form.

See Also:
Constant Field Values

SOURCE_NAME

public static final String SOURCE_NAME
Source name; also used as property label.

See Also:
Constant Field Values
Constructor Detail

ReplacementServiceFlickrImpl

public ReplacementServiceFlickrImpl()
Constructor for ReplacementServiceFlickrImpl.

Method Detail

getReplacement

public String getReplacement(String sourceString)
Replaces the Flickr image links with their corresponding thumbnails.

Specified by:
getReplacement in interface ReplacementService
Parameters:
sourceString - the original flickr image link.
Returns:
replaced thumbnail image link; the original image link in case of no match.

getSourceName

public String getSourceName()
Returns the source name

Specified by:
getSourceName in interface ReplacementService
Returns:
the source name

getPattern

public String getPattern()
Returns the pattern of the source

Specified by:
getPattern in interface ReplacementService
Returns:
the source pattern

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.