|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.forum.common.CommonUtils
public class CommonUtils
| Field Summary | |
|---|---|
static String |
AMP
|
static String |
AMP_HEX
|
static String |
AMP_NUMBER
|
static String |
AMP_SPACE
|
static String |
ASTERISK_STR
|
static String |
COLON
|
static String |
COMMA
|
static String |
DOMAIN_KEY
|
static String |
EMPTY_STR
|
static String |
FROM_KEY
|
static String |
GREATER_THAN
|
static String |
LESS_THAN
|
static String |
PERCENT_STR
|
static String |
QUOT
|
static String |
SEMICOLON
|
static String |
SLASH
|
static String |
SPACE
|
| Constructor Summary | |
|---|---|
CommonUtils()
|
|
| Method Summary | ||
|---|---|---|
static String |
convertCodeHTML(String s)
|
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
createSystemProvider()
|
|
static String |
decodeSpecialCharToHTMLnumber(String s)
|
|
static String |
decodeSpecialCharToHTMLnumber(String s,
List<String> lIgnore)
|
|
static String |
decodeSpecialCharToHTMLnumberIgnore(String str)
Decode special chars to HTML number ignore char Less than '<' and Greater than '>' |
|
static String |
encodeSpecialCharInContent(String s)
Encode special character, use for input content of object (only apply for input by FCKEditer). |
|
static String |
encodeSpecialCharInSearchTerm(String s)
Encode special character, use for input search |
|
static String |
encodeSpecialCharInTitle(String s)
Encode special character, use for input title or name of the object. |
|
static String |
encodeSpecialCharToHTMLnumber(String s,
String charIgnore,
boolean isTitle)
Encode special character to html number. |
|
static String |
generateCheckSum(byte[] b)
Generates checksum for files, and get a file ending in .sha1 This task can also be used to perform checksum verifications. |
|
static
|
getComponent(Class<T> type)
|
|
static String |
getDomainURL()
|
|
static org.exoplatform.container.ExoContainer |
getExoContainer(org.quartz.JobExecutionContext context)
Get a Component from the current container context |
|
static Calendar |
getGreenwichMeanTime()
Get current time GMT/Zulu or UTC,(zone time is 0+GMT) |
|
static String |
getImageUrl(String imagePath)
|
|
static String |
getRSSLink(String appType,
String portalName,
String objectId)
|
|
static String |
getUserRSSLink(String apptype,
String userId)
|
|
static File |
getXMLFile(ByteArrayOutputStream bos,
String appName,
String objectType,
Date createDate,
String fileName)
|
|
static boolean |
hasSpecialCharacter(String input)
To check the input content has special characters or not. |
|
static boolean |
isContainSpecialCharacter(String s)
|
|
static boolean |
isEmpty(String s)
Check string is null or empty |
|
static boolean |
isEmpty(String[] array)
check string array is whether empty or not |
|
static String |
makeNotificationSender(String from)
This function will change email address in 'from' field by address of mail service which is configured as system property : gatein.email.smtp.from or mail.from. |
|
static String |
processBBCode(String s)
|
|
static String |
processSearchCondition(String searchCondition)
Process the search condition correspond to each context |
|
static String |
removeSpecialCharacterForSearch(String input)
Filter all invalid character (anything except word, number, space and search wildcard) from search conditional. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMMA
public static final String SLASH
public static final String EMPTY_STR
public static final String COLON
public static final String SEMICOLON
public static final String SPACE
public static final String ASTERISK_STR
public static final String PERCENT_STR
public static final String AMP_NUMBER
public static final String LESS_THAN
public static final String GREATER_THAN
public static final String QUOT
public static final String AMP_SPACE
public static final String AMP_HEX
public static final String AMP
public static final String DOMAIN_KEY
public static final String FROM_KEY
| Constructor Detail |
|---|
public CommonUtils()
| Method Detail |
|---|
public static String generateCheckSum(byte[] b)
throws Exception
b -
Exception
public static File getXMLFile(ByteArrayOutputStream bos,
String appName,
String objectType,
Date createDate,
String fileName)
throws Exception
Exception
public static String getImageUrl(String imagePath)
throws Exception
Exceptionpublic static String convertCodeHTML(String s)
public static String makeNotificationSender(String from)
gatein.email.smtp.from or mail.from. from field
of message from smtp authentication (for now, GMX, MS exchange deny, Gmail efforts to modify the such value)
from -
public static String getDomainURL()
public static String processBBCode(String s)
s -
public static org.exoplatform.container.ExoContainer getExoContainer(org.quartz.JobExecutionContext context)
T - type of the expected componenttype - key for the component
public static String getRSSLink(String appType,
String portalName,
String objectId)
public static String getUserRSSLink(String apptype,
String userId)
public static boolean isEmpty(String s)
String - s
public static boolean isEmpty(String[] array)
array -
public static String removeSpecialCharacterForSearch(String input)
input - the input string
public static boolean hasSpecialCharacter(String input)
input -
public static String processSearchCondition(String searchCondition)
searchCondition - the search conditionpublic static String encodeSpecialCharInSearchTerm(String s)
String - s, the string input
public static String encodeSpecialCharInTitle(String s)
String - s, the string input
public static String encodeSpecialCharInContent(String s)
String - s, the string input
public static boolean isContainSpecialCharacter(String s)
public static String encodeSpecialCharToHTMLnumber(String s,
String charIgnore,
boolean isTitle)
String - s, the string inputString - charIgnore, the string content ignore some special character can not encode.boolean - isTitle, the boolean for check convert is title or not.
public static String decodeSpecialCharToHTMLnumber(String s,
List<String> lIgnore)
public static String decodeSpecialCharToHTMLnumber(String s)
public static String decodeSpecialCharToHTMLnumberIgnore(String str)
str -
public static Calendar getGreenwichMeanTime()
public static <T> T getComponent(Class<T> type)
public static org.exoplatform.services.jcr.ext.common.SessionProvider createSystemProvider()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||