001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.exception.SystemException;
021 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022 import com.liferay.portal.kernel.security.access.control.AccessControlled;
023 import com.liferay.portal.kernel.transaction.Isolation;
024 import com.liferay.portal.kernel.transaction.Propagation;
025 import com.liferay.portal.kernel.transaction.Transactional;
026 import com.liferay.portal.service.BaseService;
027
028
039 @AccessControlled
040 @JSONWebService
041 @ProviderType
042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
043 PortalException.class, SystemException.class})
044 public interface MBCategoryService extends BaseService {
045
050 public com.liferay.portlet.messageboards.model.MBCategory addCategory(
051 long parentCategoryId, java.lang.String name,
052 java.lang.String description, java.lang.String displayStyle,
053 java.lang.String emailAddress, java.lang.String inProtocol,
054 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
055 java.lang.String inUserName, java.lang.String inPassword,
056 int inReadInterval, java.lang.String outEmailAddress,
057 boolean outCustom, java.lang.String outServerName, int outServerPort,
058 boolean outUseSSL, java.lang.String outUserName,
059 java.lang.String outPassword, boolean mailingListActive,
060 boolean allowAnonymousEmail,
061 com.liferay.portal.service.ServiceContext serviceContext)
062 throws PortalException;
063
064 public com.liferay.portlet.messageboards.model.MBCategory addCategory(
065 long userId, long parentCategoryId, java.lang.String name,
066 java.lang.String description,
067 com.liferay.portal.service.ServiceContext serviceContext)
068 throws PortalException;
069
070 public void deleteCategory(long categoryId, boolean includeTrashedEntries)
071 throws PortalException;
072
073 public void deleteCategory(long groupId, long categoryId)
074 throws PortalException;
075
076 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
078 long groupId);
079
080 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
082 long groupId, long excludedCategoryId, long parentCategoryId,
083 int status, int start, int end);
084
085 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
087 long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
088 int status, int start, int end);
089
090 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
092 long groupId, long parentCategoryId, int start, int end);
093
094 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
096 long groupId, long parentCategoryId, int status, int start, int end);
097
098 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
100 long groupId, long[] parentCategoryIds, int start, int end);
101
102 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
104 long groupId, long[] parentCategoryIds, int status, int start, int end);
105
106 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
108 long groupId, int status);
109
110 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111 public int getCategoriesCount(long groupId, long excludedCategoryId,
112 long parentCategoryId, int status);
113
114 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115 public int getCategoriesCount(long groupId, long[] excludedCategoryIds,
116 long[] parentCategoryIds, int status);
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public int getCategoriesCount(long groupId, long parentCategoryId);
120
121 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122 public int getCategoriesCount(long groupId, long parentCategoryId,
123 int status);
124
125 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126 public int getCategoriesCount(long groupId, long[] parentCategoryIds);
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public int getCategoriesCount(long groupId, long[] parentCategoryIds,
130 int status);
131
132 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133 public com.liferay.portlet.messageboards.model.MBCategory getCategory(
134 long categoryId) throws PortalException;
135
136 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137 public long[] getCategoryIds(long groupId, long categoryId);
138
139
144 public java.lang.String getOSGiServiceIdentifier();
145
146 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147 public java.util.List<java.lang.Long> getSubcategoryIds(
148 java.util.List<java.lang.Long> categoryIds, long groupId,
149 long categoryId);
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
153 long groupId, long userId, int start, int end);
154
155 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156 public int getSubscribedCategoriesCount(long groupId, long userId);
157
158 public com.liferay.portlet.messageboards.model.MBCategory moveCategory(
159 long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
160 throws PortalException;
161
162 public com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
163 long categoryId, long newCategoryId) throws PortalException;
164
165 public com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
166 long categoryId) throws PortalException;
167
168 public void restoreCategoryFromTrash(long categoryId)
169 throws PortalException;
170
171 public void subscribeCategory(long groupId, long categoryId)
172 throws PortalException;
173
174 public void unsubscribeCategory(long groupId, long categoryId)
175 throws PortalException;
176
177 public com.liferay.portlet.messageboards.model.MBCategory updateCategory(
178 long categoryId, long parentCategoryId, java.lang.String name,
179 java.lang.String description, java.lang.String displayStyle,
180 java.lang.String emailAddress, java.lang.String inProtocol,
181 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
182 java.lang.String inUserName, java.lang.String inPassword,
183 int inReadInterval, java.lang.String outEmailAddress,
184 boolean outCustom, java.lang.String outServerName, int outServerPort,
185 boolean outUseSSL, java.lang.String outUserName,
186 java.lang.String outPassword, boolean mailingListActive,
187 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
188 com.liferay.portal.service.ServiceContext serviceContext)
189 throws PortalException;
190 }