public class MBUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BB_CODE_EDITOR_WYSIWYG_IMPL_KEY |
static java.lang.String |
MESSAGE_POP_PORTLET_PREFIX |
| Constructor and Description |
|---|
MBUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPortletBreadcrumbEntries(long categoryId,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse) |
static void |
addPortletBreadcrumbEntries(com.liferay.portlet.messageboards.model.MBCategory category,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse) |
static void |
addPortletBreadcrumbEntries(com.liferay.portlet.messageboards.model.MBMessage message,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse) |
static void |
collectMultipartContent(javax.mail.internet.MimeMultipart multipart,
MBMailMessage collector) |
static void |
collectPartContent(javax.mail.Part part,
MBMailMessage mbMailMessage) |
static java.lang.String |
getAbsolutePath(javax.portlet.PortletRequest portletRequest,
long mbCategoryId) |
static long |
getCategoryId(javax.servlet.http.HttpServletRequest request,
com.liferay.portlet.messageboards.model.MBCategory category) |
static long |
getCategoryId(javax.servlet.http.HttpServletRequest request,
com.liferay.portlet.messageboards.model.MBMessage message) |
static long |
getCategoryId(java.lang.String messageIdString) |
static java.util.Set<java.lang.Long> |
getCategorySubscriptionClassPKs(long userId) |
static java.lang.String |
getEmailFromAddress(javax.portlet.PortletPreferences preferences,
long companyId) |
static java.lang.String |
getEmailFromName(javax.portlet.PortletPreferences preferences,
long companyId) |
static boolean |
getEmailHtmlFormat(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageAddedBody(javax.portlet.PortletPreferences preferences) |
static boolean |
getEmailMessageAddedEnabled(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageAddedSignature(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageAddedSubject(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageUpdatedBody(javax.portlet.PortletPreferences preferences) |
static boolean |
getEmailMessageUpdatedEnabled(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageUpdatedSignature(javax.portlet.PortletPreferences preferences) |
static java.lang.String |
getEmailMessageUpdatedSubject(javax.portlet.PortletPreferences preferences) |
static java.util.List<java.lang.Object> |
getEntries(com.liferay.portal.kernel.search.Hits hits) |
static java.lang.String |
getMessageFormat(javax.portlet.PortletPreferences preferences) |
static long |
getMessageId(java.lang.String messageIdString) |
static int |
getMessageIdStringOffset() |
static long |
getParentMessageId(javax.mail.Message message) |
static java.lang.String |
getParentMessageIdString(javax.mail.Message message) |
static java.lang.String |
getReplyToAddress(long categoryId,
long messageId,
java.lang.String mx,
java.lang.String defaultMailingListAddress) |
static java.lang.String |
getSubjectForEmail(com.liferay.portlet.messageboards.model.MBMessage message) |
static java.lang.String |
getSubjectWithoutMessageId(javax.mail.Message message) |
static java.lang.String[] |
getThreadPriority(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
double value,
com.liferay.portal.theme.ThemeDisplay themeDisplay) |
static java.util.Set<java.lang.Long> |
getThreadSubscriptionClassPKs(long userId) |
static java.util.Date |
getUnbanDate(com.liferay.portlet.messageboards.model.MBBan ban,
int expireInterval) |
static java.lang.String |
getUserRank(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
int posts) |
static java.lang.String[] |
getUserRank(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
com.liferay.portlet.messageboards.model.MBStatsUser statsUser) |
static boolean |
hasMailIdHeader(javax.mail.Message message) |
static boolean |
isAllowAnonymousPosting(javax.portlet.PortletPreferences preferences) |
static boolean |
isValidMessageFormat(java.lang.String messageFormat) |
static boolean |
isViewableMessage(com.liferay.portal.theme.ThemeDisplay themeDisplay,
com.liferay.portlet.messageboards.model.MBMessage message) |
static boolean |
isViewableMessage(com.liferay.portal.theme.ThemeDisplay themeDisplay,
com.liferay.portlet.messageboards.model.MBMessage message,
com.liferay.portlet.messageboards.model.MBMessage parentMessage) |
static void |
propagatePermissions(long companyId,
long groupId,
long parentMessageId,
com.liferay.portal.service.ServiceContext serviceContext) |
static java.lang.String |
replaceMessageBodyPaths(com.liferay.portal.theme.ThemeDisplay themeDisplay,
java.lang.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) |
public static final java.lang.String BB_CODE_EDITOR_WYSIWYG_IMPL_KEY
public static final java.lang.String MESSAGE_POP_PORTLET_PREFIX
public static void addPortletBreadcrumbEntries(long categoryId,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
java.lang.Exceptionpublic static void addPortletBreadcrumbEntries(com.liferay.portlet.messageboards.model.MBCategory category,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
java.lang.Exceptionpublic static void addPortletBreadcrumbEntries(com.liferay.portlet.messageboards.model.MBMessage message,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
java.lang.Exceptionpublic static void collectMultipartContent(javax.mail.internet.MimeMultipart multipart,
MBMailMessage collector)
throws java.lang.Exception
java.lang.Exceptionpublic static void collectPartContent(javax.mail.Part part,
MBMailMessage mbMailMessage)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getAbsolutePath(javax.portlet.PortletRequest portletRequest,
long mbCategoryId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static long getCategoryId(javax.servlet.http.HttpServletRequest request,
com.liferay.portlet.messageboards.model.MBCategory category)
public static long getCategoryId(javax.servlet.http.HttpServletRequest request,
com.liferay.portlet.messageboards.model.MBMessage message)
public static long getCategoryId(java.lang.String messageIdString)
public static java.util.Set<java.lang.Long> getCategorySubscriptionClassPKs(long userId)
throws com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.SystemExceptionpublic static java.lang.String getEmailFromAddress(javax.portlet.PortletPreferences preferences,
long companyId)
throws com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.SystemExceptionpublic static java.lang.String getEmailFromName(javax.portlet.PortletPreferences preferences,
long companyId)
throws com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.SystemExceptionpublic static boolean getEmailHtmlFormat(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageAddedBody(javax.portlet.PortletPreferences preferences)
public static boolean getEmailMessageAddedEnabled(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageAddedSignature(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageAddedSubject(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageUpdatedBody(javax.portlet.PortletPreferences preferences)
public static boolean getEmailMessageUpdatedEnabled(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageUpdatedSignature(javax.portlet.PortletPreferences preferences)
public static java.lang.String getEmailMessageUpdatedSubject(javax.portlet.PortletPreferences preferences)
public static java.util.List<java.lang.Object> getEntries(com.liferay.portal.kernel.search.Hits hits)
public static java.lang.String getMessageFormat(javax.portlet.PortletPreferences preferences)
public static long getMessageId(java.lang.String messageIdString)
public static int getMessageIdStringOffset()
public static long getParentMessageId(javax.mail.Message message)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getParentMessageIdString(javax.mail.Message message)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getReplyToAddress(long categoryId,
long messageId,
java.lang.String mx,
java.lang.String defaultMailingListAddress)
public static java.lang.String getSubjectForEmail(com.liferay.portlet.messageboards.model.MBMessage message)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getSubjectWithoutMessageId(javax.mail.Message message)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String[] getThreadPriority(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
double value,
com.liferay.portal.theme.ThemeDisplay themeDisplay)
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Set<java.lang.Long> getThreadSubscriptionClassPKs(long userId)
throws com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.SystemExceptionpublic static java.util.Date getUnbanDate(com.liferay.portlet.messageboards.model.MBBan ban,
int expireInterval)
public static java.lang.String getUserRank(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
int posts)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String[] getUserRank(javax.portlet.PortletPreferences preferences,
java.lang.String languageId,
com.liferay.portlet.messageboards.model.MBStatsUser statsUser)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean hasMailIdHeader(javax.mail.Message message)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean isAllowAnonymousPosting(javax.portlet.PortletPreferences preferences)
public static boolean isValidMessageFormat(java.lang.String messageFormat)
public static boolean isViewableMessage(com.liferay.portal.theme.ThemeDisplay themeDisplay,
com.liferay.portlet.messageboards.model.MBMessage message)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean isViewableMessage(com.liferay.portal.theme.ThemeDisplay themeDisplay,
com.liferay.portlet.messageboards.model.MBMessage message,
com.liferay.portlet.messageboards.model.MBMessage parentMessage)
throws java.lang.Exception
java.lang.Exceptionpublic static void propagatePermissions(long companyId,
long groupId,
long parentMessageId,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static java.lang.String replaceMessageBodyPaths(com.liferay.portal.theme.ThemeDisplay themeDisplay,
java.lang.String messageBody)
public static void updateCategoryMessageCount(long companyId,
long categoryId)
public static void updateCategoryStatistics(long companyId,
long categoryId)
public static void updateCategoryThreadCount(long companyId,
long categoryId)
public static void updateThreadMessageCount(long companyId,
long threadId)