Liferay 7.0-ce-b4

com.liferay.portlet.messageboards.service
Interface MBMessageLocalService

All Superinterfaces:
BaseLocalService, PersistedModelLocalService
All Known Implementing Classes:
MBMessageLocalServiceWrapper

@ProviderType
@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface MBMessageLocalService
extends BaseLocalService, PersistedModelLocalService

Provides the local service interface for MBMessage. 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:
MBMessageLocalServiceUtil, com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl, com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl

Method Summary
 MBMessage addDiscussionMessage(long userId, String userName, long groupId, String className, long classPK, int workflowAction)
           
 MBMessage addDiscussionMessage(long userId, String userName, long groupId, String className, long classPK, long threadId, long parentMessageId, String subject, String body, ServiceContext serviceContext)
           
 MBMessage addMBMessage(MBMessage mbMessage)
          Adds the message-boards message to the database.
 MBMessage addMessage(long userId, String userName, long groupId, long categoryId, long threadId, long parentMessageId, String subject, String body, String format, List<ObjectValuePair<String,InputStream>> inputStreamOVPs, boolean anonymous, double priority, boolean allowPingbacks, ServiceContext serviceContext)
           
 MBMessage addMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, ServiceContext serviceContext)
           
 MBMessage addMessage(long userId, String userName, long groupId, long categoryId, String subject, String body, String format, List<ObjectValuePair<String,InputStream>> inputStreamOVPs, boolean anonymous, double priority, boolean allowPingbacks, ServiceContext serviceContext)
           
 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, ServiceContext serviceContext)
           
 MBMessage addMessage(long userId, String userName, long categoryId, String subject, String body, ServiceContext serviceContext)
          Deprecated. As of 7.0.0, replaced by addMessage(long, String, long, long, String, String, ServiceContext)
 void addMessageAttachment(long userId, long messageId, String fileName, File file, String mimeType)
           
 void addMessageResources(long messageId, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addMessageResources(long messageId, ModelPermissions modelPermissions)
           
 void addMessageResources(MBMessage message, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addMessageResources(MBMessage message, ModelPermissions modelPermissions)
           
 MBMessage createMBMessage(long messageId)
          Creates a new message-boards message with the primary key.
 MBMessage deleteDiscussionMessage(long messageId)
           
 void deleteDiscussionMessages(String className, long classPK)
           
 MBMessage deleteMBMessage(long messageId)
          Deletes the message-boards message with the primary key from the database.
 MBMessage deleteMBMessage(MBMessage mbMessage)
          Deletes the message-boards message from the database.
 MBMessage deleteMessage(long messageId)
           
 MBMessage deleteMessage(MBMessage message)
           
 void deleteMessageAttachment(long messageId, String fileName)
           
 void deleteMessageAttachments(long messageId)
           
 PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
 DynamicQuery dynamicQuery()
           
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
 long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
 void emptyMessageAttachments(long messageId)
           
 MBMessage fetchMBMessage(long messageId)
           
 MBMessage fetchMBMessageByUuidAndGroupId(String uuid, long groupId)
          Returns the message-boards message matching the UUID and group.
 ActionableDynamicQuery getActionableDynamicQuery()
           
 List<MBMessage> getCategoryMessages(long groupId, long categoryId, int status, int start, int end)
           
 List<MBMessage> getCategoryMessages(long groupId, long categoryId, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 int getCategoryMessagesCount(long groupId, long categoryId, int status)
           
 List<MBMessage> getCompanyMessages(long companyId, int status, int start, int end)
           
 List<MBMessage> getCompanyMessages(long companyId, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 int getCompanyMessagesCount(long companyId, int status)
           
 MBMessageDisplay getDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status)
           
 MBMessageDisplay getDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status, Comparator<MBMessage> comparator)
           
 MBMessageDisplay getDiscussionMessageDisplay(long userId, long groupId, String className, long classPK, int status, String threadView)
          Deprecated. As of 7.0.0, replaced by getDiscussionMessageDisplay(long, long, String, long, int)
 int getDiscussionMessagesCount(long classNameId, long classPK, int status)
           
 int getDiscussionMessagesCount(String className, long classPK, int status)
           
 List<MBDiscussion> getDiscussions(String className)
           
 ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
           
 List<MBMessage> getGroupMessages(long groupId, int status, int start, int end)
           
 List<MBMessage> getGroupMessages(long groupId, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 List<MBMessage> getGroupMessages(long groupId, long userId, int status, int start, int end)
           
 List<MBMessage> getGroupMessages(long groupId, long userId, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 int getGroupMessagesCount(long groupId, int status)
           
 int getGroupMessagesCount(long groupId, long userId, int status)
           
 IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
           
 MBMessage getMBMessage(long messageId)
          Returns the message-boards message with the primary key.
 MBMessage getMBMessageByUuidAndGroupId(String uuid, long groupId)
          Returns the message-boards message matching the UUID and group.
 List<MBMessage> getMBMessages(int start, int end)
          Returns a range of all the message-boards messages.
 List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid, long companyId)
          Returns all the message-boards messages matching the UUID and company.
 List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<MBMessage> orderByComparator)
          Returns a range of message-boards messages matching the UUID and company.
 int getMBMessagesCount()
          Returns the number of message-boards messages.
 MBMessage getMessage(long messageId)
           
 MBMessageDisplay getMessageDisplay(long userId, long messageId, int status, boolean includePrevAndNext)
           
 MBMessageDisplay getMessageDisplay(long userId, long messageId, int status, String threadView, boolean includePrevAndNext)
          Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, long, int, boolean)
 MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status, boolean includePrevAndNext)
           
 MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status, boolean includePrevAndNext, Comparator<MBMessage> comparator)
           
 MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status, String threadView, boolean includePrevAndNext)
          Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, MBMessage, int, boolean)
 MBMessageDisplay getMessageDisplay(long userId, MBMessage message, int status, String threadView, boolean includePrevAndNext, Comparator<MBMessage> comparator)
          Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, MBMessage, int, boolean, Comparator) (
 List<MBMessage> getMessages(String className, long classPK, int status)
           
 List<MBMessage> getNoAssetMessages()
           
 String getOSGiServiceIdentifier()
          Returns the OSGi service identifier.
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 int getPositionInThread(long messageId)
           
 List<MBMessage> getThreadMessages(long threadId, int status)
           
 List<MBMessage> getThreadMessages(long threadId, int status, Comparator<MBMessage> comparator)
           
 List<MBMessage> getThreadMessages(long threadId, int status, int start, int end)
           
 int getThreadMessagesCount(long threadId, int status)
           
 List<MBMessage> getThreadRepliesMessages(long threadId, int status, int start, int end)
           
 List<MBMessage> getUserDiscussionMessages(long userId, long[] classNameIds, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 List<MBMessage> getUserDiscussionMessages(long userId, long classNameId, long classPK, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 List<MBMessage> getUserDiscussionMessages(long userId, String className, long classPK, int status, int start, int end, OrderByComparator<MBMessage> obc)
           
 int getUserDiscussionMessagesCount(long userId, long[] classNameIds, int status)
           
 int getUserDiscussionMessagesCount(long userId, long classNameId, long classPK, int status)
           
 int getUserDiscussionMessagesCount(long userId, String className, long classPK, int status)
           
 long moveMessageAttachmentToTrash(long userId, long messageId, String fileName)
           
 void restoreMessageAttachmentFromTrash(long userId, long messageId, String deletedFileName)
           
 void subscribeMessage(long userId, long messageId)
           
 void unsubscribeMessage(long userId, long messageId)
           
 void updateAnswer(long messageId, boolean answer, boolean cascade)
           
 void updateAnswer(MBMessage message, boolean answer, boolean cascade)
           
 void updateAsset(long userId, MBMessage message, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds)
           
 MBMessage updateDiscussionMessage(long userId, long messageId, String className, long classPK, String subject, String body, ServiceContext serviceContext)
           
 MBMessage updateMBMessage(MBMessage mbMessage)
          Updates the message-boards message in the database or adds it if it does not yet exist.
 MBMessage updateMessage(long userId, long messageId, String body, ServiceContext serviceContext)
           
 MBMessage updateMessage(long userId, long messageId, String subject, String body, List<ObjectValuePair<String,InputStream>> inputStreamOVPs, List<String> existingFiles, double priority, boolean allowPingbacks, ServiceContext serviceContext)
           
 MBMessage updateMessage(long messageId, String body)
          Deprecated. As of 7.0.0, with no direct replacement
 MBMessage updateStatus(long userId, long messageId, int status, ServiceContext serviceContext)
          Deprecated. As of 7.0.0, replaced by updateStatus(long, long, int, ServiceContext, Map)
 MBMessage updateStatus(long userId, long messageId, int status, ServiceContext serviceContext, Map<String,Serializable> workflowContext)
           
 void updateUserName(long userId, String userName)
           
 

Method Detail

addDiscussionMessage

MBMessage addDiscussionMessage(long userId,
                               String userName,
                               long groupId,
                               String className,
                               long classPK,
                               long threadId,
                               long parentMessageId,
                               String subject,
                               String body,
                               ServiceContext serviceContext)
                               throws PortalException
Throws:
PortalException

addDiscussionMessage

MBMessage addDiscussionMessage(long userId,
                               String userName,
                               long groupId,
                               String className,
                               long classPK,
                               int workflowAction)
                               throws PortalException
Throws:
PortalException

addMBMessage

@Indexable(type=REINDEX)
MBMessage addMBMessage(MBMessage mbMessage)
Adds the message-boards message to the database. Also notifies the appropriate model listeners.

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

addMessage

@Deprecated
MBMessage addMessage(long userId,
                                String userName,
                                long categoryId,
                                String subject,
                                String body,
                                ServiceContext serviceContext)
                     throws PortalException
Deprecated. As of 7.0.0, replaced by addMessage(long, String, long, long, String, String, ServiceContext)

Throws:
PortalException

addMessage

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,
                     ServiceContext serviceContext)
                     throws PortalException,
                            FileNotFoundException
Throws:
PortalException
FileNotFoundException

addMessage

MBMessage addMessage(long userId,
                     String userName,
                     long groupId,
                     long categoryId,
                     String subject,
                     String body,
                     String format,
                     List<ObjectValuePair<String,InputStream>> inputStreamOVPs,
                     boolean anonymous,
                     double priority,
                     boolean allowPingbacks,
                     ServiceContext serviceContext)
                     throws PortalException
Throws:
PortalException

addMessage

MBMessage addMessage(long userId,
                     String userName,
                     long groupId,
                     long categoryId,
                     String subject,
                     String body,
                     ServiceContext serviceContext)
                     throws PortalException
Throws:
PortalException

addMessage

MBMessage addMessage(long userId,
                     String userName,
                     long groupId,
                     long categoryId,
                     long threadId,
                     long parentMessageId,
                     String subject,
                     String body,
                     String format,
                     List<ObjectValuePair<String,InputStream>> inputStreamOVPs,
                     boolean anonymous,
                     double priority,
                     boolean allowPingbacks,
                     ServiceContext serviceContext)
                     throws PortalException
Throws:
PortalException

addMessageAttachment

void addMessageAttachment(long userId,
                          long messageId,
                          String fileName,
                          File file,
                          String mimeType)
                          throws PortalException
Throws:
PortalException

addMessageResources

void addMessageResources(MBMessage message,
                         boolean addGroupPermissions,
                         boolean addGuestPermissions)
                         throws PortalException
Throws:
PortalException

addMessageResources

void addMessageResources(MBMessage message,
                         ModelPermissions modelPermissions)
                         throws PortalException
Throws:
PortalException

addMessageResources

void addMessageResources(long messageId,
                         boolean addGroupPermissions,
                         boolean addGuestPermissions)
                         throws PortalException
Throws:
PortalException

addMessageResources

void addMessageResources(long messageId,
                         ModelPermissions modelPermissions)
                         throws PortalException
Throws:
PortalException

createMBMessage

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

deleteDiscussionMessage

@Indexable(type=DELETE)
MBMessage deleteDiscussionMessage(long messageId)
                                  throws PortalException
Throws:
PortalException

deleteDiscussionMessages

void deleteDiscussionMessages(String className,
                              long classPK)
                              throws PortalException
Throws:
PortalException

deleteMBMessage

@Indexable(type=DELETE)
MBMessage deleteMBMessage(MBMessage mbMessage)
Deletes the message-boards message from the database. Also notifies the appropriate model listeners.

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

deleteMBMessage

@Indexable(type=DELETE)
MBMessage deleteMBMessage(long messageId)
                          throws PortalException
Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
messageId - the primary key of the message-boards message
Returns:
the message-boards message that was removed
Throws:
PortalException - if a message-boards message with the primary key could not be found

deleteMessage

@Indexable(type=DELETE)
@SystemEvent(type=1)
MBMessage deleteMessage(MBMessage message)
                        throws PortalException
Throws:
PortalException

deleteMessage

@Indexable(type=DELETE)
MBMessage deleteMessage(long messageId)
                        throws PortalException
Throws:
PortalException

deleteMessageAttachment

void deleteMessageAttachment(long messageId,
                             String fileName)
                             throws PortalException
Throws:
PortalException

deleteMessageAttachments

void deleteMessageAttachments(long messageId)
                              throws PortalException
Throws:
PortalException

deletePersistedModel

PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                    throws PortalException
Specified by:
deletePersistedModel in interface PersistedModelLocalService
Throws:
PortalException

dynamicQuery

DynamicQuery dynamicQuery()

dynamicQuery

<T> List<T> 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

<T> List<T> dynamicQuery(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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

<T> List<T> dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end,
                         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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

long dynamicQueryCount(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

long dynamicQueryCount(DynamicQuery dynamicQuery,
                       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

void emptyMessageAttachments(long messageId)
                             throws PortalException
Throws:
PortalException

fetchMBMessage

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessage fetchMBMessage(long messageId)

fetchMBMessageByUuidAndGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ActionableDynamicQuery getActionableDynamicQuery()

getCategoryMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getCategoryMessages(long groupId,
                                                                             long categoryId,
                                                                             int status,
                                                                             int start,
                                                                             int end)

getCategoryMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getCategoryMessages(long groupId,
                                                                             long categoryId,
                                                                             int status,
                                                                             int start,
                                                                             int end,
                                                                             OrderByComparator<MBMessage> obc)

getCategoryMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCategoryMessagesCount(long groupId,
                                                                      long categoryId,
                                                                      int status)

getCompanyMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getCompanyMessages(long companyId,
                                                                            int status,
                                                                            int start,
                                                                            int end)

getCompanyMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getCompanyMessages(long companyId,
                                                                            int status,
                                                                            int start,
                                                                            int end,
                                                                            OrderByComparator<MBMessage> obc)

getCompanyMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCompanyMessagesCount(long companyId,
                                                                     int status)

getDiscussionMessageDisplay

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getDiscussionMessageDisplay(long userId,
                                                                                      long groupId,
                                                                                      String className,
                                                                                      long classPK,
                                                                                      int status)
                                             throws PortalException
Throws:
PortalException

getDiscussionMessageDisplay

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getDiscussionMessageDisplay(long userId,
                                                                                      long groupId,
                                                                                      String className,
                                                                                      long classPK,
                                                                                      int status,
                                                                                      Comparator<MBMessage> comparator)
                                             throws PortalException
Throws:
PortalException

getDiscussionMessageDisplay

@Deprecated
@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getDiscussionMessageDisplay(long userId,
                                                                                                 long groupId,
                                                                                                 String className,
                                                                                                 long classPK,
                                                                                                 int status,
                                                                                                 String threadView)
                                             throws PortalException
Deprecated. As of 7.0.0, replaced by getDiscussionMessageDisplay(long, long, String, long, int)

Throws:
PortalException

getDiscussionMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getDiscussionMessagesCount(String className,
                                                                        long classPK,
                                                                        int status)

getDiscussionMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getDiscussionMessagesCount(long classNameId,
                                                                        long classPK,
                                                                        int status)

getDiscussions

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBDiscussion> getDiscussions(String className)

getExportActionableDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)

getGroupMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getGroupMessages(long groupId,
                                                                          int status,
                                                                          int start,
                                                                          int end)

getGroupMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getGroupMessages(long groupId,
                                                                          int status,
                                                                          int start,
                                                                          int end,
                                                                          OrderByComparator<MBMessage> obc)

getGroupMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getGroupMessages(long groupId,
                                                                          long userId,
                                                                          int status,
                                                                          int start,
                                                                          int end)

getGroupMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getGroupMessages(long groupId,
                                                                          long userId,
                                                                          int status,
                                                                          int start,
                                                                          int end,
                                                                          OrderByComparator<MBMessage> obc)

getGroupMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getGroupMessagesCount(long groupId,
                                                                   int status)

getGroupMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getGroupMessagesCount(long groupId,
                                                                   long userId,
                                                                   int status)

getIndexableActionableDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()

getMBMessage

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessage getMBMessage(long messageId)
                       throws 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:
PortalException - if a message-boards message with the primary key could not be found

getMBMessageByUuidAndGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessage getMBMessageByUuidAndGroupId(String uuid,
                                                                                long groupId)
                                       throws 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:
PortalException - if a matching message-boards message could not be found

getMBMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid,
                                                                                         long companyId,
                                                                                         int start,
                                                                                         int end,
                                                                                         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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getMBMessagesCount()
Returns the number of message-boards messages.

Returns:
the number of message-boards messages

getMessage

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessage getMessage(long messageId)
                     throws PortalException
Throws:
PortalException

getMessageDisplay

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                            MBMessage message,
                                                                            int status,
                                                                            boolean includePrevAndNext)
                                   throws PortalException
Throws:
PortalException

getMessageDisplay

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                            MBMessage message,
                                                                            int status,
                                                                            boolean includePrevAndNext,
                                                                            Comparator<MBMessage> comparator)
                                   throws PortalException
Throws:
PortalException

getMessageDisplay

@Deprecated
@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                                       MBMessage message,
                                                                                       int status,
                                                                                       String threadView,
                                                                                       boolean includePrevAndNext)
                                   throws PortalException
Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, MBMessage, int, boolean)

Throws:
PortalException

getMessageDisplay

@Deprecated
@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                                       MBMessage message,
                                                                                       int status,
                                                                                       String threadView,
                                                                                       boolean includePrevAndNext,
                                                                                       Comparator<MBMessage> comparator)
                                   throws PortalException
Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, MBMessage, int, boolean, Comparator) (

Throws:
PortalException

getMessageDisplay

@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                            long messageId,
                                                                            int status,
                                                                            boolean includePrevAndNext)
                                   throws PortalException
Throws:
PortalException

getMessageDisplay

@Deprecated
@Transactional(propagation=SUPPORTS,
               readOnly=true)
MBMessageDisplay getMessageDisplay(long userId,
                                                                                       long messageId,
                                                                                       int status,
                                                                                       String threadView,
                                                                                       boolean includePrevAndNext)
                                   throws PortalException
Deprecated. As of 7.0.0, replaced by getMessageDisplay(long, long, int, boolean)

Throws:
PortalException

getMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getMessages(String className,
                                                                     long classPK,
                                                                     int status)

getNoAssetMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getNoAssetMessages()

getOSGiServiceIdentifier

String getOSGiServiceIdentifier()
Returns the OSGi service identifier.

Returns:
the OSGi service identifier

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException

getPositionInThread

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getPositionInThread(long messageId)
                        throws PortalException
Throws:
PortalException

getThreadMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getThreadMessages(long threadId,
                                                                           int status)

getThreadMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getThreadMessages(long threadId,
                                                                           int status,
                                                                           Comparator<MBMessage> comparator)

getThreadMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getThreadMessages(long threadId,
                                                                           int status,
                                                                           int start,
                                                                           int end)

getThreadMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getThreadMessagesCount(long threadId,
                                                                    int status)

getThreadRepliesMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getThreadRepliesMessages(long threadId,
                                                                                  int status,
                                                                                  int start,
                                                                                  int end)

getUserDiscussionMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getUserDiscussionMessages(long userId,
                                                                                   String className,
                                                                                   long classPK,
                                                                                   int status,
                                                                                   int start,
                                                                                   int end,
                                                                                   OrderByComparator<MBMessage> obc)

getUserDiscussionMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getUserDiscussionMessages(long userId,
                                                                                   long classNameId,
                                                                                   long classPK,
                                                                                   int status,
                                                                                   int start,
                                                                                   int end,
                                                                                   OrderByComparator<MBMessage> obc)

getUserDiscussionMessages

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<MBMessage> getUserDiscussionMessages(long userId,
                                                                                   long[] classNameIds,
                                                                                   int status,
                                                                                   int start,
                                                                                   int end,
                                                                                   OrderByComparator<MBMessage> obc)

getUserDiscussionMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getUserDiscussionMessagesCount(long userId,
                                                                            String className,
                                                                            long classPK,
                                                                            int status)

getUserDiscussionMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getUserDiscussionMessagesCount(long userId,
                                                                            long classNameId,
                                                                            long classPK,
                                                                            int status)

getUserDiscussionMessagesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getUserDiscussionMessagesCount(long userId,
                                                                            long[] classNameIds,
                                                                            int status)

moveMessageAttachmentToTrash

long moveMessageAttachmentToTrash(long userId,
                                  long messageId,
                                  String fileName)
                                  throws PortalException
Throws:
PortalException

restoreMessageAttachmentFromTrash

void restoreMessageAttachmentFromTrash(long userId,
                                       long messageId,
                                       String deletedFileName)
                                       throws PortalException
Throws:
PortalException

subscribeMessage

void subscribeMessage(long userId,
                      long messageId)
                      throws PortalException
Throws:
PortalException

unsubscribeMessage

void unsubscribeMessage(long userId,
                        long messageId)
                        throws PortalException
Throws:
PortalException

updateAnswer

void updateAnswer(MBMessage message,
                  boolean answer,
                  boolean cascade)
                  throws PortalException
Throws:
PortalException

updateAnswer

void updateAnswer(long messageId,
                  boolean answer,
                  boolean cascade)
                  throws PortalException
Throws:
PortalException

updateAsset

void updateAsset(long userId,
                 MBMessage message,
                 long[] assetCategoryIds,
                 String[] assetTagNames,
                 long[] assetLinkEntryIds)
                 throws PortalException
Throws:
PortalException

updateDiscussionMessage

MBMessage updateDiscussionMessage(long userId,
                                  long messageId,
                                  String className,
                                  long classPK,
                                  String subject,
                                  String body,
                                  ServiceContext serviceContext)
                                  throws PortalException
Throws:
PortalException

updateMBMessage

@Indexable(type=REINDEX)
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.

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

updateMessage

@Deprecated
MBMessage updateMessage(long messageId,
                                   String body)
                        throws PortalException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
PortalException

updateMessage

MBMessage updateMessage(long userId,
                        long messageId,
                        String body,
                        ServiceContext serviceContext)
                        throws PortalException
Throws:
PortalException

updateMessage

MBMessage updateMessage(long userId,
                        long messageId,
                        String subject,
                        String body,
                        List<ObjectValuePair<String,InputStream>> inputStreamOVPs,
                        List<String> existingFiles,
                        double priority,
                        boolean allowPingbacks,
                        ServiceContext serviceContext)
                        throws PortalException
Throws:
PortalException

updateStatus

@Deprecated
MBMessage updateStatus(long userId,
                                  long messageId,
                                  int status,
                                  ServiceContext serviceContext)
                       throws PortalException
Deprecated. As of 7.0.0, replaced by updateStatus(long, long, int, ServiceContext, Map)

Throws:
PortalException

updateStatus

MBMessage updateStatus(long userId,
                       long messageId,
                       int status,
                       ServiceContext serviceContext,
                       Map<String,Serializable> workflowContext)
                       throws PortalException
Throws:
PortalException

updateUserName

void updateUserName(long userId,
                    String userName)

Liferay 7.0-ce-b4