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