001    /**
002     * Copyright (c) 2000-2010 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.blogs.service;
016    
017    import com.liferay.portal.kernel.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the blogs entry local service.
025     *
026     * <p>
027     * Never modify or reference this interface directly. Always use {@link BlogsEntryLocalServiceUtil} to access the blogs entry local service. Add custom service methods to {@link com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
028     * </p>
029     *
030     * <p>
031     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see BlogsEntryLocalServiceUtil
036     * @see com.liferay.portlet.blogs.service.base.BlogsEntryLocalServiceBaseImpl
037     * @see com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface BlogsEntryLocalService {
043            /**
044            * Adds the blogs entry to the database. Also notifies the appropriate model listeners.
045            *
046            * @param blogsEntry the blogs entry to add
047            * @return the blogs entry that was added
048            * @throws SystemException if a system exception occurred
049            */
050            public com.liferay.portlet.blogs.model.BlogsEntry addBlogsEntry(
051                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Creates a new blogs entry with the primary key. Does not add the blogs entry to the database.
056            *
057            * @param entryId the primary key for the new blogs entry
058            * @return the new blogs entry
059            */
060            public com.liferay.portlet.blogs.model.BlogsEntry createBlogsEntry(
061                    long entryId);
062    
063            /**
064            * Deletes the blogs entry with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param entryId the primary key of the blogs entry to delete
067            * @throws PortalException if a blogs entry with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public void deleteBlogsEntry(long entryId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            /**
075            * Deletes the blogs entry from the database. Also notifies the appropriate model listeners.
076            *
077            * @param blogsEntry the blogs entry to delete
078            * @throws SystemException if a system exception occurred
079            */
080            public void deleteBlogsEntry(
081                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
082                    throws com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Performs a dynamic query on the database and returns the matching rows.
086            *
087            * @param dynamicQuery the dynamic query to search with
088            * @return the matching rows
089            * @throws SystemException if a system exception occurred
090            */
091            @SuppressWarnings("rawtypes")
092            public java.util.List dynamicQuery(
093                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094                    throws com.liferay.portal.kernel.exception.SystemException;
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * 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.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query to search with
104            * @param start the lower bound of the range of model instances to return
105            * @param end the upper bound of the range of model instances to return (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException;
113    
114            /**
115            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
116            *
117            * <p>
118            * 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query to search with
122            * @param start the lower bound of the range of model instances to return
123            * @param end the upper bound of the range of model instances to return (not inclusive)
124            * @param orderByComparator the comparator to order the results by
125            * @return the ordered range of matching rows
126            * @throws SystemException if a system exception occurred
127            */
128            @SuppressWarnings("rawtypes")
129            public java.util.List dynamicQuery(
130                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
131                    int end,
132                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Counts the number of rows that match the dynamic query.
137            *
138            * @param dynamicQuery the dynamic query to search with
139            * @return the number of rows that match the dynamic query
140            * @throws SystemException if a system exception occurred
141            */
142            public long dynamicQueryCount(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Gets the blogs entry with the primary key.
148            *
149            * @param entryId the primary key of the blogs entry to get
150            * @return the blogs entry
151            * @throws PortalException if a blogs entry with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntry(
156                    long entryId)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Gets the blogs entry with the UUID and group id.
162            *
163            * @param uuid the UUID of blogs entry to get
164            * @param groupId the group id of the blogs entry to get
165            * @return the blogs entry
166            * @throws PortalException if a blogs entry with the UUID and group id could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntryByUuidAndGroupId(
171                    java.lang.String uuid, long groupId)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException;
174    
175            /**
176            * Gets a range of all the blogs entries.
177            *
178            * <p>
179            * 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.
180            * </p>
181            *
182            * @param start the lower bound of the range of blogs entries to return
183            * @param end the upper bound of the range of blogs entries to return (not inclusive)
184            * @return the range of blogs entries
185            * @throws SystemException if a system exception occurred
186            */
187            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getBlogsEntries(
189                    int start, int end)
190                    throws com.liferay.portal.kernel.exception.SystemException;
191    
192            /**
193            * Gets the number of blogs entries.
194            *
195            * @return the number of blogs entries
196            * @throws SystemException if a system exception occurred
197            */
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public int getBlogsEntriesCount()
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Updates the blogs entry in the database. Also notifies the appropriate model listeners.
204            *
205            * @param blogsEntry the blogs entry to update
206            * @return the blogs entry that was updated
207            * @throws SystemException if a system exception occurred
208            */
209            public com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
210                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Updates the blogs entry in the database. Also notifies the appropriate model listeners.
215            *
216            * @param blogsEntry the blogs entry to update
217            * @param merge whether to merge the blogs entry with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
218            * @return the blogs entry that was updated
219            * @throws SystemException if a system exception occurred
220            */
221            public com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
222                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
223                    throws com.liferay.portal.kernel.exception.SystemException;
224    
225            public com.liferay.portlet.blogs.model.BlogsEntry addEntry(long userId,
226                    java.lang.String title, java.lang.String content, int displayDateMonth,
227                    int displayDateDay, int displayDateYear, int displayDateHour,
228                    int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks,
229                    java.lang.String[] trackbacks,
230                    com.liferay.portal.service.ServiceContext serviceContext)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException;
233    
234            public void addEntryResources(
235                    com.liferay.portlet.blogs.model.BlogsEntry entry,
236                    boolean addCommunityPermissions, boolean addGuestPermissions)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException;
239    
240            public void addEntryResources(
241                    com.liferay.portlet.blogs.model.BlogsEntry entry,
242                    java.lang.String[] communityPermissions,
243                    java.lang.String[] guestPermissions)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException;
246    
247            public void addEntryResources(long entryId,
248                    boolean addCommunityPermissions, boolean addGuestPermissions)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException;
251    
252            public void addEntryResources(long entryId,
253                    java.lang.String[] communityPermissions,
254                    java.lang.String[] guestPermissions)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException;
257    
258            public void deleteEntries(long groupId)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException;
261    
262            public void deleteEntry(com.liferay.portlet.blogs.model.BlogsEntry entry)
263                    throws com.liferay.portal.kernel.exception.PortalException,
264                            com.liferay.portal.kernel.exception.SystemException;
265    
266            public void deleteEntry(long entryId)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException;
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
272                    long companyId, int status, int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
277                    long companyId, int status, int start, int end,
278                    com.liferay.portal.kernel.util.OrderByComparator obc)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public int getCompanyEntriesCount(long companyId, int status)
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portlet.blogs.model.BlogsEntry[] getEntriesPrevAndNext(
287                    long entryId)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException;
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public com.liferay.portlet.blogs.model.BlogsEntry getEntry(long entryId)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException;
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public com.liferay.portlet.blogs.model.BlogsEntry getEntry(long groupId,
298                    java.lang.String urlTitle)
299                    throws com.liferay.portal.kernel.exception.PortalException,
300                            com.liferay.portal.kernel.exception.SystemException;
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
304                    long groupId, int status, int start, int end)
305                    throws com.liferay.portal.kernel.exception.SystemException;
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
309                    long groupId, int status, int start, int end,
310                    com.liferay.portal.kernel.util.OrderByComparator obc)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public int getGroupEntriesCount(long groupId, int status)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
319                    long companyId, long groupId, int status, int start, int end)
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
324                    long groupId, long userId, int status, int start, int end)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
329                    long groupId, long userId, int status, int start, int end,
330                    com.liferay.portal.kernel.util.OrderByComparator obc)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public int getGroupUserEntriesCount(long groupId, long userId, int status)
335                    throws com.liferay.portal.kernel.exception.SystemException;
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getNoAssetEntries()
339                    throws com.liferay.portal.kernel.exception.SystemException;
340    
341            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342            public java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
343                    long organizationId, int status, int start, int end)
344                    throws com.liferay.portal.kernel.exception.SystemException;
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public int getOrganizationEntriesCount(long organizationId, int status)
348                    throws com.liferay.portal.kernel.exception.SystemException;
349    
350            public void updateAsset(long userId,
351                    com.liferay.portlet.blogs.model.BlogsEntry entry,
352                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException;
355    
356            public com.liferay.portlet.blogs.model.BlogsEntry updateEntry(long userId,
357                    long entryId, java.lang.String title, java.lang.String content,
358                    int displayDateMonth, int displayDateDay, int displayDateYear,
359                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
360                    boolean allowTrackbacks, java.lang.String[] trackbacks,
361                    com.liferay.portal.service.ServiceContext serviceContext)
362                    throws com.liferay.portal.kernel.exception.PortalException,
363                            com.liferay.portal.kernel.exception.SystemException;
364    
365            public void updateEntryResources(
366                    com.liferay.portlet.blogs.model.BlogsEntry entry,
367                    java.lang.String[] communityPermissions,
368                    java.lang.String[] guestPermissions)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException;
371    
372            public com.liferay.portlet.blogs.model.BlogsEntry updateStatus(
373                    long userId, long entryId, int status,
374                    com.liferay.portal.service.ServiceContext serviceContext)
375                    throws com.liferay.portal.kernel.exception.PortalException,
376                            com.liferay.portal.kernel.exception.SystemException;
377    }