Class MBMessageLocalServiceUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MBMessageaddDiscussionMessage(long userId, String userName, long groupId, String className, long classPK, int workflowAction) static MBMessageaddDiscussionMessage(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) static MBMessageaddMBMessage(MBMessage mbMessage) Adds the message-boards message to the database.static MBMessageaddMessage(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) Deprecated.static MBMessageaddMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) Deprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)static MBMessageaddMessage(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) Deprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)static MBMessageaddMessage(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) Deprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)static MBMessageaddMessage(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) static voidaddMessageAttachment(long userId, long messageId, String fileName, File file, String mimeType) static voidaddMessageResources(long messageId, boolean addGroupPermissions, boolean addGuestPermissions) static voidaddMessageResources(long messageId, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) static voidaddMessageResources(MBMessage message, boolean addGroupPermissions, boolean addGuestPermissions) static voidaddMessageResources(MBMessage message, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) static com.liferay.portal.kernel.repository.model.FileEntryaddTempAttachment(long groupId, long userId, String folderName, String fileName, InputStream inputStream, String mimeType) static MBMessagecreateMBMessage(long messageId) Creates a new message-boards message with the primary key.static com.liferay.portal.kernel.model.PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static MBMessagedeleteDiscussionMessage(long messageId) static voiddeleteDiscussionMessages(String className, long classPK) static MBMessagedeleteMBMessage(long messageId) Deletes the message-boards message with the primary key from the database.static MBMessagedeleteMBMessage(MBMessage mbMessage) Deletes the message-boards message from the database.static MBMessagedeleteMessage(long messageId) static MBMessagedeleteMessage(MBMessage message) static voiddeleteMessageAttachment(long messageId, String fileName) static voiddeleteMessageAttachments(long messageId) static com.liferay.portal.kernel.model.PersistedModeldeletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) static voiddeleteTempAttachment(long groupId, long userId, String folderName, String fileName) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static com.liferay.portal.kernel.dao.orm.DynamicQuerystatic <T> List<T>dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.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.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.static longdynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(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.static voidemptyMessageAttachments(long messageId) static MBMessagefetchFileEntryMessage(long fileEntryId) static MBMessagefetchFirstMessage(long threadId, long parentMessageId) static MBMessagefetchMBMessage(long messageId) static MBMessagefetchMBMessageByExternalReferenceCode(String externalReferenceCode, long groupId) static MBMessagefetchMBMessageByUrlSubject(long groupId, String urlSubject) static MBMessagefetchMBMessageByUuidAndGroupId(String uuid, long groupId) Returns the message-boards message matching the UUID and group.static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuerygetCategoryMessages(long groupId, long categoryId, int status, int start, int end) getCategoryMessages(long groupId, long categoryId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) getCategoryMessages(long groupId, long categoryId, long threadId) static intgetCategoryMessagesCount(long groupId, long categoryId, int status) getChildMessages(long parentMessageId, int status) getChildMessages(long parentMessageId, int status, int start, int end) static intgetChildMessagesCount(long parentMessageId, int status) getCompanyMessages(long companyId, int status, int start, int end) getCompanyMessages(long companyId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) static intgetCompanyMessagesCount(long companyId, int status) static MBMessageDisplaygetDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status) static MBMessageDisplaygetDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status, Comparator<MBMessage> comparator) static intgetDiscussionMessagesCount(long classNameId, long classPK, int status) static intgetDiscussionMessagesCount(String className, long classPK, int status) static List<MBDiscussion>getDiscussions(String className) static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuerygetExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) static MBMessagegetFileEntryMessage(long fileEntryId) static MBMessagegetFirstMessage(long threadId, long parentMessageId) getGroupMessages(long groupId, int status, int start, int end) getGroupMessages(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) getGroupMessages(long groupId, long userId, int status, int start, int end) getGroupMessages(long groupId, long userId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) static intgetGroupMessagesCount(long groupId, int status) static intgetGroupMessagesCount(long groupId, long userId, int status) getGroupUserMessageBoardMessagesActivity(long groupId, long userId, int start, int end) static intgetGroupUserMessageBoardMessagesActivityCount(long groupId, long userId) static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuerystatic MBMessagegetLastThreadMessage(long threadId, int status) static MBMessagegetMBMessage(long messageId) Returns the message-boards message with the primary key.static MBMessagegetMBMessageByExternalReferenceCode(String externalReferenceCode, long groupId) static MBMessagegetMBMessageByUuidAndGroupId(String uuid, long groupId) Returns the message-boards message matching the UUID and group.getMBMessages(int start, int end) Returns a range of all the message-boards messages.getMBMessagesByUuidAndCompanyId(String uuid, long companyId) Returns all the message-boards messages matching the UUID and company.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.static intReturns the number of message-boards messages.static MBMessagegetMessage(long messageId) static MBMessageDisplaygetMessageDisplay(long userId, long messageId, int status) static MBMessageDisplaygetMessageDisplay(long userId, MBMessage message, int status) static MBMessageDisplaygetMessageDisplay(long userId, MBMessage message, int status, Comparator<MBMessage> comparator) getMessages(String className, long classPK, int status) static StringReturns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModelgetPersistedModel(Serializable primaryKeyObj) static intgetPositionInThread(long messageId) getRootDiscussionMessages(String className, long classPK, int status) getRootDiscussionMessages(String className, long classPK, int status, int start, int end) static intgetRootDiscussionMessagesCount(String className, long classPK, int status) static MBMessageLocalServicestatic String[]getTempAttachmentNames(long groupId, long userId, String folderName) getThreadMessages(long threadId, int status) getThreadMessages(long threadId, int status, int start, int end) getThreadMessages(long threadId, int status, Comparator<MBMessage> comparator) getThreadMessages(long threadId, long parentMessageId) getThreadMessages(long userId, long threadId, int status, int start, int end, Comparator<MBMessage> comparator) static intgetThreadMessagesCount(long threadId, boolean answer) static intgetThreadMessagesCount(long threadId, int status) getThreadRepliesMessages(long threadId, int status, int start, int end) getUserDiscussionMessages(long userId, long[] classNameIds, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) getUserDiscussionMessages(long userId, long classNameId, long classPK, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) getUserDiscussionMessages(long userId, String className, long classPK, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBMessage> orderByComparator) static intgetUserDiscussionMessagesCount(long userId, long[] classNameIds, int status) static intgetUserDiscussionMessagesCount(long userId, long classNameId, long classPK, int status) static intgetUserDiscussionMessagesCount(long userId, String className, long classPK, int status) static longmoveMessageAttachmentToTrash(long userId, long messageId, String fileName) static voidrestoreMessageAttachmentFromTrash(long userId, long messageId, String deletedFileName) static voidsubscribeMessage(long userId, long messageId) static voidunsubscribeMessage(long userId, long messageId) static MBMessageupdateAnswer(long messageId, boolean answer, boolean cascade) static MBMessageupdateAnswer(MBMessage message, boolean answer, boolean cascade) static voidupdateAsset(long userId, MBMessage message, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds) static MBMessageupdateDiscussionMessage(long userId, long messageId, String className, long classPK, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) static MBMessageupdateMBMessage(MBMessage mbMessage) Updates the message-boards message in the database or adds it if it does not yet exist.static MBMessageupdateMessage(long userId, long messageId, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) static MBMessageupdateMessage(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) static MBMessageupdateStatus(long userId, long messageId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String, Serializable> workflowContext) static voidupdateUserName(long userId, String userName)
-
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
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.PortalExceptionDeprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)- 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 Deprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)- 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.PortalExceptionDeprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)- 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 Deprecated.As of Cavanaugh (7.4.x), replaced byaddMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)- Throws:
FileNotFoundExceptioncom.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
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
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
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBMessageModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBMessageModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 queryprojection- 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
-
fetchMBMessageByExternalReferenceCode
-
fetchMBMessageByUrlSubject
-
fetchMBMessageByUuidAndGroupId
Returns the message-boards message matching the UUID and group.- Parameters:
uuid- the message-boards message's UUIDgroupId- the primary key of the group- Returns:
- the matching message-boards message, or
nullif a matching message-boards message could not be found
-
getActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getCategoryMessages
-
getCategoryMessages
-
getCategoryMessages
-
getCategoryMessagesCount
public static int getCategoryMessagesCount(long groupId, long categoryId, int status) -
getChildMessages
-
getChildMessages
-
getChildMessagesCount
public static int getChildMessagesCount(long parentMessageId, int status) -
getCompanyMessages
-
getCompanyMessages
-
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
-
getDiscussions
-
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
-
getGroupMessages
-
getGroupMessages
-
getGroupMessages
-
getGroupMessagesCount
public static int getGroupMessagesCount(long groupId, int status) -
getGroupMessagesCount
public static int getGroupMessagesCount(long groupId, long userId, int status) -
getGroupUserMessageBoardMessagesActivity
-
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 UUIDgroupId- 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
Returns a range of all the message-boards messages.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBMessageModelImpl.- Parameters:
start- the lower bound of the range of message-boards messagesend- the upper bound of the range of message-boards messages (not inclusive)- Returns:
- the range of message-boards messages
-
getMBMessagesByUuidAndCompanyId
Returns all the message-boards messages matching the UUID and company.- Parameters:
uuid- the UUID of the message-boards messagescompanyId- 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 messagescompanyId- the primary key of the companystart- the lower bound of the range of message-boards messagesend- the upper bound of the range of message-boards messages (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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
-
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
-
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
-
getThreadMessages
public static List<MBMessage> getThreadMessages(long threadId, int status, Comparator<MBMessage> comparator) -
getThreadMessages
-
getThreadMessages
-
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
-
getUserDiscussionMessages
-
getUserDiscussionMessages
-
getUserDiscussionMessages
-
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
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
-
getService
-
addMessage(String, long, String, long, long, long, long, String, String, String, List, boolean, double, boolean, ServiceContext)