001    /**
002     * Copyright (c) 2000-2012 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.portlet.messageboards.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
020    import com.liferay.portal.kernel.transaction.Isolation;
021    import com.liferay.portal.kernel.transaction.Propagation;
022    import com.liferay.portal.kernel.transaction.Transactional;
023    
024    /**
025     * The interface for the message boards category remote service.
026     *
027     * <p>
028     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see MBCategoryServiceUtil
033     * @see com.liferay.portlet.messageboards.service.base.MBCategoryServiceBaseImpl
034     * @see com.liferay.portlet.messageboards.service.impl.MBCategoryServiceImpl
035     * @generated
036     */
037    @JSONWebService
038    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
039            PortalException.class, SystemException.class})
040    public interface MBCategoryService {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify or reference this interface directly. Always use {@link MBCategoryServiceUtil} to access the message boards category remote service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBCategoryServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
045             */
046            public com.liferay.portlet.messageboards.model.MBCategory addCategory(
047                    long parentCategoryId, java.lang.String name,
048                    java.lang.String description, java.lang.String displayStyle,
049                    java.lang.String emailAddress, java.lang.String inProtocol,
050                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
051                    java.lang.String inUserName, java.lang.String inPassword,
052                    int inReadInterval, java.lang.String outEmailAddress,
053                    boolean outCustom, java.lang.String outServerName, int outServerPort,
054                    boolean outUseSSL, java.lang.String outUserName,
055                    java.lang.String outPassword, boolean mailingListActive,
056                    boolean allowAnonymousEmail,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException;
060    
061            public void deleteCategory(long groupId, long categoryId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException;
064    
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
067                    long groupId)
068                    throws com.liferay.portal.kernel.exception.SystemException;
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
072                    long groupId, long parentCategoryId, int start, int end)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
077                    long groupId, long[] parentCategoryIds, int start, int end)
078                    throws com.liferay.portal.kernel.exception.SystemException;
079    
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public int getCategoriesCount(long groupId, long parentCategoryId)
082                    throws com.liferay.portal.kernel.exception.SystemException;
083    
084            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085            public int getCategoriesCount(long groupId, long[] parentCategoryIds)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
089            public com.liferay.portlet.messageboards.model.MBCategory getCategory(
090                    long categoryId)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException;
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public long[] getCategoryIds(long groupId, long categoryId)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099            public java.util.List<java.lang.Long> getSubcategoryIds(
100                    java.util.List<java.lang.Long> categoryIds, long groupId,
101                    long categoryId)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
106                    long groupId, long userId, int start, int end)
107                    throws com.liferay.portal.kernel.exception.SystemException;
108    
109            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110            public int getSubscribedCategoriesCount(long groupId, long userId)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            public void subscribeCategory(long groupId, long categoryId)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException;
116    
117            public void unsubscribeCategory(long groupId, long categoryId)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException;
120    
121            public com.liferay.portlet.messageboards.model.MBCategory updateCategory(
122                    long categoryId, long parentCategoryId, java.lang.String name,
123                    java.lang.String description, java.lang.String displayStyle,
124                    java.lang.String emailAddress, java.lang.String inProtocol,
125                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
126                    java.lang.String inUserName, java.lang.String inPassword,
127                    int inReadInterval, java.lang.String outEmailAddress,
128                    boolean outCustom, java.lang.String outServerName, int outServerPort,
129                    boolean outUseSSL, java.lang.String outUserName,
130                    java.lang.String outPassword, boolean mailingListActive,
131                    boolean allowAnonymousEmail, boolean mergeWithParentCategory,
132                    com.liferay.portal.service.ServiceContext serviceContext)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException;
135    }