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