com.liferay.portlet.messageboards.util
Class MBUtil
java.lang.Object
com.liferay.portlet.messageboards.util.MBUtil
public class MBUtil
- extends Object
Method Summary |
static void |
addPortletBreadcrumbEntries(long categoryId,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
static void |
addPortletBreadcrumbEntries(MBCategory category,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
static void |
addPortletBreadcrumbEntries(MBMessage message,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
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 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 String |
getEmailFromAddress(PortletPreferences preferences,
long companyId)
|
static String |
getEmailFromName(PortletPreferences preferences,
long companyId)
|
static boolean |
getEmailHtmlFormat(PortletPreferences preferences)
|
static String |
getEmailMessageAddedBody(PortletPreferences preferences)
|
static boolean |
getEmailMessageAddedEnabled(PortletPreferences preferences)
|
static String |
getEmailMessageAddedSignature(PortletPreferences preferences)
|
static String |
getEmailMessageAddedSubject(PortletPreferences preferences)
|
static String |
getEmailMessageUpdatedBody(PortletPreferences preferences)
|
static boolean |
getEmailMessageUpdatedEnabled(PortletPreferences preferences)
|
static String |
getEmailMessageUpdatedSignature(PortletPreferences preferences)
|
static String |
getEmailMessageUpdatedSubject(PortletPreferences preferences)
|
static List<Object> |
getEntries(Hits hits)
|
static String |
getMessageFormat(PortletPreferences preferences)
|
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 |
getSubjectForEmail(MBMessage message)
|
static String |
getSubjectWithoutMessageId(javax.mail.Message message)
|
static String[] |
getThreadPriority(PortletPreferences preferences,
String languageId,
double value,
ThemeDisplay themeDisplay)
|
static Set<Long> |
getThreadSubscriptionClassPKs(long userId)
|
static Date |
getUnbanDate(MBBan ban,
int expireInterval)
|
static String |
getUserRank(PortletPreferences preferences,
String languageId,
int posts)
|
static String[] |
getUserRank(PortletPreferences preferences,
String languageId,
MBStatsUser statsUser)
|
static boolean |
hasMailIdHeader(javax.mail.Message message)
|
static boolean |
isAllowAnonymousPosting(PortletPreferences preferences)
|
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 companyId,
long categoryId)
|
static void |
updateCategoryStatistics(long companyId,
long categoryId)
|
static void |
updateCategoryThreadCount(long companyId,
long categoryId)
|
static void |
updateThreadMessageCount(long companyId,
long threadId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BB_CODE_EDITOR_WYSIWYG_IMPL_KEY
public static final String BB_CODE_EDITOR_WYSIWYG_IMPL_KEY
- See Also:
- Constant Field Values
MESSAGE_POP_PORTLET_PREFIX
public static final String MESSAGE_POP_PORTLET_PREFIX
- See Also:
- Constant Field Values
MBUtil
public MBUtil()
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(long categoryId,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(MBCategory category,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(MBMessage message,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
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,
SystemException
- Throws:
PortalException
SystemException
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)
throws SystemException
- Throws:
SystemException
getEmailFromAddress
public static String getEmailFromAddress(PortletPreferences preferences,
long companyId)
throws SystemException
- Throws:
SystemException
getEmailFromName
public static String getEmailFromName(PortletPreferences preferences,
long companyId)
throws SystemException
- Throws:
SystemException
getEmailHtmlFormat
public static boolean getEmailHtmlFormat(PortletPreferences preferences)
getEmailMessageAddedBody
public static String getEmailMessageAddedBody(PortletPreferences preferences)
getEmailMessageAddedEnabled
public static boolean getEmailMessageAddedEnabled(PortletPreferences preferences)
getEmailMessageAddedSignature
public static String getEmailMessageAddedSignature(PortletPreferences preferences)
getEmailMessageAddedSubject
public static String getEmailMessageAddedSubject(PortletPreferences preferences)
getEmailMessageUpdatedBody
public static String getEmailMessageUpdatedBody(PortletPreferences preferences)
getEmailMessageUpdatedEnabled
public static boolean getEmailMessageUpdatedEnabled(PortletPreferences preferences)
getEmailMessageUpdatedSignature
public static String getEmailMessageUpdatedSignature(PortletPreferences preferences)
getEmailMessageUpdatedSubject
public static String getEmailMessageUpdatedSubject(PortletPreferences preferences)
getEntries
public static List<Object> getEntries(Hits hits)
getMessageFormat
public static String getMessageFormat(PortletPreferences preferences)
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)
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(PortletPreferences preferences,
String languageId,
double value,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getThreadSubscriptionClassPKs
public static Set<Long> getThreadSubscriptionClassPKs(long userId)
throws SystemException
- Throws:
SystemException
getUnbanDate
public static Date getUnbanDate(MBBan ban,
int expireInterval)
getUserRank
public static String getUserRank(PortletPreferences preferences,
String languageId,
int posts)
throws Exception
- Throws:
Exception
getUserRank
public static String[] getUserRank(PortletPreferences preferences,
String languageId,
MBStatsUser statsUser)
throws Exception
- Throws:
Exception
hasMailIdHeader
public static boolean hasMailIdHeader(javax.mail.Message message)
throws Exception
- Throws:
Exception
isAllowAnonymousPosting
public static boolean isAllowAnonymousPosting(PortletPreferences preferences)
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,
SystemException
- Throws:
PortalException
SystemException
replaceMessageBodyPaths
public static String replaceMessageBodyPaths(ThemeDisplay themeDisplay,
String messageBody)
updateCategoryMessageCount
public static void updateCategoryMessageCount(long companyId,
long categoryId)
updateCategoryStatistics
public static void updateCategoryStatistics(long companyId,
long categoryId)
updateCategoryThreadCount
public static void updateCategoryThreadCount(long companyId,
long categoryId)
updateThreadMessageCount
public static void updateThreadMessageCount(long companyId,
long threadId)