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