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.portlet.messageboards.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; 022 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; 023 import com.liferay.portal.kernel.dao.orm.Projection; 024 import com.liferay.portal.kernel.exception.PortalException; 025 import com.liferay.portal.kernel.exception.SystemException; 026 import com.liferay.portal.kernel.search.Indexable; 027 import com.liferay.portal.kernel.search.IndexableType; 028 import com.liferay.portal.kernel.transaction.Isolation; 029 import com.liferay.portal.kernel.transaction.Propagation; 030 import com.liferay.portal.kernel.transaction.Transactional; 031 import com.liferay.portal.kernel.util.OrderByComparator; 032 import com.liferay.portal.model.PersistedModel; 033 import com.liferay.portal.service.BaseLocalService; 034 import com.liferay.portal.service.PersistedModelLocalService; 035 import com.liferay.portal.service.ServiceContext; 036 037 import com.liferay.portlet.exportimport.lar.PortletDataContext; 038 import com.liferay.portlet.messageboards.model.MBMailingList; 039 040 import java.io.Serializable; 041 042 import java.util.List; 043 044 /** 045 * Provides the local service interface for MBMailingList. Methods of this 046 * service will not have security checks based on the propagated JAAS 047 * credentials because this service can only be accessed from within the same 048 * VM. 049 * 050 * @author Brian Wing Shun Chan 051 * @see MBMailingListLocalServiceUtil 052 * @see com.liferay.portlet.messageboards.service.base.MBMailingListLocalServiceBaseImpl 053 * @see com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl 054 * @generated 055 */ 056 @ProviderType 057 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 058 PortalException.class, SystemException.class}) 059 public interface MBMailingListLocalService extends BaseLocalService, 060 PersistedModelLocalService { 061 /* 062 * NOTE FOR DEVELOPERS: 063 * 064 * Never modify or reference this interface directly. Always use {@link MBMailingListLocalServiceUtil} to access the message boards mailing list local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 065 */ 066 067 /** 068 * Adds the message boards mailing list to the database. Also notifies the appropriate model listeners. 069 * 070 * @param mbMailingList the message boards mailing list 071 * @return the message boards mailing list that was added 072 */ 073 @Indexable(type = IndexableType.REINDEX) 074 public MBMailingList addMBMailingList(MBMailingList mbMailingList); 075 076 public MBMailingList addMailingList(long userId, long groupId, 077 long categoryId, java.lang.String emailAddress, 078 java.lang.String inProtocol, java.lang.String inServerName, 079 int inServerPort, boolean inUseSSL, java.lang.String inUserName, 080 java.lang.String inPassword, int inReadInterval, 081 java.lang.String outEmailAddress, boolean outCustom, 082 java.lang.String outServerName, int outServerPort, boolean outUseSSL, 083 java.lang.String outUserName, java.lang.String outPassword, 084 boolean allowAnonymous, boolean active, ServiceContext serviceContext) 085 throws PortalException; 086 087 /** 088 * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database. 089 * 090 * @param mailingListId the primary key for the new message boards mailing list 091 * @return the new message boards mailing list 092 */ 093 public MBMailingList createMBMailingList(long mailingListId); 094 095 public void deleteCategoryMailingList(long groupId, long categoryId) 096 throws PortalException; 097 098 /** 099 * Deletes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners. 100 * 101 * @param mailingListId the primary key of the message boards mailing list 102 * @return the message boards mailing list that was removed 103 * @throws PortalException if a message boards mailing list with the primary key could not be found 104 */ 105 @Indexable(type = IndexableType.DELETE) 106 public MBMailingList deleteMBMailingList(long mailingListId) 107 throws PortalException; 108 109 /** 110 * Deletes the message boards mailing list from the database. Also notifies the appropriate model listeners. 111 * 112 * @param mbMailingList the message boards mailing list 113 * @return the message boards mailing list that was removed 114 */ 115 @Indexable(type = IndexableType.DELETE) 116 public MBMailingList deleteMBMailingList(MBMailingList mbMailingList); 117 118 public void deleteMailingList(MBMailingList mailingList) 119 throws PortalException; 120 121 public void deleteMailingList(long mailingListId) throws PortalException; 122 123 /** 124 * @throws PortalException 125 */ 126 @Override 127 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 128 throws PortalException; 129 130 public DynamicQuery dynamicQuery(); 131 132 /** 133 * Performs a dynamic query on the database and returns the matching rows. 134 * 135 * @param dynamicQuery the dynamic query 136 * @return the matching rows 137 */ 138 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 139 140 /** 141 * Performs a dynamic query on the database and returns a range of the matching rows. 142 * 143 * <p> 144 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMailingListModelImpl}. If both <code>orderByComparator</code> 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. 145 * </p> 146 * 147 * @param dynamicQuery the dynamic query 148 * @param start the lower bound of the range of model instances 149 * @param end the upper bound of the range of model instances (not inclusive) 150 * @return the range of matching rows 151 */ 152 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 153 int end); 154 155 /** 156 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 157 * 158 * <p> 159 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMailingListModelImpl}. If both <code>orderByComparator</code> 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. 160 * </p> 161 * 162 * @param dynamicQuery the dynamic query 163 * @param start the lower bound of the range of model instances 164 * @param end the upper bound of the range of model instances (not inclusive) 165 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 166 * @return the ordered range of matching rows 167 */ 168 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 169 int end, OrderByComparator<T> orderByComparator); 170 171 /** 172 * Returns the number of rows matching the dynamic query. 173 * 174 * @param dynamicQuery the dynamic query 175 * @return the number of rows matching the dynamic query 176 */ 177 public long dynamicQueryCount(DynamicQuery dynamicQuery); 178 179 /** 180 * Returns the number of rows matching the dynamic query. 181 * 182 * @param dynamicQuery the dynamic query 183 * @param projection the projection to apply to the query 184 * @return the number of rows matching the dynamic query 185 */ 186 public long dynamicQueryCount(DynamicQuery dynamicQuery, 187 Projection projection); 188 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public MBMailingList fetchCategoryMailingList(long groupId, long categoryId); 191 192 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 193 public MBMailingList fetchMBMailingList(long mailingListId); 194 195 /** 196 * Returns the message boards mailing list matching the UUID and group. 197 * 198 * @param uuid the message boards mailing list's UUID 199 * @param groupId the primary key of the group 200 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 201 */ 202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 203 public MBMailingList fetchMBMailingListByUuidAndGroupId( 204 java.lang.String uuid, long groupId); 205 206 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 207 public ActionableDynamicQuery getActionableDynamicQuery(); 208 209 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 210 public MBMailingList getCategoryMailingList(long groupId, long categoryId) 211 throws PortalException; 212 213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 214 public ExportActionableDynamicQuery getExportActionableDynamicQuery( 215 PortletDataContext portletDataContext); 216 217 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 218 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 219 220 /** 221 * Returns the message boards mailing list with the primary key. 222 * 223 * @param mailingListId the primary key of the message boards mailing list 224 * @return the message boards mailing list 225 * @throws PortalException if a message boards mailing list with the primary key could not be found 226 */ 227 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 228 public MBMailingList getMBMailingList(long mailingListId) 229 throws PortalException; 230 231 /** 232 * Returns the message boards mailing list matching the UUID and group. 233 * 234 * @param uuid the message boards mailing list's UUID 235 * @param groupId the primary key of the group 236 * @return the matching message boards mailing list 237 * @throws PortalException if a matching message boards mailing list could not be found 238 */ 239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 240 public MBMailingList getMBMailingListByUuidAndGroupId( 241 java.lang.String uuid, long groupId) throws PortalException; 242 243 /** 244 * Returns a range of all the message boards mailing lists. 245 * 246 * <p> 247 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMailingListModelImpl}. If both <code>orderByComparator</code> 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. 248 * </p> 249 * 250 * @param start the lower bound of the range of message boards mailing lists 251 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 252 * @return the range of message boards mailing lists 253 */ 254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 255 public List<MBMailingList> getMBMailingLists(int start, int end); 256 257 /** 258 * Returns all the message boards mailing lists matching the UUID and company. 259 * 260 * @param uuid the UUID of the message boards mailing lists 261 * @param companyId the primary key of the company 262 * @return the matching message boards mailing lists, or an empty list if no matches were found 263 */ 264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 265 public List<MBMailingList> getMBMailingListsByUuidAndCompanyId( 266 java.lang.String uuid, long companyId); 267 268 /** 269 * Returns a range of message boards mailing lists matching the UUID and company. 270 * 271 * @param uuid the UUID of the message boards mailing lists 272 * @param companyId the primary key of the company 273 * @param start the lower bound of the range of message boards mailing lists 274 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 275 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 276 * @return the range of matching message boards mailing lists, or an empty list if no matches were found 277 */ 278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 279 public List<MBMailingList> getMBMailingListsByUuidAndCompanyId( 280 java.lang.String uuid, long companyId, int start, int end, 281 OrderByComparator<MBMailingList> orderByComparator); 282 283 /** 284 * Returns the number of message boards mailing lists. 285 * 286 * @return the number of message boards mailing lists 287 */ 288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 289 public int getMBMailingListsCount(); 290 291 /** 292 * Returns the OSGi service identifier. 293 * 294 * @return the OSGi service identifier 295 */ 296 public java.lang.String getOSGiServiceIdentifier(); 297 298 @Override 299 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 300 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 301 throws PortalException; 302 303 /** 304 * Updates the message boards mailing list in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 305 * 306 * @param mbMailingList the message boards mailing list 307 * @return the message boards mailing list that was updated 308 */ 309 @Indexable(type = IndexableType.REINDEX) 310 public MBMailingList updateMBMailingList(MBMailingList mbMailingList); 311 312 public MBMailingList updateMailingList(long mailingListId, 313 java.lang.String emailAddress, java.lang.String inProtocol, 314 java.lang.String inServerName, int inServerPort, boolean inUseSSL, 315 java.lang.String inUserName, java.lang.String inPassword, 316 int inReadInterval, java.lang.String outEmailAddress, 317 boolean outCustom, java.lang.String outServerName, int outServerPort, 318 boolean outUseSSL, java.lang.String outUserName, 319 java.lang.String outPassword, boolean allowAnonymous, boolean active, 320 ServiceContext serviceContext) throws PortalException; 321 }