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.asset.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.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for AssetTag. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see AssetTagLocalServiceUtil
036     * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
037     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface AssetTagLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link AssetTagLocalServiceUtil} to access the asset tag local service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public void addAssetEntryAssetTag(long entryId,
051                    com.liferay.portlet.asset.model.AssetTag assetTag);
052    
053            public void addAssetEntryAssetTag(long entryId, long tagId);
054    
055            public void addAssetEntryAssetTags(long entryId,
056                    java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags);
057    
058            public void addAssetEntryAssetTags(long entryId, long[] tagIds);
059    
060            /**
061            * Adds the asset tag to the database. Also notifies the appropriate model listeners.
062            *
063            * @param assetTag the asset tag
064            * @return the asset tag that was added
065            */
066            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
067            public com.liferay.portlet.asset.model.AssetTag addAssetTag(
068                    com.liferay.portlet.asset.model.AssetTag assetTag);
069    
070            public com.liferay.portlet.asset.model.AssetTag addTag(long userId,
071                    java.lang.String name, java.lang.String[] tagProperties,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws com.liferay.portal.kernel.exception.PortalException;
074    
075            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
076                    boolean addGroupPermissions, boolean addGuestPermissions)
077                    throws com.liferay.portal.kernel.exception.PortalException;
078    
079            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
080                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
081                    throws com.liferay.portal.kernel.exception.PortalException;
082    
083            /**
084            * Returns the tags matching the group and names, creating new tags with the
085            * names if the group doesn't already have them.
086            *
087            * <p>
088            * For each name, if a tag with that name doesn't already exist for the
089            * group, this method creates a new tag with that name for the group. If a
090            * tag with that name already exists in the company group, this method
091            * copies that company group's tag's properties to the group's new tag.
092            * </p>
093            *
094            * @param userId the primary key of the user
095            * @param group ID the primary key of the tag's group
096            * @param names the tag names
097            * @return the tags matching the group and names and new tags matching the
098            names that don't already exist for the group
099            * @throws PortalException if a matching group could not be found, if the
100            tag's key or value were invalid, or if a portal exception
101            occurred
102            */
103            public java.util.List<com.liferay.portlet.asset.model.AssetTag> checkTags(
104                    long userId, com.liferay.portal.model.Group group,
105                    java.lang.String[] names)
106                    throws com.liferay.portal.kernel.exception.PortalException;
107    
108            public void checkTags(long userId, long groupId, java.lang.String[] names)
109                    throws com.liferay.portal.kernel.exception.PortalException;
110    
111            public void clearAssetEntryAssetTags(long entryId);
112    
113            /**
114            * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
115            *
116            * @param tagId the primary key for the new asset tag
117            * @return the new asset tag
118            */
119            public com.liferay.portlet.asset.model.AssetTag createAssetTag(long tagId);
120    
121            public com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
122                    long tagId, long classNameId)
123                    throws com.liferay.portal.kernel.exception.PortalException;
124    
125            public void deleteAssetEntryAssetTag(long entryId,
126                    com.liferay.portlet.asset.model.AssetTag assetTag);
127    
128            public void deleteAssetEntryAssetTag(long entryId, long tagId);
129    
130            public void deleteAssetEntryAssetTags(long entryId,
131                    java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags);
132    
133            public void deleteAssetEntryAssetTags(long entryId, long[] tagIds);
134    
135            /**
136            * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
137            *
138            * @param assetTag the asset tag
139            * @return the asset tag that was removed
140            */
141            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
142            public com.liferay.portlet.asset.model.AssetTag deleteAssetTag(
143                    com.liferay.portlet.asset.model.AssetTag assetTag);
144    
145            /**
146            * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param tagId the primary key of the asset tag
149            * @return the asset tag that was removed
150            * @throws PortalException if a asset tag with the primary key could not be found
151            */
152            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
153            public com.liferay.portlet.asset.model.AssetTag deleteAssetTag(long tagId)
154                    throws com.liferay.portal.kernel.exception.PortalException;
155    
156            public void deleteGroupTags(long groupId)
157                    throws com.liferay.portal.kernel.exception.PortalException;
158    
159            /**
160            * @throws PortalException
161            */
162            @Override
163            public com.liferay.portal.model.PersistedModel deletePersistedModel(
164                    com.liferay.portal.model.PersistedModel persistedModel)
165                    throws com.liferay.portal.kernel.exception.PortalException;
166    
167            public void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
168                    throws com.liferay.portal.kernel.exception.PortalException;
169    
170            public void deleteTag(long tagId)
171                    throws com.liferay.portal.kernel.exception.PortalException;
172    
173            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
174    
175            /**
176            * Performs a dynamic query on the database and returns the matching rows.
177            *
178            * @param dynamicQuery the dynamic query
179            * @return the matching rows
180            */
181            public <T> java.util.List<T> dynamicQuery(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
183    
184            /**
185            * Performs a dynamic query on the database and returns a range of the matching rows.
186            *
187            * <p>
188            * 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.asset.model.impl.AssetTagModelImpl}. 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.
189            * </p>
190            *
191            * @param dynamicQuery the dynamic query
192            * @param start the lower bound of the range of model instances
193            * @param end the upper bound of the range of model instances (not inclusive)
194            * @return the range of matching rows
195            */
196            public <T> java.util.List<T> dynamicQuery(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
198                    int end);
199    
200            /**
201            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
202            *
203            * <p>
204            * 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.asset.model.impl.AssetTagModelImpl}. 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.
205            * </p>
206            *
207            * @param dynamicQuery the dynamic query
208            * @param start the lower bound of the range of model instances
209            * @param end the upper bound of the range of model instances (not inclusive)
210            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
211            * @return the ordered range of matching rows
212            */
213            public <T> java.util.List<T> dynamicQuery(
214                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
215                    int end,
216                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
217    
218            /**
219            * Returns the number of rows matching the dynamic query.
220            *
221            * @param dynamicQuery the dynamic query
222            * @return the number of rows matching the dynamic query
223            */
224            public long dynamicQueryCount(
225                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
226    
227            /**
228            * Returns the number of rows matching the dynamic query.
229            *
230            * @param dynamicQuery the dynamic query
231            * @param projection the projection to apply to the query
232            * @return the number of rows matching the dynamic query
233            */
234            public long dynamicQueryCount(
235                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
236                    com.liferay.portal.kernel.dao.orm.Projection projection);
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public com.liferay.portlet.asset.model.AssetTag fetchAssetTag(long tagId);
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags(
246                    long entryId);
247    
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags(
250                    long entryId, int start, int end);
251    
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags(
254                    long entryId, int start, int end,
255                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> orderByComparator);
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public int getAssetEntryAssetTagsCount(long entryId);
259    
260            /**
261            * Returns the entryIds of the asset entries associated with the asset tag.
262            *
263            * @param tagId the tagId of the asset tag
264            * @return long[] the entryIds of asset entries associated with the asset tag
265            */
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public long[] getAssetEntryPrimaryKeys(long tagId);
268    
269            /**
270            * Returns the asset tag with the primary key.
271            *
272            * @param tagId the primary key of the asset tag
273            * @return the asset tag
274            * @throws PortalException if a asset tag with the primary key could not be found
275            */
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public com.liferay.portlet.asset.model.AssetTag getAssetTag(long tagId)
278                    throws com.liferay.portal.kernel.exception.PortalException;
279    
280            /**
281            * Returns a range of all the asset tags.
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.asset.model.impl.AssetTagModelImpl}. 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 asset tags
288            * @param end the upper bound of the range of asset tags (not inclusive)
289            * @return the range of asset tags
290            */
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
293                    int start, int end);
294    
295            /**
296            * Returns the number of asset tags.
297            *
298            * @return the number of asset tags
299            */
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public int getAssetTagsCount();
302    
303            /**
304            * Returns the Spring bean ID for this bean.
305            *
306            * @return the Spring bean ID for this bean
307            */
308            public java.lang.String getBeanIdentifier();
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
312                    long entryId);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
316                    long groupId);
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
320                    long groupId, int start, int end);
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public int getGroupTagsCount(long groupId);
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags(
327                    long[] groupIds);
328    
329            @Override
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public com.liferay.portal.model.PersistedModel getPersistedModel(
332                    java.io.Serializable primaryKeyObj)
333                    throws com.liferay.portal.kernel.exception.PortalException;
334    
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterOffsetTags(
337                    long groupId, java.lang.String socialActivityCounterName,
338                    int startOffset, int endOffset);
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterPeriodTags(
342                    long groupId, java.lang.String socialActivityCounterName,
343                    int startPeriod, int endPeriod);
344    
345            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346            public com.liferay.portlet.asset.model.AssetTag getTag(long groupId,
347                    java.lang.String name)
348                    throws com.liferay.portal.kernel.exception.PortalException;
349    
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
352                    throws com.liferay.portal.kernel.exception.PortalException;
353    
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public long[] getTagIds(long groupId, java.lang.String[] names)
356                    throws com.liferay.portal.kernel.exception.PortalException;
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public long[] getTagIds(long[] groupIds, java.lang.String name)
360                    throws com.liferay.portal.kernel.exception.PortalException;
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public long[] getTagIds(long[] groupIds, java.lang.String[] names)
364                    throws com.liferay.portal.kernel.exception.PortalException;
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public java.lang.String[] getTagNames();
368    
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public java.lang.String[] getTagNames(java.lang.String className,
371                    long classPK);
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public java.lang.String[] getTagNames(long classNameId, long classPK);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags();
378    
379            @com.liferay.portal.kernel.cache.ThreadLocalCachable
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
382                    java.lang.String className, long classPK);
383    
384            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
386                    long classNameId, long classPK);
387    
388            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
389            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
390                    long groupId, long classNameId, java.lang.String name);
391    
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
394                    long groupId, long classNameId, java.lang.String name, int start,
395                    int end);
396    
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public int getTagsSize(long groupId, long classNameId, java.lang.String name);
399    
400            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401            public boolean hasAssetEntryAssetTag(long entryId, long tagId);
402    
403            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
404            public boolean hasAssetEntryAssetTags(long entryId);
405    
406            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
407            public boolean hasTag(long groupId, java.lang.String name)
408                    throws com.liferay.portal.kernel.exception.PortalException;
409    
410            public com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
411                    long tagId, long classNameId)
412                    throws com.liferay.portal.kernel.exception.PortalException;
413    
414            public void mergeTags(long fromTagId, long toTagId,
415                    boolean overrideProperties)
416                    throws com.liferay.portal.kernel.exception.PortalException;
417    
418            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
419            public java.util.List<com.liferay.portlet.asset.model.AssetTag> search(
420                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
421                    int start, int end);
422    
423            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
424            public java.util.List<com.liferay.portlet.asset.model.AssetTag> search(
425                    long[] groupIds, java.lang.String name,
426                    java.lang.String[] tagProperties, int start, int end);
427    
428            public void setAssetEntryAssetTags(long entryId, long[] tagIds);
429    
430            /**
431            * Sets the Spring bean ID for this bean.
432            *
433            * @param beanIdentifier the Spring bean ID for this bean
434            */
435            public void setBeanIdentifier(java.lang.String beanIdentifier);
436    
437            /**
438            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
439            *
440            * @param assetTag the asset tag
441            * @return the asset tag that was updated
442            */
443            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
444            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
445                    com.liferay.portlet.asset.model.AssetTag assetTag);
446    
447            public com.liferay.portlet.asset.model.AssetTag updateTag(long userId,
448                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
449                    com.liferay.portal.service.ServiceContext serviceContext)
450                    throws com.liferay.portal.kernel.exception.PortalException;
451    }