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.journal.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.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for JournalFeed. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see JournalFeedLocalServiceUtil
037     * @see com.liferay.portlet.journal.service.base.JournalFeedLocalServiceBaseImpl
038     * @see com.liferay.portlet.journal.service.impl.JournalFeedLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface JournalFeedLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link JournalFeedLocalServiceUtil} to access the journal feed local service. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalFeedLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.journal.model.JournalFeed addFeed(long userId,
052                    long groupId, java.lang.String feedId, boolean autoFeedId,
053                    java.lang.String name, java.lang.String description,
054                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
055                    java.lang.String ddmRendererTemplateKey, int delta,
056                    java.lang.String orderByCol, java.lang.String orderByType,
057                    java.lang.String targetLayoutFriendlyUrl,
058                    java.lang.String targetPortletId, java.lang.String contentField,
059                    java.lang.String feedFormat, double feedVersion,
060                    com.liferay.portal.service.ServiceContext serviceContext)
061                    throws com.liferay.portal.kernel.exception.PortalException;
062    
063            public void addFeedResources(
064                    com.liferay.portlet.journal.model.JournalFeed feed,
065                    boolean addGroupPermissions, boolean addGuestPermissions)
066                    throws com.liferay.portal.kernel.exception.PortalException;
067    
068            public void addFeedResources(
069                    com.liferay.portlet.journal.model.JournalFeed feed,
070                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
071                    throws com.liferay.portal.kernel.exception.PortalException;
072    
073            public void addFeedResources(long feedId, boolean addGroupPermissions,
074                    boolean addGuestPermissions)
075                    throws com.liferay.portal.kernel.exception.PortalException;
076    
077            public void addFeedResources(long feedId,
078                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
079                    throws com.liferay.portal.kernel.exception.PortalException;
080    
081            /**
082            * Adds the journal feed to the database. Also notifies the appropriate model listeners.
083            *
084            * @param journalFeed the journal feed
085            * @return the journal feed that was added
086            */
087            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
088            public com.liferay.portlet.journal.model.JournalFeed addJournalFeed(
089                    com.liferay.portlet.journal.model.JournalFeed journalFeed);
090    
091            /**
092            * Creates a new journal feed with the primary key. Does not add the journal feed to the database.
093            *
094            * @param id the primary key for the new journal feed
095            * @return the new journal feed
096            */
097            public com.liferay.portlet.journal.model.JournalFeed createJournalFeed(
098                    long id);
099    
100            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
101            public void deleteFeed(com.liferay.portlet.journal.model.JournalFeed feed)
102                    throws com.liferay.portal.kernel.exception.PortalException;
103    
104            public void deleteFeed(long feedId)
105                    throws com.liferay.portal.kernel.exception.PortalException;
106    
107            public void deleteFeed(long groupId, java.lang.String feedId)
108                    throws com.liferay.portal.kernel.exception.PortalException;
109    
110            /**
111            * Deletes the journal feed with the primary key from the database. Also notifies the appropriate model listeners.
112            *
113            * @param id the primary key of the journal feed
114            * @return the journal feed that was removed
115            * @throws PortalException if a journal feed with the primary key could not be found
116            */
117            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
118            public com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
119                    long id) throws com.liferay.portal.kernel.exception.PortalException;
120    
121            /**
122            * Deletes the journal feed from the database. Also notifies the appropriate model listeners.
123            *
124            * @param journalFeed the journal feed
125            * @return the journal feed that was removed
126            */
127            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
128            public com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
129                    com.liferay.portlet.journal.model.JournalFeed journalFeed);
130    
131            /**
132            * @throws PortalException
133            */
134            @Override
135            public com.liferay.portal.model.PersistedModel deletePersistedModel(
136                    com.liferay.portal.model.PersistedModel persistedModel)
137                    throws com.liferay.portal.kernel.exception.PortalException;
138    
139            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
140    
141            /**
142            * Performs a dynamic query on the database and returns the matching rows.
143            *
144            * @param dynamicQuery the dynamic query
145            * @return the matching rows
146            */
147            public <T> java.util.List<T> dynamicQuery(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
149    
150            /**
151            * Performs a dynamic query on the database and returns a range of the matching rows.
152            *
153            * <p>
154            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @return the range of matching rows
161            */
162            public <T> java.util.List<T> dynamicQuery(
163                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
164                    int end);
165    
166            /**
167            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
168            *
169            * <p>
170            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
171            * </p>
172            *
173            * @param dynamicQuery the dynamic query
174            * @param start the lower bound of the range of model instances
175            * @param end the upper bound of the range of model instances (not inclusive)
176            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
177            * @return the ordered range of matching rows
178            */
179            public <T> java.util.List<T> dynamicQuery(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
181                    int end,
182                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
183    
184            /**
185            * Returns the number of rows matching the dynamic query.
186            *
187            * @param dynamicQuery the dynamic query
188            * @return the number of rows matching the dynamic query
189            */
190            public long dynamicQueryCount(
191                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
192    
193            /**
194            * Returns the number of rows matching the dynamic query.
195            *
196            * @param dynamicQuery the dynamic query
197            * @param projection the projection to apply to the query
198            * @return the number of rows matching the dynamic query
199            */
200            public long dynamicQueryCount(
201                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
202                    com.liferay.portal.kernel.dao.orm.Projection projection);
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portlet.journal.model.JournalFeed fetchFeed(
206                    long groupId, java.lang.String feedId);
207    
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public com.liferay.portlet.journal.model.JournalFeed fetchJournalFeed(
210                    long id);
211    
212            /**
213            * Returns the journal feed matching the UUID and group.
214            *
215            * @param uuid the journal feed's UUID
216            * @param groupId the primary key of the group
217            * @return the matching journal feed, or <code>null</code> if a matching journal feed could not be found
218            */
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public com.liferay.portlet.journal.model.JournalFeed fetchJournalFeedByUuidAndGroupId(
221                    java.lang.String uuid, long groupId);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
225    
226            /**
227            * Returns the Spring bean ID for this bean.
228            *
229            * @return the Spring bean ID for this bean
230            */
231            public java.lang.String getBeanIdentifier();
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
235                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public com.liferay.portlet.journal.model.JournalFeed getFeed(long feedId)
239                    throws com.liferay.portal.kernel.exception.PortalException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portlet.journal.model.JournalFeed getFeed(long groupId,
243                    java.lang.String feedId)
244                    throws com.liferay.portal.kernel.exception.PortalException;
245    
246            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds();
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
251                    long groupId);
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
255                    long groupId, int start, int end);
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public int getFeedsCount(long groupId);
259    
260            /**
261            * Returns the journal feed with the primary key.
262            *
263            * @param id the primary key of the journal feed
264            * @return the journal feed
265            * @throws PortalException if a journal feed with the primary key could not be found
266            */
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public com.liferay.portlet.journal.model.JournalFeed getJournalFeed(long id)
269                    throws com.liferay.portal.kernel.exception.PortalException;
270    
271            /**
272            * Returns the journal feed matching the UUID and group.
273            *
274            * @param uuid the journal feed's UUID
275            * @param groupId the primary key of the group
276            * @return the matching journal feed
277            * @throws PortalException if a matching journal feed could not be found
278            */
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public com.liferay.portlet.journal.model.JournalFeed getJournalFeedByUuidAndGroupId(
281                    java.lang.String uuid, long groupId)
282                    throws com.liferay.portal.kernel.exception.PortalException;
283    
284            /**
285            * Returns a range of all the journal feeds.
286            *
287            * <p>
288            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
289            * </p>
290            *
291            * @param start the lower bound of the range of journal feeds
292            * @param end the upper bound of the range of journal feeds (not inclusive)
293            * @return the range of journal feeds
294            */
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeeds(
297                    int start, int end);
298    
299            /**
300            * Returns all the journal feeds matching the UUID and company.
301            *
302            * @param uuid the UUID of the journal feeds
303            * @param companyId the primary key of the company
304            * @return the matching journal feeds, or an empty list if no matches were found
305            */
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
308                    java.lang.String uuid, long companyId);
309    
310            /**
311            * Returns a range of journal feeds matching the UUID and company.
312            *
313            * @param uuid the UUID of the journal feeds
314            * @param companyId the primary key of the company
315            * @param start the lower bound of the range of journal feeds
316            * @param end the upper bound of the range of journal feeds (not inclusive)
317            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
318            * @return the range of matching journal feeds, or an empty list if no matches were found
319            */
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
322                    java.lang.String uuid, long companyId, int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> orderByComparator);
324    
325            /**
326            * Returns the number of journal feeds.
327            *
328            * @return the number of journal feeds
329            */
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public int getJournalFeedsCount();
332    
333            @Override
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public com.liferay.portal.model.PersistedModel getPersistedModel(
336                    java.io.Serializable primaryKeyObj)
337                    throws com.liferay.portal.kernel.exception.PortalException;
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
341                    long companyId, long groupId, java.lang.String feedId,
342                    java.lang.String name, java.lang.String description,
343                    boolean andOperator, int start, int end,
344                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc);
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
348                    long companyId, long groupId, java.lang.String keywords, int start,
349                    int end,
350                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc);
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public int searchCount(long companyId, long groupId,
354                    java.lang.String feedId, java.lang.String name,
355                    java.lang.String description, boolean andOperator);
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public int searchCount(long companyId, long groupId,
359                    java.lang.String keywords);
360    
361            /**
362            * Sets the Spring bean ID for this bean.
363            *
364            * @param beanIdentifier the Spring bean ID for this bean
365            */
366            public void setBeanIdentifier(java.lang.String beanIdentifier);
367    
368            public com.liferay.portlet.journal.model.JournalFeed updateFeed(
369                    long groupId, java.lang.String feedId, java.lang.String name,
370                    java.lang.String description, java.lang.String ddmStructureKey,
371                    java.lang.String ddmTemplateKey,
372                    java.lang.String ddmRendererTemplateKey, int delta,
373                    java.lang.String orderByCol, java.lang.String orderByType,
374                    java.lang.String targetLayoutFriendlyUrl,
375                    java.lang.String targetPortletId, java.lang.String contentField,
376                    java.lang.String feedFormat, double feedVersion,
377                    com.liferay.portal.service.ServiceContext serviceContext)
378                    throws com.liferay.portal.kernel.exception.PortalException;
379    
380            /**
381            * Updates the journal feed in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
382            *
383            * @param journalFeed the journal feed
384            * @return the journal feed that was updated
385            */
386            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
387            public com.liferay.portlet.journal.model.JournalFeed updateJournalFeed(
388                    com.liferay.portlet.journal.model.JournalFeed journalFeed);
389    }