Class MBMessageLocalServiceUtil

java.lang.Object
com.liferay.message.boards.service.MBMessageLocalServiceUtil

public class MBMessageLocalServiceUtil extends Object
Provides the local service utility for MBMessage. This utility wraps com.liferay.message.boards.service.impl.MBMessageLocalServiceImpl and is an access point for service operations in application layer code running on the local server. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Constructor Details

    • MBMessageLocalServiceUtil

      public MBMessageLocalServiceUtil()
  • Method Details

    • addDiscussionMessage

      public static MBMessage addDiscussionMessage(long userId, String userName, long groupId, String className, long classPK, int workflowAction) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addDiscussionMessage

      public static MBMessage addDiscussionMessage(String externalReferenceCode, long userId, String userName, long groupId, String className, long classPK, long threadId, long parentMessageId, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMBMessage

      public static MBMessage addMBMessage(MBMessage mbMessage)
      Adds the message-boards message to the database. Also notifies the appropriate model listeners.

      Important: Inspect MBMessageLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      mbMessage - the message-boards message
      Returns:
      the message-boards message that was added
    • addMessage

      @Deprecated public static MBMessage addMessage(long userId, String userName, long groupId, long categoryId, long threadId, long parentMessageId, String subject, String body, String format, List<com.liferay.portal.kernel.util.ObjectValuePair<String,InputStream>> inputStreamOVPs, boolean anonymous, double priority, boolean allowPingbacks, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessage

      @Deprecated public static MBMessage addMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessage

      @Deprecated public static MBMessage addMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, String format, List<com.liferay.portal.kernel.util.ObjectValuePair<String,InputStream>> inputStreamOVPs, boolean anonymous, double priority, boolean allowPingbacks, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessage

      @Deprecated public static MBMessage addMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, String format, String fileName, File file, boolean anonymous, double priority, boolean allowPingbacks, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws FileNotFoundException, com.liferay.portal.kernel.exception.PortalException
      Throws:
      FileNotFoundException
      com.liferay.portal.kernel.exception.PortalException
    • addMessage

      public static MBMessage addMessage(String externalReferenceCode, long userId, String userName, long groupId, long categoryId, long threadId, long parentMessageId, String subject, String body, String format, List<com.liferay.portal.kernel.util.ObjectValuePair<String,InputStream>> inputStreamOVPs, boolean anonymous, double priority, boolean allowPingbacks, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessageAttachment

      public static void addMessageAttachment(long userId, long messageId, String fileName, File file, String mimeType) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessageResources

      public static void addMessageResources(long messageId, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessageResources

      public static void addMessageResources(long messageId, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessageResources

      public static void addMessageResources(MBMessage message, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addMessageResources

      public static void addMessageResources(MBMessage message, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addTempAttachment

      public static com.liferay.portal.kernel.repository.model.FileEntry addTempAttachment(long groupId, long userId, String folderName, String fileName, InputStream inputStream, String mimeType) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createMBMessage

      public static MBMessage createMBMessage(long messageId)
      Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
      Parameters:
      messageId - the primary key for the new message-boards message
      Returns:
      the new message-boards message
    • createPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteDiscussionMessage

      public static MBMessage deleteDiscussionMessage(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteDiscussionMessages

      public static void deleteDiscussionMessages(String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteMBMessage

      public static MBMessage deleteMBMessage(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect MBMessageLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      messageId - the primary key of the message-boards message
      Returns:
      the message-boards message that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a message-boards message with the primary key could not be found
    • deleteMBMessage

      public static MBMessage deleteMBMessage(MBMessage mbMessage)
      Deletes the message-boards message from the database. Also notifies the appropriate model listeners.

      Important: Inspect MBMessageLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      mbMessage - the message-boards message
      Returns:
      the message-boards message that was removed
    • deleteMessage

      public static MBMessage deleteMessage(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteMessage

      public static MBMessage deleteMessage(MBMessage message) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteMessageAttachment

      public static void deleteMessageAttachment(long messageId, String fileName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteMessageAttachments

      public static void deleteMessageAttachments(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteTempAttachment

      public static void deleteTempAttachment(long groupId, long userId, String folderName, String fileName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dslQueryCount

      public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dynamicQuery

      public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.message.boards.model.impl.MBMessageModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.message.boards.model.impl.MBMessageModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • emptyMessageAttachments

      public static void emptyMessageAttachments(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchFileEntryMessage

      public static MBMessage fetchFileEntryMessage(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchFirstMessage

      public static MBMessage fetchFirstMessage(long threadId, long parentMessageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchMBMessage

      public static MBMessage fetchMBMessage(long messageId)
    • fetchMBMessageByExternalReferenceCode

      public static MBMessage fetchMBMessageByExternalReferenceCode(String externalReferenceCode, long groupId)
    • fetchMBMessageByUrlSubject

      public static MBMessage fetchMBMessageByUrlSubject(long groupId, String urlSubject)
    • fetchMBMessageByUuidAndGroupId

      public static MBMessage fetchMBMessageByUuidAndGroupId(String uuid, long groupId)
      Returns the message-boards message matching the UUID and group.
      Parameters:
      uuid - the message-boards message's UUID
      groupId - the primary key of the group
      Returns:
      the matching message-boards message, or null if a matching message-boards message could not be found
    • getActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getCategoryMessages

      public static List<MBMessage> getCategoryMessages(long groupId, long categoryId, int status, int start, int end)
    • getCategoryMessages

      public static List<MBMessage> getCategoryMessages(long groupId, long categoryId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getCategoryMessages

      public static List<MBMessage> getCategoryMessages(long groupId, long categoryId, long threadId)
    • getCategoryMessagesCount

      public static int getCategoryMessagesCount(long groupId, long categoryId, int status)
    • getChildMessages

      public static List<MBMessage> getChildMessages(long parentMessageId, int status)
    • getChildMessages

      public static List<MBMessage> getChildMessages(long parentMessageId, int status, int start, int end)
    • getChildMessagesCount

      public static int getChildMessagesCount(long parentMessageId, int status)
    • getCompanyMessages

      public static List<MBMessage> getCompanyMessages(long companyId, int status, int start, int end)
    • getCompanyMessages

      public static List<MBMessage> getCompanyMessages(long companyId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getCompanyMessagesCount

      public static int getCompanyMessagesCount(long companyId, int status)
    • getDiscussionMessageDisplay

      public static MBMessageDisplay getDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getDiscussionMessageDisplay

      public static MBMessageDisplay getDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status, Comparator<MBMessage> comparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getDiscussionMessagesCount

      public static int getDiscussionMessagesCount(long classNameId, long classPK, int status)
    • getDiscussionMessagesCount

      public static int getDiscussionMessagesCount(String className, long classPK, int status)
    • getDiscussions

      public static List<MBDiscussion> getDiscussions(String className)
    • getExportActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getFileEntryMessage

      public static MBMessage getFileEntryMessage(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFirstMessage

      public static MBMessage getFirstMessage(long threadId, long parentMessageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupMessages

      public static List<MBMessage> getGroupMessages(long groupId, int status, int start, int end)
    • getGroupMessages

      public static List<MBMessage> getGroupMessages(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getGroupMessages

      public static List<MBMessage> getGroupMessages(long groupId, long userId, int status, int start, int end)
    • getGroupMessages

      public static List<MBMessage> getGroupMessages(long groupId, long userId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getGroupMessagesCount

      public static int getGroupMessagesCount(long groupId, int status)
    • getGroupMessagesCount

      public static int getGroupMessagesCount(long groupId, long userId, int status)
    • getGroupUserMessageBoardMessagesActivity

      public static List<MBMessage> getGroupUserMessageBoardMessagesActivity(long groupId, long userId, int start, int end)
    • getGroupUserMessageBoardMessagesActivityCount

      public static int getGroupUserMessageBoardMessagesActivityCount(long groupId, long userId)
    • getIndexableActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getLastThreadMessage

      public static MBMessage getLastThreadMessage(long threadId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMBMessage

      public static MBMessage getMBMessage(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the message-boards message with the primary key.
      Parameters:
      messageId - the primary key of the message-boards message
      Returns:
      the message-boards message
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a message-boards message with the primary key could not be found
    • getMBMessageByExternalReferenceCode

      public static MBMessage getMBMessageByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMBMessageByUuidAndGroupId

      public static MBMessage getMBMessageByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the message-boards message matching the UUID and group.
      Parameters:
      uuid - the message-boards message's UUID
      groupId - the primary key of the group
      Returns:
      the matching message-boards message
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching message-boards message could not be found
    • getMBMessages

      public static List<MBMessage> getMBMessages(int start, int end)
      Returns a range of all the message-boards messages.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.message.boards.model.impl.MBMessageModelImpl.

      Parameters:
      start - the lower bound of the range of message-boards messages
      end - the upper bound of the range of message-boards messages (not inclusive)
      Returns:
      the range of message-boards messages
    • getMBMessagesByUuidAndCompanyId

      public static List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the message-boards messages matching the UUID and company.
      Parameters:
      uuid - the UUID of the message-boards messages
      companyId - the primary key of the company
      Returns:
      the matching message-boards messages, or an empty list if no matches were found
    • getMBMessagesByUuidAndCompanyId

      public static List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
      Returns a range of message-boards messages matching the UUID and company.
      Parameters:
      uuid - the UUID of the message-boards messages
      companyId - the primary key of the company
      start - the lower bound of the range of message-boards messages
      end - the upper bound of the range of message-boards messages (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching message-boards messages, or an empty list if no matches were found
    • getMBMessagesCount

      public static int getMBMessagesCount()
      Returns the number of message-boards messages.
      Returns:
      the number of message-boards messages
    • getMessage

      public static MBMessage getMessage(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMessageDisplay

      public static MBMessageDisplay getMessageDisplay(long userId, long messageId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMessageDisplay

      public static MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMessageDisplay

      public static MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status, Comparator<MBMessage> comparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMessages

      public static List<MBMessage> getMessages(String className, long classPK, int status)
    • getOSGiServiceIdentifier

      public static String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPositionInThread

      public static int getPositionInThread(long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRootDiscussionMessages

      public static List<MBMessage> getRootDiscussionMessages(String className, long classPK, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRootDiscussionMessages

      public static List<MBMessage> getRootDiscussionMessages(String className, long classPK, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRootDiscussionMessagesCount

      public static int getRootDiscussionMessagesCount(String className, long classPK, int status)
    • getTempAttachmentNames

      public static String[] getTempAttachmentNames(long groupId, long userId, String folderName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getThreadMessages

      public static List<MBMessage> getThreadMessages(long threadId, int status)
    • getThreadMessages

      public static List<MBMessage> getThreadMessages(long threadId, int status, Comparator<MBMessage> comparator)
    • getThreadMessages

      public static List<MBMessage> getThreadMessages(long threadId, int status, int start, int end)
    • getThreadMessages

      public static List<MBMessage> getThreadMessages(long threadId, long parentMessageId)
    • getThreadMessages

      public static List<MBMessage> getThreadMessages(long userId, long threadId, int status, int start, int end, Comparator<MBMessage> comparator)
    • getThreadMessagesCount

      public static int getThreadMessagesCount(long threadId, boolean answer)
    • getThreadMessagesCount

      public static int getThreadMessagesCount(long threadId, int status)
    • getThreadRepliesMessages

      public static List<MBMessage> getThreadRepliesMessages(long threadId, int status, int start, int end)
    • getUserDiscussionMessages

      public static List<MBMessage> getUserDiscussionMessages(long userId, long classNameId, long classPK, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getUserDiscussionMessages

      public static List<MBMessage> getUserDiscussionMessages(long userId, long[] classNameIds, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getUserDiscussionMessages

      public static List<MBMessage> getUserDiscussionMessages(long userId, String className, long classPK, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator)
    • getUserDiscussionMessagesCount

      public static int getUserDiscussionMessagesCount(long userId, long classNameId, long classPK, int status)
    • getUserDiscussionMessagesCount

      public static int getUserDiscussionMessagesCount(long userId, long[] classNameIds, int status)
    • getUserDiscussionMessagesCount

      public static int getUserDiscussionMessagesCount(long userId, String className, long classPK, int status)
    • moveMessageAttachmentToTrash

      public static long moveMessageAttachmentToTrash(long userId, long messageId, String fileName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • restoreMessageAttachmentFromTrash

      public static void restoreMessageAttachmentFromTrash(long userId, long messageId, String deletedFileName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • subscribeMessage

      public static void subscribeMessage(long userId, long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • unsubscribeMessage

      public static void unsubscribeMessage(long userId, long messageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateAnswer

      public static MBMessage updateAnswer(long messageId, boolean answer, boolean cascade) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateAnswer

      public static MBMessage updateAnswer(MBMessage message, boolean answer, boolean cascade) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateAsset

      public static void updateAsset(long userId, MBMessage message, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateDiscussionMessage

      public static MBMessage updateDiscussionMessage(long userId, long messageId, String className, long classPK, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateMBMessage

      public static MBMessage updateMBMessage(MBMessage mbMessage)
      Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect MBMessageLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      mbMessage - the message-boards message
      Returns:
      the message-boards message that was updated
    • updateMessage

      public static MBMessage updateMessage(long userId, long messageId, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateMessage

      public static MBMessage updateMessage(long userId, long messageId, String subject, String body, List<com.liferay.portal.kernel.util.ObjectValuePair<String,InputStream>> inputStreamOVPs, double priority, boolean allowPingbacks, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      public static MBMessage updateStatus(long userId, long messageId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateUserName

      public static void updateUserName(long userId, String userName)
    • getService

      public static MBMessageLocalService getService()