Class URLGenerator
- java.lang.Object
-
- 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
- Version:
- $Revision: 17955 $ $Date: 2015-11-19 14:54:22 -0200 (Thu, 19 Nov 2015) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
REGEX_HASHTAG
static String
REGEX_WEBPAGE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
analyzeEmbbededLinks(String analyzedText, String regex)
Method that analyzes embedded links in the analyzed textString
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 InstanceString
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.
-
-
-
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 textregex
- 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 DouiContexthashtag
- The analyzed hashtagtransaction
-- Returns:
- the hashtag hiperlink
- Throws:
ManagerException
PortalException
- Since:
- 6.1.0
-
-