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            public void deleteCategoryMailingList(long groupId, long categoryId)
097                    throws PortalException;
098    
099            /**
100            * Deletes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners.
101            *
102            * @param mailingListId the primary key of the message boards mailing list
103            * @return the message boards mailing list that was removed
104            * @throws PortalException if a message boards mailing list with the primary key could not be found
105            */
106            @Indexable(type = IndexableType.DELETE)
107            public MBMailingList deleteMBMailingList(long mailingListId)
108                    throws PortalException;
109    
110            /**
111            * Deletes the message boards mailing list from the database. Also notifies the appropriate model listeners.
112            *
113            * @param mbMailingList the message boards mailing list
114            * @return the message boards mailing list that was removed
115            */
116            @Indexable(type = IndexableType.DELETE)
117            public MBMailingList deleteMBMailingList(MBMailingList mbMailingList);
118    
119            public void deleteMailingList(MBMailingList mailingList)
120                    throws PortalException;
121    
122            public void deleteMailingList(long mailingListId) throws PortalException;
123    
124            /**
125            * @throws PortalException
126            */
127            @Override
128            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
129                    throws PortalException;
130    
131            public DynamicQuery dynamicQuery();
132    
133            /**
134            * Performs a dynamic query on the database and returns the matching rows.
135            *
136            * @param dynamicQuery the dynamic query
137            * @return the matching rows
138            */
139            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
140    
141            /**
142            * Performs a dynamic query on the database and returns a range of the matching rows.
143            *
144            * <p>
145            * 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.
146            * </p>
147            *
148            * @param dynamicQuery the dynamic query
149            * @param start the lower bound of the range of model instances
150            * @param end the upper bound of the range of model instances (not inclusive)
151            * @return the range of matching rows
152            */
153            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
154                    int end);
155    
156            /**
157            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
158            *
159            * <p>
160            * 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.
161            * </p>
162            *
163            * @param dynamicQuery the dynamic query
164            * @param start the lower bound of the range of model instances
165            * @param end the upper bound of the range of model instances (not inclusive)
166            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
167            * @return the ordered range of matching rows
168            */
169            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
170                    int end, OrderByComparator<T> orderByComparator);
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(DynamicQuery dynamicQuery);
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @param projection the projection to apply to the query
185            * @return the number of rows matching the dynamic query
186            */
187            public long dynamicQueryCount(DynamicQuery dynamicQuery,
188                    Projection projection);
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public MBMailingList fetchCategoryMailingList(long groupId, long categoryId);
192    
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public MBMailingList fetchMBMailingList(long mailingListId);
195    
196            /**
197            * Returns the message boards mailing list matching the UUID and group.
198            *
199            * @param uuid the message boards mailing list's UUID
200            * @param groupId the primary key of the group
201            * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found
202            */
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public MBMailingList fetchMBMailingListByUuidAndGroupId(
205                    java.lang.String uuid, long groupId);
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public ActionableDynamicQuery getActionableDynamicQuery();
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public MBMailingList getCategoryMailingList(long groupId, long categoryId)
212                    throws PortalException;
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
216                    PortletDataContext portletDataContext);
217    
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
220    
221            /**
222            * Returns the message boards mailing list with the primary key.
223            *
224            * @param mailingListId the primary key of the message boards mailing list
225            * @return the message boards mailing list
226            * @throws PortalException if a message boards mailing list with the primary key could not be found
227            */
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public MBMailingList getMBMailingList(long mailingListId)
230                    throws PortalException;
231    
232            /**
233            * Returns the message boards mailing list matching the UUID and group.
234            *
235            * @param uuid the message boards mailing list's UUID
236            * @param groupId the primary key of the group
237            * @return the matching message boards mailing list
238            * @throws PortalException if a matching message boards mailing list could not be found
239            */
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public MBMailingList getMBMailingListByUuidAndGroupId(
242                    java.lang.String uuid, long groupId) throws PortalException;
243    
244            /**
245            * Returns a range of all the message boards mailing lists.
246            *
247            * <p>
248            * 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.
249            * </p>
250            *
251            * @param start the lower bound of the range of message boards mailing lists
252            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
253            * @return the range of message boards mailing lists
254            */
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public List<MBMailingList> getMBMailingLists(int start, int end);
257    
258            /**
259            * Returns all the message boards mailing lists matching the UUID and company.
260            *
261            * @param uuid the UUID of the message boards mailing lists
262            * @param companyId the primary key of the company
263            * @return the matching message boards mailing lists, or an empty list if no matches were found
264            */
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public List<MBMailingList> getMBMailingListsByUuidAndCompanyId(
267                    java.lang.String uuid, long companyId);
268    
269            /**
270            * Returns a range of message boards mailing lists matching the UUID and company.
271            *
272            * @param uuid the UUID of the message boards mailing lists
273            * @param companyId the primary key of the company
274            * @param start the lower bound of the range of message boards mailing lists
275            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
276            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
277            * @return the range of matching message boards mailing lists, or an empty list if no matches were found
278            */
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public List<MBMailingList> getMBMailingListsByUuidAndCompanyId(
281                    java.lang.String uuid, long companyId, int start, int end,
282                    OrderByComparator<MBMailingList> orderByComparator);
283    
284            /**
285            * Returns the number of message boards mailing lists.
286            *
287            * @return the number of message boards mailing lists
288            */
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public int getMBMailingListsCount();
291    
292            /**
293            * Returns the OSGi service identifier.
294            *
295            * @return the OSGi service identifier
296            */
297            public java.lang.String getOSGiServiceIdentifier();
298    
299            @Override
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
302                    throws PortalException;
303    
304            /**
305            * Updates the message boards mailing list in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
306            *
307            * @param mbMailingList the message boards mailing list
308            * @return the message boards mailing list that was updated
309            */
310            @Indexable(type = IndexableType.REINDEX)
311            public MBMailingList updateMBMailingList(MBMailingList mbMailingList);
312    
313            public MBMailingList updateMailingList(long mailingListId,
314                    java.lang.String emailAddress, java.lang.String inProtocol,
315                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
316                    java.lang.String inUserName, java.lang.String inPassword,
317                    int inReadInterval, java.lang.String outEmailAddress,
318                    boolean outCustom, java.lang.String outServerName, int outServerPort,
319                    boolean outUseSSL, java.lang.String outUserName,
320                    java.lang.String outPassword, boolean allowAnonymous, boolean active,
321                    ServiceContext serviceContext) throws PortalException;
322    }