lumis.service.socialnetworkservices.microblog.core.util
Class URLGenerator

Package class diagram package URLGenerator
java.lang.Object
  extended by lumis.service.socialnetworkservices.microblog.core.util.URLGenerator

public class URLGenerator
extends Object

Util class used to deal with issues such as URL's and Hashtags.

Since:
6.1.0

Field Summary
static String REGEX_HASHTAG
           
static String REGEX_WEBPAGE
           
 
Method Summary
 List<String> analyzeEmbbededLinks(String analyzedText, String regex)
          Method that analyzes embedded links in the analyzed text
 String generateHashtagLink(DouiContext douiContext, String hashtag, String serviceInstanceId, ITransaction transaction)
          Method that generates the hashtag hyperlink for the correct 'view hashtag results' interface instance.
static URLGenerator getInstance()
          Returns URLGenerator Instance
 String processHashtagsAndURLs(String analyzedText, DouiContext douiContext, String serviceInstanceId, ITransaction transaction)
          This method is responsible to analyze and process embbeded URLs and hashtags present in a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGEX_WEBPAGE

public static final String REGEX_WEBPAGE
See Also:
Constant Field Values

REGEX_HASHTAG

public static final String REGEX_HASHTAG
See Also:
Constant Field Values
Method Detail

getInstance

public static URLGenerator getInstance()
Returns URLGenerator Instance

Returns:
the URL Generator Instance
Since:
6.1.0

analyzeEmbbededLinks

public List<String> analyzeEmbbededLinks(String analyzedText,
                                         String regex)
Method that analyzes embedded links in the analyzed text

Parameters:
analyzedText - the analyzed text
regex - regex pattern to be analyzed
Returns:
the links
Since:
6.1.0

processHashtagsAndURLs

public String processHashtagsAndURLs(String analyzedText,
                                     DouiContext douiContext,
                                     String serviceInstanceId,
                                     ITransaction transaction)
                              throws PortalException
This method is responsible to analyze and process embbeded URLs and hashtags present in a String.

Returns:
Throws:
PortalException
Since:
6.1.0

generateHashtagLink

public String generateHashtagLink(DouiContext douiContext,
                                  String hashtag,
                                  String serviceInstanceId,
                                  ITransaction transaction)
                           throws ManagerException,
                                  PortalException
Method that generates the hashtag hyperlink for the correct 'view hashtag results' interface instance.

Parameters:
douiContext - The DouiContext
hashtag - The analyzed hashtag
transaction -
Returns:
the hashtag hiperlink
Throws:
ManagerException
PortalException
Since:
6.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.