001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    import com.liferay.portal.service.PersistedModelLocalService;
023    
024    /**
025     * The interface for the asset tag local service.
026     *
027     * <p>
028     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see AssetTagLocalServiceUtil
033     * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
034     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
035     * @generated
036     */
037    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
038            PortalException.class, SystemException.class})
039    public interface AssetTagLocalService extends PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * 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.
044             */
045    
046            /**
047            * Adds the asset tag to the database. Also notifies the appropriate model listeners.
048            *
049            * @param assetTag the asset tag
050            * @return the asset tag that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portlet.asset.model.AssetTag addAssetTag(
054                    com.liferay.portlet.asset.model.AssetTag assetTag)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
059            *
060            * @param tagId the primary key for the new asset tag
061            * @return the new asset tag
062            */
063            public com.liferay.portlet.asset.model.AssetTag createAssetTag(long tagId);
064    
065            /**
066            * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param tagId the primary key of the asset tag
069            * @throws PortalException if a asset tag with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public void deleteAssetTag(long tagId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
078            *
079            * @param assetTag the asset tag
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteAssetTag(
083                    com.liferay.portlet.asset.model.AssetTag assetTag)
084                    throws com.liferay.portal.kernel.exception.SystemException;
085    
086            /**
087            * Performs a dynamic query on the database and returns the matching rows.
088            *
089            * @param dynamicQuery the dynamic query
090            * @return the matching rows
091            * @throws SystemException if a system exception occurred
092            */
093            @SuppressWarnings("rawtypes")
094            public java.util.List dynamicQuery(
095                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * Performs a dynamic query on the database and returns a range of the matching rows.
100            *
101            * <p>
102            * 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.
103            * </p>
104            *
105            * @param dynamicQuery the dynamic query
106            * @param start the lower bound of the range of model instances
107            * @param end the upper bound of the range of model instances (not inclusive)
108            * @return the range of matching rows
109            * @throws SystemException if a system exception occurred
110            */
111            @SuppressWarnings("rawtypes")
112            public java.util.List dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114                    int end) throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException;
136    
137            /**
138            * Returns the number of rows that match the dynamic query.
139            *
140            * @param dynamicQuery the dynamic query
141            * @return the number of rows that match the dynamic query
142            * @throws SystemException if a system exception occurred
143            */
144            public long dynamicQueryCount(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public com.liferay.portlet.asset.model.AssetTag fetchAssetTag(long tagId)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the asset tag with the primary key.
154            *
155            * @param tagId the primary key of the asset tag
156            * @return the asset tag
157            * @throws PortalException if a asset tag with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161            public com.liferay.portlet.asset.model.AssetTag getAssetTag(long tagId)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public com.liferay.portal.model.PersistedModel getPersistedModel(
167                    java.io.Serializable primaryKeyObj)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns a range of all the asset tags.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param start the lower bound of the range of asset tags
179            * @param end the upper bound of the range of asset tags (not inclusive)
180            * @return the range of asset tags
181            * @throws SystemException if a system exception occurred
182            */
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
185                    int start, int end)
186                    throws com.liferay.portal.kernel.exception.SystemException;
187    
188            /**
189            * Returns the number of asset tags.
190            *
191            * @return the number of asset tags
192            * @throws SystemException if a system exception occurred
193            */
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public int getAssetTagsCount()
196                    throws com.liferay.portal.kernel.exception.SystemException;
197    
198            /**
199            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
200            *
201            * @param assetTag the asset tag
202            * @return the asset tag that was updated
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
206                    com.liferay.portlet.asset.model.AssetTag assetTag)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
211            *
212            * @param assetTag the asset tag
213            * @param merge whether to merge the asset tag with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
214            * @return the asset tag that was updated
215            * @throws SystemException if a system exception occurred
216            */
217            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
218                    com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge)
219                    throws com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Returns the Spring bean ID for this bean.
223            *
224            * @return the Spring bean ID for this bean
225            */
226            public java.lang.String getBeanIdentifier();
227    
228            /**
229            * Sets the Spring bean ID for this bean.
230            *
231            * @param beanIdentifier the Spring bean ID for this bean
232            */
233            public void setBeanIdentifier(java.lang.String beanIdentifier);
234    
235            public com.liferay.portlet.asset.model.AssetTag addTag(long userId,
236                    java.lang.String name, java.lang.String[] tagProperties,
237                    com.liferay.portal.service.ServiceContext serviceContext)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException;
240    
241            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
242                    boolean addGroupPermissions, boolean addGuestPermissions)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException;
245    
246            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
247                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException;
250    
251            public void checkTags(long userId, long groupId, java.lang.String[] names)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException;
254    
255            public com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
256                    long tagId, long classNameId)
257                    throws com.liferay.portal.kernel.exception.PortalException,
258                            com.liferay.portal.kernel.exception.SystemException;
259    
260            public void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException;
263    
264            public void deleteTag(long tagId)
265                    throws com.liferay.portal.kernel.exception.PortalException,
266                            com.liferay.portal.kernel.exception.SystemException;
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
270                    long entryId)
271                    throws com.liferay.portal.kernel.exception.SystemException;
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags(
275                    long[] groupIds)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
280                    long groupId)
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
285                    long groupId, int start, int end)
286                    throws com.liferay.portal.kernel.exception.SystemException;
287    
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public int getGroupTagsCount(long groupId)
290                    throws com.liferay.portal.kernel.exception.SystemException;
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterOffsetTags(
294                    long groupId, java.lang.String socialActivityCounterName,
295                    int startOffset, int endOffset)
296                    throws com.liferay.portal.kernel.exception.SystemException;
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterPeriodTags(
300                    long groupId, java.lang.String socialActivityCounterName,
301                    int startPeriod, int endPeriod)
302                    throws com.liferay.portal.kernel.exception.SystemException;
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException;
308    
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public com.liferay.portlet.asset.model.AssetTag getTag(long groupId,
311                    java.lang.String name)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException;
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public long[] getTagIds(long groupId, java.lang.String[] names)
317                    throws com.liferay.portal.kernel.exception.PortalException,
318                            com.liferay.portal.kernel.exception.SystemException;
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public long[] getTagIds(long[] groupIds, java.lang.String[] names)
322                    throws com.liferay.portal.kernel.exception.PortalException,
323                            com.liferay.portal.kernel.exception.SystemException;
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public java.lang.String[] getTagNames()
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public java.lang.String[] getTagNames(long classNameId, long classPK)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public java.lang.String[] getTagNames(java.lang.String className,
335                    long classPK)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags()
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
344                    long classNameId, long classPK)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
349                    long groupId, long classNameId, java.lang.String name)
350                    throws com.liferay.portal.kernel.exception.SystemException;
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
354                    long groupId, long classNameId, java.lang.String name, int start,
355                    int end) throws com.liferay.portal.kernel.exception.SystemException;
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
359                    java.lang.String className, long classPK)
360                    throws com.liferay.portal.kernel.exception.SystemException;
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public int getTagsSize(long groupId, long classNameId, java.lang.String name)
364                    throws com.liferay.portal.kernel.exception.SystemException;
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public boolean hasTag(long groupId, java.lang.String name)
368                    throws com.liferay.portal.kernel.exception.PortalException,
369                            com.liferay.portal.kernel.exception.SystemException;
370    
371            public com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
372                    long tagId, long classNameId)
373                    throws com.liferay.portal.kernel.exception.PortalException,
374                            com.liferay.portal.kernel.exception.SystemException;
375    
376            public void mergeTags(long fromTagId, long toTagId,
377                    boolean overrideProperties)
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException;
380    
381            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382            public java.util.List<com.liferay.portlet.asset.model.AssetTag> search(
383                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
384                    int start, int end)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            public com.liferay.portlet.asset.model.AssetTag updateTag(long userId,
388                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
389                    com.liferay.portal.service.ServiceContext serviceContext)
390                    throws com.liferay.portal.kernel.exception.PortalException,
391                            com.liferay.portal.kernel.exception.SystemException;
392    }