001    /**
002     * Copyright (c) 2000-2013 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    
052            /**
053            * Adds the journal feed to the database. Also notifies the appropriate model listeners.
054            *
055            * @param journalFeed the journal feed
056            * @return the journal feed that was added
057            * @throws SystemException if a system exception occurred
058            */
059            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
060            public com.liferay.portlet.journal.model.JournalFeed addJournalFeed(
061                    com.liferay.portlet.journal.model.JournalFeed journalFeed)
062                    throws com.liferay.portal.kernel.exception.SystemException;
063    
064            /**
065            * Creates a new journal feed with the primary key. Does not add the journal feed to the database.
066            *
067            * @param id the primary key for the new journal feed
068            * @return the new journal feed
069            */
070            public com.liferay.portlet.journal.model.JournalFeed createJournalFeed(
071                    long id);
072    
073            /**
074            * Deletes the journal feed with the primary key from the database. Also notifies the appropriate model listeners.
075            *
076            * @param id the primary key of the journal feed
077            * @return the journal feed that was removed
078            * @throws PortalException if a journal feed with the primary key could not be found
079            * @throws SystemException if a system exception occurred
080            */
081            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
082            public com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
083                    long id)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Deletes the journal feed from the database. Also notifies the appropriate model listeners.
089            *
090            * @param journalFeed the journal feed
091            * @return the journal feed that was removed
092            * @throws SystemException if a system exception occurred
093            */
094            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
095            public com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
096                    com.liferay.portlet.journal.model.JournalFeed journalFeed)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
100    
101            /**
102            * Performs a dynamic query on the database and returns the matching rows.
103            *
104            * @param dynamicQuery the dynamic query
105            * @return the matching rows
106            * @throws SystemException if a system exception occurred
107            */
108            @SuppressWarnings("rawtypes")
109            public java.util.List dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Performs a dynamic query on the database and returns a range of the matching rows.
115            *
116            * <p>
117            * 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.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query
121            * @param start the lower bound of the range of model instances
122            * @param end the upper bound of the range of model instances (not inclusive)
123            * @return the range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end) throws com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
133            *
134            * <p>
135            * 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.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
142            * @return the ordered range of matching rows
143            * @throws SystemException if a system exception occurred
144            */
145            @SuppressWarnings("rawtypes")
146            public java.util.List dynamicQuery(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148                    int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the number of rows that match the dynamic query.
154            *
155            * @param dynamicQuery the dynamic query
156            * @return the number of rows that match the dynamic query
157            * @throws SystemException if a system exception occurred
158            */
159            public long dynamicQueryCount(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
161                    throws com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Returns the number of rows that match the dynamic query.
165            *
166            * @param dynamicQuery the dynamic query
167            * @param projection the projection to apply to the query
168            * @return the number of rows that match the dynamic query
169            * @throws SystemException if a system exception occurred
170            */
171            public long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
173                    com.liferay.portal.kernel.dao.orm.Projection projection)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177            public com.liferay.portlet.journal.model.JournalFeed fetchJournalFeed(
178                    long id) throws com.liferay.portal.kernel.exception.SystemException;
179    
180            /**
181            * Returns the journal feed with the matching UUID and company.
182            *
183            * @param uuid the journal feed's UUID
184            * @param companyId the primary key of the company
185            * @return the matching journal feed, or <code>null</code> if a matching journal feed could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189            public com.liferay.portlet.journal.model.JournalFeed fetchJournalFeedByUuidAndCompanyId(
190                    java.lang.String uuid, long companyId)
191                    throws com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Returns the journal feed matching the UUID and group.
195            *
196            * @param uuid the journal feed's UUID
197            * @param groupId the primary key of the group
198            * @return the matching journal feed, or <code>null</code> if a matching journal feed could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portlet.journal.model.JournalFeed fetchJournalFeedByUuidAndGroupId(
203                    java.lang.String uuid, long groupId)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns the journal feed with the primary key.
208            *
209            * @param id the primary key of the journal feed
210            * @return the journal feed
211            * @throws PortalException if a journal feed with the primary key could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.journal.model.JournalFeed getJournalFeed(long id)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            @Override
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portal.model.PersistedModel getPersistedModel(
222                    java.io.Serializable primaryKeyObj)
223                    throws com.liferay.portal.kernel.exception.PortalException,
224                            com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * Returns the journal feed with the matching UUID and company.
228            *
229            * @param uuid the journal feed's UUID
230            * @param companyId the primary key of the company
231            * @return the matching journal feed
232            * @throws PortalException if a matching journal feed could not be found
233            * @throws SystemException if a system exception occurred
234            */
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portlet.journal.model.JournalFeed getJournalFeedByUuidAndCompanyId(
237                    java.lang.String uuid, long companyId)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException;
240    
241            /**
242            * Returns the journal feed matching the UUID and group.
243            *
244            * @param uuid the journal feed's UUID
245            * @param groupId the primary key of the group
246            * @return the matching journal feed
247            * @throws PortalException if a matching journal feed could not be found
248            * @throws SystemException if a system exception occurred
249            */
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public com.liferay.portlet.journal.model.JournalFeed getJournalFeedByUuidAndGroupId(
252                    java.lang.String uuid, long groupId)
253                    throws com.liferay.portal.kernel.exception.PortalException,
254                            com.liferay.portal.kernel.exception.SystemException;
255    
256            /**
257            * Returns a range of all the journal feeds.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param start the lower bound of the range of journal feeds
264            * @param end the upper bound of the range of journal feeds (not inclusive)
265            * @return the range of journal feeds
266            * @throws SystemException if a system exception occurred
267            */
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeeds(
270                    int start, int end)
271                    throws com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Returns the number of journal feeds.
275            *
276            * @return the number of journal feeds
277            * @throws SystemException if a system exception occurred
278            */
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public int getJournalFeedsCount()
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * Updates the journal feed in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
285            *
286            * @param journalFeed the journal feed
287            * @return the journal feed that was updated
288            * @throws SystemException if a system exception occurred
289            */
290            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
291            public com.liferay.portlet.journal.model.JournalFeed updateJournalFeed(
292                    com.liferay.portlet.journal.model.JournalFeed journalFeed)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Returns the Spring bean ID for this bean.
297            *
298            * @return the Spring bean ID for this bean
299            */
300            public java.lang.String getBeanIdentifier();
301    
302            /**
303            * Sets the Spring bean ID for this bean.
304            *
305            * @param beanIdentifier the Spring bean ID for this bean
306            */
307            public void setBeanIdentifier(java.lang.String beanIdentifier);
308    
309            public com.liferay.portlet.journal.model.JournalFeed addFeed(long userId,
310                    long groupId, java.lang.String feedId, boolean autoFeedId,
311                    java.lang.String name, java.lang.String description,
312                    java.lang.String type, java.lang.String structureId,
313                    java.lang.String templateId, java.lang.String rendererTemplateId,
314                    int delta, java.lang.String orderByCol, java.lang.String orderByType,
315                    java.lang.String targetLayoutFriendlyUrl,
316                    java.lang.String targetPortletId, java.lang.String contentField,
317                    java.lang.String feedFormat, double feedVersion,
318                    com.liferay.portal.service.ServiceContext serviceContext)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException;
321    
322            public void addFeedResources(
323                    com.liferay.portlet.journal.model.JournalFeed feed,
324                    boolean addGroupPermissions, boolean addGuestPermissions)
325                    throws com.liferay.portal.kernel.exception.PortalException,
326                            com.liferay.portal.kernel.exception.SystemException;
327    
328            public void addFeedResources(
329                    com.liferay.portlet.journal.model.JournalFeed feed,
330                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            public void addFeedResources(long feedId, boolean addGroupPermissions,
335                    boolean addGuestPermissions)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException;
338    
339            public void addFeedResources(long feedId,
340                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
341                    throws com.liferay.portal.kernel.exception.PortalException,
342                            com.liferay.portal.kernel.exception.SystemException;
343    
344            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
345            public void deleteFeed(com.liferay.portlet.journal.model.JournalFeed feed)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException;
348    
349            public void deleteFeed(long feedId)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException;
352    
353            public void deleteFeed(long groupId, java.lang.String feedId)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException;
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public com.liferay.portlet.journal.model.JournalFeed fetchFeed(
359                    long groupId, java.lang.String feedId)
360                    throws com.liferay.portal.kernel.exception.SystemException;
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public com.liferay.portlet.journal.model.JournalFeed getFeed(long feedId)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException;
366    
367            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368            public com.liferay.portlet.journal.model.JournalFeed getFeed(long groupId,
369                    java.lang.String feedId)
370                    throws com.liferay.portal.kernel.exception.PortalException,
371                            com.liferay.portal.kernel.exception.SystemException;
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds()
375                    throws com.liferay.portal.kernel.exception.SystemException;
376    
377            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
378            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
379                    long groupId)
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
384                    long groupId, int start, int end)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388            public int getFeedsCount(long groupId)
389                    throws com.liferay.portal.kernel.exception.SystemException;
390    
391            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
392            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
393                    long companyId, long groupId, java.lang.String keywords, int start,
394                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
395                    throws com.liferay.portal.kernel.exception.SystemException;
396    
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
399                    long companyId, long groupId, java.lang.String feedId,
400                    java.lang.String name, java.lang.String description,
401                    boolean andOperator, int start, int end,
402                    com.liferay.portal.kernel.util.OrderByComparator obc)
403                    throws com.liferay.portal.kernel.exception.SystemException;
404    
405            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
406            public int searchCount(long companyId, long groupId,
407                    java.lang.String keywords)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
411            public int searchCount(long companyId, long groupId,
412                    java.lang.String feedId, java.lang.String name,
413                    java.lang.String description, boolean andOperator)
414                    throws com.liferay.portal.kernel.exception.SystemException;
415    
416            public com.liferay.portlet.journal.model.JournalFeed updateFeed(
417                    long groupId, java.lang.String feedId, java.lang.String name,
418                    java.lang.String description, java.lang.String type,
419                    java.lang.String structureId, java.lang.String templateId,
420                    java.lang.String rendererTemplateId, int delta,
421                    java.lang.String orderByCol, java.lang.String orderByType,
422                    java.lang.String targetLayoutFriendlyUrl,
423                    java.lang.String targetPortletId, java.lang.String contentField,
424                    java.lang.String feedFormat, double feedVersion,
425                    com.liferay.portal.service.ServiceContext serviceContext)
426                    throws com.liferay.portal.kernel.exception.PortalException,
427                            com.liferay.portal.kernel.exception.SystemException;
428    }