001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.message.boards.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.message.boards.kernel.model.MBThread;
020    
021    import com.liferay.portal.kernel.exception.PortalException;
022    import com.liferay.portal.kernel.exception.SystemException;
023    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
024    import com.liferay.portal.kernel.lock.Lock;
025    import com.liferay.portal.kernel.search.Hits;
026    import com.liferay.portal.kernel.security.access.control.AccessControlled;
027    import com.liferay.portal.kernel.service.BaseService;
028    import com.liferay.portal.kernel.service.ServiceContext;
029    import com.liferay.portal.kernel.transaction.Isolation;
030    import com.liferay.portal.kernel.transaction.Propagation;
031    import com.liferay.portal.kernel.transaction.Transactional;
032    
033    import java.util.Date;
034    import java.util.List;
035    
036    /**
037     * Provides the remote service interface for MBThread. Methods of this
038     * service are expected to have security checks based on the propagated JAAS
039     * credentials because this service can be accessed remotely.
040     *
041     * @author Brian Wing Shun Chan
042     * @see MBThreadServiceUtil
043     * @see com.liferay.portlet.messageboards.service.base.MBThreadServiceBaseImpl
044     * @see com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl
045     * @generated
046     */
047    @AccessControlled
048    @JSONWebService
049    @ProviderType
050    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
051            PortalException.class, SystemException.class})
052    public interface MBThreadService extends BaseService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this interface directly. Always use {@link MBThreadServiceUtil} to access the message boards thread remote service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
057             */
058            public void deleteThread(long threadId) throws PortalException;
059    
060            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
061            public List<MBThread> getGroupThreads(long groupId, long userId,
062                    Date modifiedDate, int status, int start, int end)
063                    throws PortalException;
064    
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public List<MBThread> getGroupThreads(long groupId, long userId,
067                    int status, int start, int end) throws PortalException;
068    
069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
070            public List<MBThread> getGroupThreads(long groupId, long userId,
071                    int status, boolean subscribed, boolean includeAnonymous, int start,
072                    int end) throws PortalException;
073    
074            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075            public List<MBThread> getGroupThreads(long groupId, long userId,
076                    int status, boolean subscribed, int start, int end)
077                    throws PortalException;
078    
079            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080            public int getGroupThreadsCount(long groupId, long userId,
081                    Date modifiedDate, int status);
082    
083            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
084            public int getGroupThreadsCount(long groupId, long userId, int status);
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public int getGroupThreadsCount(long groupId, long userId, int status,
088                    boolean subscribed);
089    
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public int getGroupThreadsCount(long groupId, long userId, int status,
092                    boolean subscribed, boolean includeAnonymous);
093    
094            /**
095            * Returns the OSGi service identifier.
096            *
097            * @return the OSGi service identifier
098            */
099            public java.lang.String getOSGiServiceIdentifier();
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public List<MBThread> getThreads(long groupId, long categoryId, int status,
103                    int start, int end);
104    
105            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106            public int getThreadsCount(long groupId, long categoryId, int status);
107    
108            public Lock lockThread(long threadId) throws PortalException;
109    
110            public MBThread moveThread(long categoryId, long threadId)
111                    throws PortalException;
112    
113            public MBThread moveThreadFromTrash(long categoryId, long threadId)
114                    throws PortalException;
115    
116            public MBThread moveThreadToTrash(long threadId) throws PortalException;
117    
118            public void restoreThreadFromTrash(long threadId) throws PortalException;
119    
120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121            public Hits search(long groupId, long creatorUserId, long startDate,
122                    long endDate, int status, int start, int end) throws PortalException;
123    
124            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125            public Hits search(long groupId, long creatorUserId, int status, int start,
126                    int end) throws PortalException;
127    
128            public MBThread splitThread(long messageId, java.lang.String subject,
129                    ServiceContext serviceContext) throws PortalException;
130    
131            public void unlockThread(long threadId) throws PortalException;
132    }