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.bookmarks.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.PermissionedModelLocalService;
028    
029    /**
030     * Provides the local service interface for BookmarksEntry. 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 BookmarksEntryLocalServiceUtil
037     * @see com.liferay.portlet.bookmarks.service.base.BookmarksEntryLocalServiceBaseImpl
038     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksEntryLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface BookmarksEntryLocalService extends BaseLocalService,
045            PermissionedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link BookmarksEntryLocalServiceUtil} to access the bookmarks entry local service. Add custom service methods to {@link com.liferay.portlet.bookmarks.service.impl.BookmarksEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051    
052            /**
053            * Adds the bookmarks entry to the database. Also notifies the appropriate model listeners.
054            *
055            * @param bookmarksEntry the bookmarks entry
056            * @return the bookmarks entry that was added
057            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portlet.bookmarks.model.BookmarksEntry addBookmarksEntry(
060                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry);
061    
062            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
063            public com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
064                    long userId, long groupId, long folderId, java.lang.String name,
065                    java.lang.String url, java.lang.String description,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException;
068    
069            /**
070            * Creates a new bookmarks entry with the primary key. Does not add the bookmarks entry to the database.
071            *
072            * @param entryId the primary key for the new bookmarks entry
073            * @return the new bookmarks entry
074            */
075            public com.liferay.portlet.bookmarks.model.BookmarksEntry createBookmarksEntry(
076                    long entryId);
077    
078            /**
079            * Deletes the bookmarks entry from the database. Also notifies the appropriate model listeners.
080            *
081            * @param bookmarksEntry the bookmarks entry
082            * @return the bookmarks entry that was removed
083            */
084            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
085            public com.liferay.portlet.bookmarks.model.BookmarksEntry deleteBookmarksEntry(
086                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry);
087    
088            /**
089            * Deletes the bookmarks entry with the primary key from the database. Also notifies the appropriate model listeners.
090            *
091            * @param entryId the primary key of the bookmarks entry
092            * @return the bookmarks entry that was removed
093            * @throws PortalException if a bookmarks entry with the primary key could not be found
094            */
095            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
096            public com.liferay.portlet.bookmarks.model.BookmarksEntry deleteBookmarksEntry(
097                    long entryId)
098                    throws com.liferay.portal.kernel.exception.PortalException;
099    
100            public void deleteEntries(long groupId, long folderId)
101                    throws com.liferay.portal.kernel.exception.PortalException;
102    
103            public void deleteEntries(long groupId, long folderId,
104                    boolean includeTrashedEntries)
105                    throws com.liferay.portal.kernel.exception.PortalException;
106    
107            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
108            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
109            public com.liferay.portlet.bookmarks.model.BookmarksEntry deleteEntry(
110                    com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
111                    throws com.liferay.portal.kernel.exception.PortalException;
112    
113            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
114            public com.liferay.portlet.bookmarks.model.BookmarksEntry deleteEntry(
115                    long entryId)
116                    throws com.liferay.portal.kernel.exception.PortalException;
117    
118            /**
119            * @throws PortalException
120            */
121            @Override
122            public com.liferay.portal.model.PersistedModel deletePersistedModel(
123                    com.liferay.portal.model.PersistedModel persistedModel)
124                    throws com.liferay.portal.kernel.exception.PortalException;
125    
126            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
127    
128            /**
129            * Performs a dynamic query on the database and returns the matching rows.
130            *
131            * @param dynamicQuery the dynamic query
132            * @return the matching rows
133            */
134            public <T> java.util.List<T> dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
136    
137            /**
138            * Performs a dynamic query on the database and returns a range of the matching rows.
139            *
140            * <p>
141            * 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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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.
142            * </p>
143            *
144            * @param dynamicQuery the dynamic query
145            * @param start the lower bound of the range of model instances
146            * @param end the upper bound of the range of model instances (not inclusive)
147            * @return the range of matching rows
148            */
149            public <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end);
152    
153            /**
154            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
155            *
156            * <p>
157            * 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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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.
158            * </p>
159            *
160            * @param dynamicQuery the dynamic query
161            * @param start the lower bound of the range of model instances
162            * @param end the upper bound of the range of model instances (not inclusive)
163            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
164            * @return the ordered range of matching rows
165            */
166            public <T> java.util.List<T> dynamicQuery(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168                    int end,
169                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
170    
171            /**
172            * Returns the number of rows that match the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @return the number of rows that match the dynamic query
176            */
177            public long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
179    
180            /**
181            * Returns the number of rows that match the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @param projection the projection to apply to the query
185            * @return the number of rows that match the dynamic query
186            */
187            public long dynamicQueryCount(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
189                    com.liferay.portal.kernel.dao.orm.Projection projection);
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public com.liferay.portlet.bookmarks.model.BookmarksEntry fetchBookmarksEntry(
193                    long entryId);
194    
195            /**
196            * Returns the bookmarks entry matching the UUID and group.
197            *
198            * @param uuid the bookmarks entry's UUID
199            * @param groupId the primary key of the group
200            * @return the matching bookmarks entry, or <code>null</code> if a matching bookmarks entry could not be found
201            */
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public com.liferay.portlet.bookmarks.model.BookmarksEntry fetchBookmarksEntryByUuidAndGroupId(
204                    java.lang.String uuid, long groupId);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
208    
209            /**
210            * Returns the Spring bean ID for this bean.
211            *
212            * @return the Spring bean ID for this bean
213            */
214            public java.lang.String getBeanIdentifier();
215    
216            /**
217            * Returns a range of all the bookmarks entries.
218            *
219            * <p>
220            * 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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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.
221            * </p>
222            *
223            * @param start the lower bound of the range of bookmarks entries
224            * @param end the upper bound of the range of bookmarks entries (not inclusive)
225            * @return the range of bookmarks entries
226            */
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntries(
229                    int start, int end);
230    
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntriesByUuidAndCompanyId(
233                    java.lang.String uuid, long companyId);
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntriesByUuidAndCompanyId(
237                    java.lang.String uuid, long companyId, int start, int end,
238                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator);
239    
240            /**
241            * Returns the number of bookmarks entries.
242            *
243            * @return the number of bookmarks entries
244            */
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public int getBookmarksEntriesCount();
247    
248            /**
249            * Returns the bookmarks entry with the primary key.
250            *
251            * @param entryId the primary key of the bookmarks entry
252            * @return the bookmarks entry
253            * @throws PortalException if a bookmarks entry with the primary key could not be found
254            */
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public com.liferay.portlet.bookmarks.model.BookmarksEntry getBookmarksEntry(
257                    long entryId)
258                    throws com.liferay.portal.kernel.exception.PortalException;
259    
260            /**
261            * Returns the bookmarks entry matching the UUID and group.
262            *
263            * @param uuid the bookmarks entry's UUID
264            * @param groupId the primary key of the group
265            * @return the matching bookmarks entry
266            * @throws PortalException if a matching bookmarks entry could not be found
267            */
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public com.liferay.portlet.bookmarks.model.BookmarksEntry getBookmarksEntryByUuidAndGroupId(
270                    java.lang.String uuid, long groupId)
271                    throws com.liferay.portal.kernel.exception.PortalException;
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
275                    long groupId, long folderId, int start, int end);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
279                    long groupId, long folderId, int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
284                    long groupId, long folderId, int status, int start, int end);
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
288                    long groupId, long folderId, int status, int start, int end,
289                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator);
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public int getEntriesCount(long groupId, long folderId);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public int getEntriesCount(long groupId, long folderId, int status);
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
299                    long entryId)
300                    throws com.liferay.portal.kernel.exception.PortalException;
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
304                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public int getFoldersEntriesCount(long groupId,
308                    java.util.List<java.lang.Long> folderIds);
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
312                    long groupId, int start, int end);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
316                    long groupId, long userId, int start, int end);
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public int getGroupEntriesCount(long groupId);
320    
321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322            public int getGroupEntriesCount(long groupId, long userId);
323    
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getNoAssetEntries();
326    
327            @Override
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public com.liferay.portal.model.PersistedModel getPersistedModel(
330                    java.io.Serializable primaryKeyObj)
331                    throws com.liferay.portal.kernel.exception.PortalException;
332    
333            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
334            public com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntry(
335                    long entryId, long parentFolderId)
336                    throws com.liferay.portal.kernel.exception.PortalException;
337    
338            public com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryFromTrash(
339                    long userId, long entryId, long parentFolderId)
340                    throws com.liferay.portal.kernel.exception.PortalException;
341    
342            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
343            public com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryToTrash(
344                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
345                    throws com.liferay.portal.kernel.exception.PortalException;
346    
347            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
348            public com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryToTrash(
349                    long userId, long entryId)
350                    throws com.liferay.portal.kernel.exception.PortalException;
351    
352            public com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
353                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry);
354    
355            public com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
356                    long userId, long entryId)
357                    throws com.liferay.portal.kernel.exception.PortalException;
358    
359            public void rebuildTree(long companyId)
360                    throws com.liferay.portal.kernel.exception.PortalException;
361    
362            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
363            public com.liferay.portlet.bookmarks.model.BookmarksEntry restoreEntryFromTrash(
364                    long userId, long entryId)
365                    throws com.liferay.portal.kernel.exception.PortalException;
366    
367            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368            public com.liferay.portal.kernel.search.Hits search(long groupId,
369                    long userId, long creatorUserId, int status, int start, int end)
370                    throws com.liferay.portal.kernel.exception.PortalException;
371    
372            /**
373            * Sets the Spring bean ID for this bean.
374            *
375            * @param beanIdentifier the Spring bean ID for this bean
376            */
377            public void setBeanIdentifier(java.lang.String beanIdentifier);
378    
379            public void setTreePaths(long folderId, java.lang.String treePath,
380                    boolean reindex)
381                    throws com.liferay.portal.kernel.exception.PortalException;
382    
383            public void subscribeEntry(long userId, long entryId)
384                    throws com.liferay.portal.kernel.exception.PortalException;
385    
386            public void unsubscribeEntry(long userId, long entryId)
387                    throws com.liferay.portal.kernel.exception.PortalException;
388    
389            public void updateAsset(long userId,
390                    com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
391                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
392                    long[] assetLinkEntryIds)
393                    throws com.liferay.portal.kernel.exception.PortalException;
394    
395            /**
396            * Updates the bookmarks entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
397            *
398            * @param bookmarksEntry the bookmarks entry
399            * @return the bookmarks entry that was updated
400            */
401            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
402            public com.liferay.portlet.bookmarks.model.BookmarksEntry updateBookmarksEntry(
403                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry);
404    
405            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
406            public com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
407                    long userId, long entryId, long groupId, long folderId,
408                    java.lang.String name, java.lang.String url,
409                    java.lang.String description,
410                    com.liferay.portal.service.ServiceContext serviceContext)
411                    throws com.liferay.portal.kernel.exception.PortalException;
412    
413            public com.liferay.portlet.bookmarks.model.BookmarksEntry updateStatus(
414                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
415                    int status) throws com.liferay.portal.kernel.exception.PortalException;
416    }