public class FAQUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FAQUtils.VoteComparator
The class use for comparator Answers by markVotes.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMA |
static int |
DEFAULT_VALUE_UPLOAD_PORTAL |
static String |
DISPLAYAPPROVED |
static String |
DISPLAYBOTH |
static String |
UPLOAD_AVATAR_SIZE |
static String |
UPLOAD_FILE_SIZE |
| Constructor and Description |
|---|
FAQUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
findCateExist(org.exoplatform.faq.service.FAQService faqService_,
UIAnswersContainer fAQContainer)
Find category which is already exist.
for example: when you are standing in category D in path: Root\A\B\C\D, you do some action (add new category, add question, go out to category C or B) but another moderator delete category C (or B, A). |
static List<String> |
getAllLanguages(org.exoplatform.webui.core.UIComponent component) |
static List<String> |
getCategoriesIdFAQPortlet() |
static String |
getCategoryPathName(String categoryPathName,
boolean isReplaceIcon) |
static String |
getCurrentUser()
Deprecated.
use
UserHelper.getCurrentUser() |
static org.exoplatform.services.organization.User |
getCurrentUserObject() |
static String |
getDefaultLanguage() |
static String |
getEmailMoveQuestion(org.exoplatform.faq.service.FAQSetting faqSetting) |
static void |
getEmailSetting(org.exoplatform.faq.service.FAQSetting faqSetting,
boolean isNew,
boolean isSettingForm) |
static String |
getEmailUser(String userName) |
static org.exoplatform.faq.service.FAQService |
getFAQService() |
static String |
getFileSource(org.exoplatform.faq.service.FileAttachment attachment) |
static String |
getFullName(String userName) |
static javax.mail.internet.InternetAddress[] |
getInternetAddress(String addressList) |
static int |
getLimitUploadSize(boolean isAvatar) |
static String |
getLinkDiscuss(String topicId) |
static String |
getLongDateFormat(Date myDate) |
static org.exoplatform.forum.common.user.CommonContact |
getPersonalContact(String userId) |
static void |
getPorletPreference(org.exoplatform.faq.service.FAQSetting faqSetting) |
static String |
getPortletURI()
Get portlet uri
|
static String |
getPortletURL()
Get the current portlet url
|
static Map<String,String> |
getQuestionLanguages(Set<String> langOfQuestion) |
static String |
getQuestionURI(String param,
boolean isAnswer)
Get question URI by question id of question relative path.
|
static String |
getQuestionURL(String param,
boolean isAnswer)
Get question URL by question id of question relative path.
|
static String |
getScreenName(String userName,
String fullName) |
static String |
getShortDateFormat(Date myDate) |
static String |
getSubString(String str,
int max) |
static String |
getTitle(String text) |
static boolean |
getUseAjaxFAQPortlet() |
static String |
getUserAvatar(String userName) |
static String |
getUserFullName(org.exoplatform.services.organization.User user) |
static boolean |
hasPermission(org.exoplatform.faq.service.Category category) |
static boolean |
isFieldEmpty(String s)
Deprecated.
use
CommonUtils.isEmpty(String) |
static boolean |
isValidEmailAddresses(String addressList) |
static String |
renderCategoryTree(org.exoplatform.faq.service.CategoryTree categoryTree,
BaseUIFAQForm uiForm,
String actionName,
String categoryId,
boolean isAddSup) |
static void |
saveFAQPortletPreference(List<String> list,
boolean useAjax) |
static void |
savePortletPreference(org.exoplatform.faq.service.FAQSetting setting,
String emailAddNewQuestion,
String emailEditResponseQuestion) |
static String[] |
splitForFAQ(String str) |
public static String DISPLAYAPPROVED
public static String DISPLAYBOTH
public static String UPLOAD_FILE_SIZE
public static String UPLOAD_AVATAR_SIZE
public static final String COMMA
public static final int DEFAULT_VALUE_UPLOAD_PORTAL
public static org.exoplatform.faq.service.FAQService getFAQService()
throws Exception
Exceptionpublic static String getDefaultLanguage()
public static List<String> getAllLanguages(org.exoplatform.webui.core.UIComponent component)
public static void findCateExist(org.exoplatform.faq.service.FAQService faqService_,
UIAnswersContainer fAQContainer)
throws Exception
faqService_ - FAQ ServicefAQContainer - UIAnswersContainer this component is used to updated datasessionProvider - SessionProviderExceptionpublic static String getCategoryPathName(String categoryPathName, boolean isReplaceIcon)
public static javax.mail.internet.InternetAddress[] getInternetAddress(String addressList) throws Exception
Exceptionpublic static String getCurrentUser() throws Exception
UserHelper.getCurrentUser()Exceptionpublic static org.exoplatform.services.organization.User getCurrentUserObject()
throws Exception
Exceptionpublic static String getEmailUser(String userName) throws Exception
userName - Exceptionpublic static String getFullName(String userName)
userName - Exceptionpublic static String getUserFullName(org.exoplatform.services.organization.User user)
public static boolean isFieldEmpty(String s)
CommonUtils.isEmpty(String)s - public static boolean isValidEmailAddresses(String addressList) throws Exception
Exceptionpublic static List<String> getCategoriesIdFAQPortlet() throws Exception
Exceptionpublic static boolean getUseAjaxFAQPortlet()
public static void saveFAQPortletPreference(List<String> list, boolean useAjax) throws Exception
Exceptionpublic static void getPorletPreference(org.exoplatform.faq.service.FAQSetting faqSetting)
public static void getEmailSetting(org.exoplatform.faq.service.FAQSetting faqSetting,
boolean isNew,
boolean isSettingForm)
public static String getEmailMoveQuestion(org.exoplatform.faq.service.FAQSetting faqSetting)
public static void savePortletPreference(org.exoplatform.faq.service.FAQSetting setting,
String emailAddNewQuestion,
String emailEditResponseQuestion)
public static org.exoplatform.forum.common.user.CommonContact getPersonalContact(String userId)
public static String getFileSource(org.exoplatform.faq.service.FileAttachment attachment) throws Exception
Exceptionpublic static String getPortletURI()
public static String getPortletURL()
public static String getQuestionURI(String param, boolean isAnswer) throws Exception
Exceptionpublic static String getQuestionURL(String param, boolean isAnswer) throws Exception
Exceptionpublic static String getLinkDiscuss(String topicId) throws Exception
Exceptionpublic static int getLimitUploadSize(boolean isAvatar)
public static String renderCategoryTree(org.exoplatform.faq.service.CategoryTree categoryTree, BaseUIFAQForm uiForm, String actionName, String categoryId, boolean isAddSup) throws Exception
Exceptionpublic static boolean hasPermission(org.exoplatform.faq.service.Category category)
Copyright © 2003–2014 eXo Platform SAS. All rights reserved.