Liferay 7.0-ce-b4

com.liferay.portlet.messageboards.util
Class MBUtil

java.lang.Object
  extended by com.liferay.portlet.messageboards.util.MBUtil

public class MBUtil
extends Object


Field Summary
static String BB_CODE_EDITOR_WYSIWYG_IMPL_KEY
           
static String EMOTICONS
           
static String MESSAGE_POP_PORTLET_PREFIX
           
 
Constructor Summary
MBUtil()
           
 
Method Summary
static void collectMultipartContent(javax.mail.internet.MimeMultipart multipart, MBMailMessage collector)
           
static void collectPartContent(javax.mail.Part part, MBMailMessage mbMailMessage)
           
static String getAbsolutePath(PortletRequest portletRequest, long mbCategoryId)
           
static String getBBCodeHTML(String msgBody, String pathThemeImages)
           
static long getCategoryId(javax.servlet.http.HttpServletRequest request, MBCategory category)
           
static long getCategoryId(javax.servlet.http.HttpServletRequest request, MBMessage message)
           
static long getCategoryId(String messageIdString)
           
static Set<Long> getCategorySubscriptionClassPKs(long userId)
           
static Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName)
           
static Map<String,String> getEmailFromDefinitionTerms(PortletRequest portletRequest)
           
static List<Object> getEntries(Hits hits)
           
static long getMessageId(String messageIdString)
           
static int getMessageIdStringOffset()
           
static long getParentMessageId(javax.mail.Message message)
           
static String getParentMessageIdString(javax.mail.Message message)
           
static String getReplyToAddress(long categoryId, long messageId, String mx, String defaultMailingListAddress)
           
static String getRSSURL(long plid, long categoryId, long threadId, long userId, ThemeDisplay themeDisplay)
           
static String getSubjectForEmail(MBMessage message)
           
static String getSubjectWithoutMessageId(javax.mail.Message message)
           
static String[] getThreadPriority(MBGroupServiceSettings mbGroupServiceSettings, String languageId, double value, ThemeDisplay themeDisplay)
           
static Set<Long> getThreadSubscriptionClassPKs(long userId)
           
static Date getUnbanDate(MBBan ban, int expireInterval)
           
static String getUserRank(MBGroupServiceSettings mbGroupServiceSettings, String languageId, int posts)
           
static String[] getUserRank(MBGroupServiceSettings mbGroupServiceSettings, String languageId, MBStatsUser statsUser)
           
static boolean hasMailIdHeader(javax.mail.Message message)
           
static boolean isValidMessageFormat(String messageFormat)
           
static boolean isViewableMessage(ThemeDisplay themeDisplay, MBMessage message)
           
static boolean isViewableMessage(ThemeDisplay themeDisplay, MBMessage message, MBMessage parentMessage)
           
static void propagatePermissions(long companyId, long groupId, long parentMessageId, ServiceContext serviceContext)
           
static String replaceMessageBodyPaths(ThemeDisplay themeDisplay, String messageBody)
           
static void updateCategoryMessageCount(long categoryId)
           
static void updateCategoryStatistics(long categoryId)
           
static void updateCategoryThreadCount(long categoryId)
           
static void updateThreadMessageCount(long threadId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BB_CODE_EDITOR_WYSIWYG_IMPL_KEY

public static final String BB_CODE_EDITOR_WYSIWYG_IMPL_KEY
See Also:
Constant Field Values

EMOTICONS

public static final String EMOTICONS
See Also:
Constant Field Values

MESSAGE_POP_PORTLET_PREFIX

public static final String MESSAGE_POP_PORTLET_PREFIX
See Also:
Constant Field Values
Constructor Detail

MBUtil

public MBUtil()
Method Detail

collectMultipartContent

public static void collectMultipartContent(javax.mail.internet.MimeMultipart multipart,
                                           MBMailMessage collector)
                                    throws Exception
Throws:
Exception

collectPartContent

public static void collectPartContent(javax.mail.Part part,
                                      MBMailMessage mbMailMessage)
                               throws Exception
Throws:
Exception

getAbsolutePath

public static String getAbsolutePath(PortletRequest portletRequest,
                                     long mbCategoryId)
                              throws PortalException
Throws:
PortalException

getBBCodeHTML

public static String getBBCodeHTML(String msgBody,
                                   String pathThemeImages)

getCategoryId

public static long getCategoryId(javax.servlet.http.HttpServletRequest request,
                                 MBCategory category)

getCategoryId

public static long getCategoryId(javax.servlet.http.HttpServletRequest request,
                                 MBMessage message)

getCategoryId

public static long getCategoryId(String messageIdString)

getCategorySubscriptionClassPKs

public static Set<Long> getCategorySubscriptionClassPKs(long userId)

getEmailDefinitionTerms

public static Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest,
                                                         String emailFromAddress,
                                                         String emailFromName)

getEmailFromDefinitionTerms

public static Map<String,String> getEmailFromDefinitionTerms(PortletRequest portletRequest)

getEntries

public static List<Object> getEntries(Hits hits)

getMessageId

public static long getMessageId(String messageIdString)

getMessageIdStringOffset

public static int getMessageIdStringOffset()

getParentMessageId

public static long getParentMessageId(javax.mail.Message message)
                               throws Exception
Throws:
Exception

getParentMessageIdString

public static String getParentMessageIdString(javax.mail.Message message)
                                       throws Exception
Throws:
Exception

getReplyToAddress

public static String getReplyToAddress(long categoryId,
                                       long messageId,
                                       String mx,
                                       String defaultMailingListAddress)

getRSSURL

public static String getRSSURL(long plid,
                               long categoryId,
                               long threadId,
                               long userId,
                               ThemeDisplay themeDisplay)

getSubjectForEmail

public static String getSubjectForEmail(MBMessage message)
                                 throws Exception
Throws:
Exception

getSubjectWithoutMessageId

public static String getSubjectWithoutMessageId(javax.mail.Message message)
                                         throws Exception
Throws:
Exception

getThreadPriority

public static String[] getThreadPriority(MBGroupServiceSettings mbGroupServiceSettings,
                                         String languageId,
                                         double value,
                                         ThemeDisplay themeDisplay)
                                  throws Exception
Throws:
Exception

getThreadSubscriptionClassPKs

public static Set<Long> getThreadSubscriptionClassPKs(long userId)

getUnbanDate

public static Date getUnbanDate(MBBan ban,
                                int expireInterval)

getUserRank

public static String getUserRank(MBGroupServiceSettings mbGroupServiceSettings,
                                 String languageId,
                                 int posts)
                          throws Exception
Throws:
Exception

getUserRank

public static String[] getUserRank(MBGroupServiceSettings mbGroupServiceSettings,
                                   String languageId,
                                   MBStatsUser statsUser)
                            throws Exception
Throws:
Exception

hasMailIdHeader

public static boolean hasMailIdHeader(javax.mail.Message message)
                               throws Exception
Throws:
Exception

isValidMessageFormat

public static boolean isValidMessageFormat(String messageFormat)

isViewableMessage

public static boolean isViewableMessage(ThemeDisplay themeDisplay,
                                        MBMessage message)
                                 throws Exception
Throws:
Exception

isViewableMessage

public static boolean isViewableMessage(ThemeDisplay themeDisplay,
                                        MBMessage message,
                                        MBMessage parentMessage)
                                 throws Exception
Throws:
Exception

propagatePermissions

public static void propagatePermissions(long companyId,
                                        long groupId,
                                        long parentMessageId,
                                        ServiceContext serviceContext)
                                 throws PortalException
Throws:
PortalException

replaceMessageBodyPaths

public static String replaceMessageBodyPaths(ThemeDisplay themeDisplay,
                                             String messageBody)

updateCategoryMessageCount

public static void updateCategoryMessageCount(long categoryId)

updateCategoryStatistics

public static void updateCategoryStatistics(long categoryId)

updateCategoryThreadCount

public static void updateCategoryThreadCount(long categoryId)

updateThreadMessageCount

public static void updateThreadMessageCount(long threadId)

Liferay 7.0-ce-b4