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 MBThread moveThread(long categoryId, long threadId)
059                    throws PortalException;
060    
061            public MBThread moveThreadFromTrash(long categoryId, long threadId)
062                    throws PortalException;
063    
064            public MBThread moveThreadToTrash(long threadId) throws PortalException;
065    
066            public MBThread splitThread(long messageId, java.lang.String subject,
067                    ServiceContext serviceContext) throws PortalException;
068    
069            public Lock lockThread(long threadId) throws PortalException;
070    
071            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072            public Hits search(long groupId, long creatorUserId, int status, int start,
073                    int end) throws PortalException;
074    
075            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076            public Hits search(long groupId, long creatorUserId, long startDate,
077                    long endDate, int status, int start, int end) throws PortalException;
078    
079            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080            public int getGroupThreadsCount(long groupId, long userId, int status);
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public int getGroupThreadsCount(long groupId, long userId, int status,
084                    boolean subscribed);
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public int getGroupThreadsCount(long groupId, long userId, int status,
088                    boolean subscribed, boolean includeAnonymous);
089    
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public int getGroupThreadsCount(long groupId, long userId,
092                    Date modifiedDate, int status);
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public int getThreadsCount(long groupId, long categoryId, int status);
096    
097            /**
098            * Returns the OSGi service identifier.
099            *
100            * @return the OSGi service identifier
101            */
102            public java.lang.String getOSGiServiceIdentifier();
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public List<MBThread> getGroupThreads(long groupId, long userId,
106                    int status, boolean subscribed, boolean includeAnonymous, int start,
107                    int end) throws PortalException;
108    
109            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110            public List<MBThread> getGroupThreads(long groupId, long userId,
111                    int status, boolean subscribed, int start, int end)
112                    throws PortalException;
113    
114            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115            public List<MBThread> getGroupThreads(long groupId, long userId,
116                    int status, int start, int end) throws PortalException;
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public List<MBThread> getGroupThreads(long groupId, long userId,
120                    Date modifiedDate, int status, int start, int end)
121                    throws PortalException;
122    
123            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124            public List<MBThread> getThreads(long groupId, long categoryId, int status,
125                    int start, int end);
126    
127            public void deleteThread(long threadId) throws PortalException;
128    
129            public void restoreThreadFromTrash(long threadId) throws PortalException;
130    
131            public void unlockThread(long threadId) throws PortalException;
132    }