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.asset.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.asset.kernel.model.AssetTag;
020    
021    import com.liferay.exportimport.kernel.lar.PortletDataContext;
022    
023    import com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.Projection;
029    import com.liferay.portal.kernel.exception.PortalException;
030    import com.liferay.portal.kernel.exception.SystemException;
031    import com.liferay.portal.kernel.model.Group;
032    import com.liferay.portal.kernel.model.PersistedModel;
033    import com.liferay.portal.kernel.model.SystemEventConstants;
034    import com.liferay.portal.kernel.search.Indexable;
035    import com.liferay.portal.kernel.search.IndexableType;
036    import com.liferay.portal.kernel.service.BaseLocalService;
037    import com.liferay.portal.kernel.service.PersistedModelLocalService;
038    import com.liferay.portal.kernel.service.ServiceContext;
039    import com.liferay.portal.kernel.systemevent.SystemEvent;
040    import com.liferay.portal.kernel.transaction.Isolation;
041    import com.liferay.portal.kernel.transaction.Propagation;
042    import com.liferay.portal.kernel.transaction.Transactional;
043    import com.liferay.portal.kernel.util.OrderByComparator;
044    
045    import java.io.Serializable;
046    
047    import java.util.List;
048    
049    /**
050     * Provides the local service interface for AssetTag. Methods of this
051     * service will not have security checks based on the propagated JAAS
052     * credentials because this service can only be accessed from within the same
053     * VM.
054     *
055     * @author Brian Wing Shun Chan
056     * @see AssetTagLocalServiceUtil
057     * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
058     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
059     * @generated
060     */
061    @ProviderType
062    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
063            PortalException.class, SystemException.class})
064    public interface AssetTagLocalService extends BaseLocalService,
065            PersistedModelLocalService {
066            /*
067             * NOTE FOR DEVELOPERS:
068             *
069             * 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.
070             */
071            public void addAssetEntryAssetTag(long entryId, AssetTag assetTag);
072    
073            public void addAssetEntryAssetTag(long entryId, long tagId);
074    
075            public void addAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags);
076    
077            public void addAssetEntryAssetTags(long entryId, long[] tagIds);
078    
079            /**
080            * Adds the asset tag to the database. Also notifies the appropriate model listeners.
081            *
082            * @param assetTag the asset tag
083            * @return the asset tag that was added
084            */
085            @Indexable(type = IndexableType.REINDEX)
086            public AssetTag addAssetTag(AssetTag assetTag);
087    
088            /**
089            * Adds an asset tag.
090            *
091            * @param userId the primary key of the user adding the asset tag
092            * @param groupId the primary key of the group in which the asset tag is to
093            be added
094            * @param name the asset tag's name
095            * @param serviceContext the service context to be applied
096            * @return the asset tag that was added
097            */
098            public AssetTag addTag(long userId, long groupId, java.lang.String name,
099                    ServiceContext serviceContext) throws PortalException;
100    
101            /**
102            * Returns the asset tags matching the group and names, creating new asset
103            * tags matching the names if the group doesn't already have them.
104            *
105            * <p>
106            * For each name, if an asset tag with the name doesn't already exist in the
107            * group, this method creates a new asset tag with the name in the group.
108            * </p>
109            *
110            * @param userId the primary key of the user checking the asset tags
111            * @param group the group in which to check the asset tags
112            * @param names the asset tag names
113            * @return the asset tags matching the group and names and new asset tags
114            matching the names that don't already exist in the group
115            */
116            public List<AssetTag> checkTags(long userId, Group group,
117                    java.lang.String[] names) throws PortalException;
118    
119            /**
120            * Returns the asset tags matching the group and names, creating new asset
121            * tags matching the names if the group doesn't already have them.
122            *
123            * @param userId the primary key of the user checking the asset tags
124            * @param groupId the primary key of the group in which check the asset
125            tags
126            * @param names the asset tag names
127            * @return the asset tags matching the group and names and new asset tags
128            matching the names that don't already exist in the group
129            */
130            public List<AssetTag> checkTags(long userId, long groupId,
131                    java.lang.String[] names) throws PortalException;
132    
133            public void clearAssetEntryAssetTags(long entryId);
134    
135            /**
136            * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
137            *
138            * @param tagId the primary key for the new asset tag
139            * @return the new asset tag
140            */
141            public AssetTag createAssetTag(long tagId);
142    
143            /**
144            * Decrements the number of assets to which the asset tag has been applied.
145            *
146            * @param tagId the primary key of the asset tag
147            * @param classNameId the class name ID of the entity to which the asset
148            tag had been applied
149            * @return the asset tag
150            */
151            public AssetTag decrementAssetCount(long tagId, long classNameId)
152                    throws PortalException;
153    
154            public void deleteAssetEntryAssetTag(long entryId, AssetTag assetTag);
155    
156            public void deleteAssetEntryAssetTag(long entryId, long tagId);
157    
158            public void deleteAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags);
159    
160            public void deleteAssetEntryAssetTags(long entryId, long[] tagIds);
161    
162            /**
163            * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
164            *
165            * @param assetTag the asset tag
166            * @return the asset tag that was removed
167            */
168            @Indexable(type = IndexableType.DELETE)
169            public AssetTag deleteAssetTag(AssetTag assetTag);
170    
171            /**
172            * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
173            *
174            * @param tagId the primary key of the asset tag
175            * @return the asset tag that was removed
176            * @throws PortalException if a asset tag with the primary key could not be found
177            */
178            @Indexable(type = IndexableType.DELETE)
179            public AssetTag deleteAssetTag(long tagId) throws PortalException;
180    
181            /**
182            * Deletes all asset tags in the group.
183            *
184            * @param groupId the primary key of the group in which to delete all asset
185            tags
186            */
187            public void deleteGroupTags(long groupId) throws PortalException;
188    
189            /**
190            * @throws PortalException
191            */
192            @Override
193            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
194                    throws PortalException;
195    
196            /**
197            * Deletes the asset tag.
198            *
199            * @param tag the asset tag to be deleted
200            */
201            @SystemEvent(type = SystemEventConstants.TYPE_DELETE)
202            public void deleteTag(AssetTag tag) throws PortalException;
203    
204            /**
205            * Deletes the asset tag.
206            *
207            * @param tagId the primary key of the asset tag
208            */
209            public void deleteTag(long tagId) throws PortalException;
210    
211            public DynamicQuery dynamicQuery();
212    
213            /**
214            * Performs a dynamic query on the database and returns the matching rows.
215            *
216            * @param dynamicQuery the dynamic query
217            * @return the matching rows
218            */
219            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
220    
221            /**
222            * Performs a dynamic query on the database and returns a range of the matching rows.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param dynamicQuery the dynamic query
229            * @param start the lower bound of the range of model instances
230            * @param end the upper bound of the range of model instances (not inclusive)
231            * @return the range of matching rows
232            */
233            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
234                    int end);
235    
236            /**
237            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param dynamicQuery the dynamic query
244            * @param start the lower bound of the range of model instances
245            * @param end the upper bound of the range of model instances (not inclusive)
246            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
247            * @return the ordered range of matching rows
248            */
249            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
250                    int end, OrderByComparator<T> orderByComparator);
251    
252            /**
253            * Returns the number of rows matching the dynamic query.
254            *
255            * @param dynamicQuery the dynamic query
256            * @return the number of rows matching the dynamic query
257            */
258            public long dynamicQueryCount(DynamicQuery dynamicQuery);
259    
260            /**
261            * Returns the number of rows matching the dynamic query.
262            *
263            * @param dynamicQuery the dynamic query
264            * @param projection the projection to apply to the query
265            * @return the number of rows matching the dynamic query
266            */
267            public long dynamicQueryCount(DynamicQuery dynamicQuery,
268                    Projection projection);
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public AssetTag fetchAssetTag(long tagId);
272    
273            /**
274            * Returns the asset tag matching the UUID and group.
275            *
276            * @param uuid the asset tag's UUID
277            * @param groupId the primary key of the group
278            * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public AssetTag fetchAssetTagByUuidAndGroupId(java.lang.String uuid,
282                    long groupId);
283    
284            /**
285            * Returns the asset tag with the name in the group.
286            *
287            * @param groupId the primary key of the group
288            * @param name the asset tag's name
289            * @return the asset tag with the name in the group or <code>null</code> if
290            it could not be found
291            */
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public AssetTag fetchTag(long groupId, java.lang.String name);
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public ActionableDynamicQuery getActionableDynamicQuery();
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public List<AssetTag> getAssetEntryAssetTags(long entryId);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
303                    int end);
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
307                    int end, OrderByComparator<AssetTag> orderByComparator);
308    
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public int getAssetEntryAssetTagsCount(long entryId);
311    
312            /**
313            * Returns the entryIds of the asset entries associated with the asset tag.
314            *
315            * @param tagId the tagId of the asset tag
316            * @return long[] the entryIds of asset entries associated with the asset tag
317            */
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public long[] getAssetEntryPrimaryKeys(long tagId);
320    
321            /**
322            * Returns the asset tag with the primary key.
323            *
324            * @param tagId the primary key of the asset tag
325            * @return the asset tag
326            * @throws PortalException if a asset tag with the primary key could not be found
327            */
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public AssetTag getAssetTag(long tagId) throws PortalException;
330    
331            /**
332            * Returns the asset tag matching the UUID and group.
333            *
334            * @param uuid the asset tag's UUID
335            * @param groupId the primary key of the group
336            * @return the matching asset tag
337            * @throws PortalException if a matching asset tag could not be found
338            */
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public AssetTag getAssetTagByUuidAndGroupId(java.lang.String uuid,
341                    long groupId) throws PortalException;
342    
343            /**
344            * Returns a range of all the asset tags.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param start the lower bound of the range of asset tags
351            * @param end the upper bound of the range of asset tags (not inclusive)
352            * @return the range of asset tags
353            */
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public List<AssetTag> getAssetTags(int start, int end);
356    
357            /**
358            * Returns all the asset tags matching the UUID and company.
359            *
360            * @param uuid the UUID of the asset tags
361            * @param companyId the primary key of the company
362            * @return the matching asset tags, or an empty list if no matches were found
363            */
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public List<AssetTag> getAssetTagsByUuidAndCompanyId(
366                    java.lang.String uuid, long companyId);
367    
368            /**
369            * Returns a range of asset tags matching the UUID and company.
370            *
371            * @param uuid the UUID of the asset tags
372            * @param companyId the primary key of the company
373            * @param start the lower bound of the range of asset tags
374            * @param end the upper bound of the range of asset tags (not inclusive)
375            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
376            * @return the range of matching asset tags, or an empty list if no matches were found
377            */
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public List<AssetTag> getAssetTagsByUuidAndCompanyId(
380                    java.lang.String uuid, long companyId, int start, int end,
381                    OrderByComparator<AssetTag> orderByComparator);
382    
383            /**
384            * Returns the number of asset tags.
385            *
386            * @return the number of asset tags
387            */
388            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
389            public int getAssetTagsCount();
390    
391            /**
392            * Returns the asset tags of the asset entry.
393            *
394            * @param entryId the primary key of the asset entry
395            * @return the asset tags of the asset entry
396            */
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public List<AssetTag> getEntryTags(long entryId);
399    
400            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
402                    PortletDataContext portletDataContext);
403    
404            /**
405            * Returns the asset tags in the group.
406            *
407            * @param groupId the primary key of the group
408            * @return the asset tags in the group
409            */
410            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
411            public List<AssetTag> getGroupTags(long groupId);
412    
413            /**
414            * Returns a range of all the asset tags in the group.
415            *
416            * @param groupId the primary key of the group
417            * @param start the lower bound of the range of asset tags
418            * @param end the upper bound of the range of asset tags (not inclusive)
419            * @return the range of matching asset tags
420            */
421            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422            public List<AssetTag> getGroupTags(long groupId, int start, int end);
423    
424            /**
425            * Returns the number of asset tags in the group.
426            *
427            * @param groupId the primary key of the group
428            * @return the number of asset tags in the group
429            */
430            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
431            public int getGroupTagsCount(long groupId);
432    
433            /**
434            * Returns the asset tags in the groups.
435            *
436            * @param groupIds the primary keys of the groups
437            * @return the asset tags in the groups
438            */
439            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
440            public List<AssetTag> getGroupsTags(long[] groupIds);
441    
442            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
443            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
444    
445            /**
446            * Returns the OSGi service identifier.
447            *
448            * @return the OSGi service identifier
449            */
450            public java.lang.String getOSGiServiceIdentifier();
451    
452            @Override
453            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
454            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
455                    throws PortalException;
456    
457            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
458            public List<AssetTag> getSocialActivityCounterOffsetTags(long groupId,
459                    java.lang.String socialActivityCounterName, int startOffset,
460                    int endOffset);
461    
462            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
463            public List<AssetTag> getSocialActivityCounterPeriodTags(long groupId,
464                    java.lang.String socialActivityCounterName, int startPeriod,
465                    int endPeriod);
466    
467            /**
468            * Returns the asset tag with the name in the group.
469            *
470            * @param groupId the primary key of the group
471            * @param name the name of the asset tag
472            * @return the asset tag with the name in the group
473            */
474            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
475            public AssetTag getTag(long groupId, java.lang.String name)
476                    throws PortalException;
477    
478            /**
479            * Returns the asset tag with the primary key.
480            *
481            * @param tagId the primary key of the asset tag
482            * @return the asset tag with the primary key
483            */
484            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
485            public AssetTag getTag(long tagId) throws PortalException;
486    
487            /**
488            * Returns the primary keys of the asset tags with the names in the group.
489            *
490            * @param groupId the primary key of the group
491            * @param names the names of the asset tags
492            * @return the primary keys of the asset tags with the names in the group
493            */
494            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
495            public long[] getTagIds(long groupId, java.lang.String[] names);
496    
497            /**
498            * Returns the primary keys of the asset tags with the name in the groups.
499            *
500            * @param groupIds the primary keys of the groups
501            * @param name the name of the asset tags
502            * @return the primary keys of the asset tags with the name in the groups
503            */
504            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
505            public long[] getTagIds(long[] groupIds, java.lang.String name);
506    
507            /**
508            * Returns the primary keys of the asset tags with the names in the groups.
509            *
510            * @param groupIds the primary keys of the groups
511            * @param names the names of the asset tags
512            * @return the primary keys of the asset tags with the names in the groups
513            */
514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
515            public long[] getTagIds(long[] groupIds, java.lang.String[] names);
516    
517            /**
518            * Returns the names of all the asset tags.
519            *
520            * @return the names of all the asset tags
521            */
522            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
523            public java.lang.String[] getTagNames();
524    
525            /**
526            * Returns the names of the asset tags of the entity
527            *
528            * @param className the class name of the entity
529            * @param classPK the primary key of the entity
530            * @return the names of the asset tags of the entity
531            */
532            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
533            public java.lang.String[] getTagNames(java.lang.String className,
534                    long classPK);
535    
536            /**
537            * Returns the names of the asset tags of the entity.
538            *
539            * @param classNameId the class name ID of the entity
540            * @param classPK the primary key of the entity
541            * @return the names of the asset tags of the entity
542            */
543            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
544            public java.lang.String[] getTagNames(long classNameId, long classPK);
545    
546            /**
547            * Returns all the asset tags.
548            *
549            * @return the asset tags
550            */
551            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
552            public List<AssetTag> getTags();
553    
554            /**
555            * Returns the asset tags of the entity.
556            *
557            * @param className the class name of the entity
558            * @param classPK the primary key of the entity
559            * @return the asset tags of the entity
560            */
561            @ThreadLocalCachable
562            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
563            public List<AssetTag> getTags(java.lang.String className, long classPK);
564    
565            /**
566            * Returns the asset tags of the entity.
567            *
568            * @param classNameId the class name ID of the entity
569            * @param classPK the primary key of the entity
570            * @return the asset tags of the entity
571            */
572            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
573            public List<AssetTag> getTags(long classNameId, long classPK);
574    
575            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
576            public List<AssetTag> getTags(long groupId, long classNameId,
577                    java.lang.String name);
578    
579            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
580            public List<AssetTag> getTags(long groupId, long classNameId,
581                    java.lang.String name, int start, int end);
582    
583            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
584            public int getTagsSize(long groupId, long classNameId, java.lang.String name);
585    
586            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
587            public boolean hasAssetEntryAssetTag(long entryId, long tagId);
588    
589            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
590            public boolean hasAssetEntryAssetTags(long entryId);
591    
592            /**
593            * Returns <code>true</code> if the group contains an asset tag with the
594            * name.
595            *
596            * @param groupId the primary key of the group
597            * @param name the name of the asset tag
598            * @return <code>true</code> if the group contains an asset tag with the
599            name; <code>false</code> otherwise.
600            */
601            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
602            public boolean hasTag(long groupId, java.lang.String name);
603    
604            /**
605            * Increments the number of assets to which the asset tag has been applied.
606            *
607            * @param tagId the primary key of the asset tag
608            * @param classNameId the class name ID of the entity to which the asset
609            tag is being applied
610            * @return the asset tag
611            */
612            public AssetTag incrementAssetCount(long tagId, long classNameId)
613                    throws PortalException;
614    
615            /**
616            * Replaces all occurrences of the first asset tag with the second asset tag
617            * and deletes the first asset tag.
618            *
619            * @param fromTagId the primary key of the asset tag to be replaced
620            * @param toTagId the primary key of the asset tag to apply to the asset
621            entries of the other asset tag
622            */
623            public void mergeTags(long fromTagId, long toTagId)
624                    throws PortalException;
625    
626            /**
627            * Returns the asset tags in the group whose names match the pattern.
628            *
629            * @param groupId the primary key of the group
630            * @param name the pattern to match
631            * @param start the lower bound of the range of asset tags
632            * @param end the upper bound of the range of asset tags (not inclusive)
633            * @return the asset tags in the group whose names match the pattern
634            */
635            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
636            public List<AssetTag> search(long groupId, java.lang.String name,
637                    int start, int end);
638    
639            /**
640            * Returns the asset tags in the groups whose names match the pattern.
641            *
642            * @param groupIds the primary keys of the groups
643            * @param name the pattern to match
644            * @param start the lower bound of the range of asset tags
645            * @param end the upper bound of the range of asset tags (not inclusive)
646            * @return the asset tags in the groups whose names match the pattern
647            */
648            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
649            public List<AssetTag> search(long[] groupIds, java.lang.String name,
650                    int start, int end);
651    
652            public void setAssetEntryAssetTags(long entryId, long[] tagIds);
653    
654            /**
655            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
656            *
657            * @param assetTag the asset tag
658            * @return the asset tag that was updated
659            */
660            @Indexable(type = IndexableType.REINDEX)
661            public AssetTag updateAssetTag(AssetTag assetTag);
662    
663            public AssetTag updateTag(long userId, long tagId, java.lang.String name,
664                    ServiceContext serviceContext) throws PortalException;
665    }