001    /**
002     * Copyright (c) 2000-2010 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.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the asset tag local service.
025     *
026     * <p>
027     * 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.
028     * </p>
029     *
030     * <p>
031     * 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.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see AssetTagLocalServiceUtil
036     * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
037     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface AssetTagLocalService {
043            /**
044            * Adds the asset tag to the database. Also notifies the appropriate model listeners.
045            *
046            * @param assetTag the asset tag to add
047            * @return the asset tag that was added
048            * @throws SystemException if a system exception occurred
049            */
050            public com.liferay.portlet.asset.model.AssetTag addAssetTag(
051                    com.liferay.portlet.asset.model.AssetTag assetTag)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
056            *
057            * @param tagId the primary key for the new asset tag
058            * @return the new asset tag
059            */
060            public com.liferay.portlet.asset.model.AssetTag createAssetTag(long tagId);
061    
062            /**
063            * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param tagId the primary key of the asset tag to delete
066            * @throws PortalException if a asset tag with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public void deleteAssetTag(long tagId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            /**
074            * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
075            *
076            * @param assetTag the asset tag to delete
077            * @throws SystemException if a system exception occurred
078            */
079            public void deleteAssetTag(
080                    com.liferay.portlet.asset.model.AssetTag assetTag)
081                    throws com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * Performs a dynamic query on the database and returns the matching rows.
085            *
086            * @param dynamicQuery the dynamic query to search with
087            * @return the matching rows
088            * @throws SystemException if a system exception occurred
089            */
090            @SuppressWarnings("rawtypes")
091            public java.util.List dynamicQuery(
092                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
093                    throws com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Performs a dynamic query on the database and returns a range of the matching rows.
097            *
098            * <p>
099            * 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.
100            * </p>
101            *
102            * @param dynamicQuery the dynamic query to search with
103            * @param start the lower bound of the range of model instances to return
104            * @param end the upper bound of the range of model instances to return (not inclusive)
105            * @return the range of matching rows
106            * @throws SystemException if a system exception occurred
107            */
108            @SuppressWarnings("rawtypes")
109            public java.util.List dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
111                    int end) throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
115            *
116            * <p>
117            * 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.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query to search with
121            * @param start the lower bound of the range of model instances to return
122            * @param end the upper bound of the range of model instances to return (not inclusive)
123            * @param orderByComparator the comparator to order the results by
124            * @return the ordered range of matching rows
125            * @throws SystemException if a system exception occurred
126            */
127            @SuppressWarnings("rawtypes")
128            public java.util.List dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
130                    int end,
131                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Counts the number of rows that match the dynamic query.
136            *
137            * @param dynamicQuery the dynamic query to search with
138            * @return the number of rows that match the dynamic query
139            * @throws SystemException if a system exception occurred
140            */
141            public long dynamicQueryCount(
142                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Gets the asset tag with the primary key.
147            *
148            * @param tagId the primary key of the asset tag to get
149            * @return the asset tag
150            * @throws PortalException if a asset tag with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154            public com.liferay.portlet.asset.model.AssetTag getAssetTag(long tagId)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException;
157    
158            /**
159            * Gets a range of all the asset tags.
160            *
161            * <p>
162            * 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.
163            * </p>
164            *
165            * @param start the lower bound of the range of asset tags to return
166            * @param end the upper bound of the range of asset tags to return (not inclusive)
167            * @return the range of asset tags
168            * @throws SystemException if a system exception occurred
169            */
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
172                    int start, int end)
173                    throws com.liferay.portal.kernel.exception.SystemException;
174    
175            /**
176            * Gets the number of asset tags.
177            *
178            * @return the number of asset tags
179            * @throws SystemException if a system exception occurred
180            */
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public int getAssetTagsCount()
183                    throws com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Updates the asset tag in the database. Also notifies the appropriate model listeners.
187            *
188            * @param assetTag the asset tag to update
189            * @return the asset tag that was updated
190            * @throws SystemException if a system exception occurred
191            */
192            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
193                    com.liferay.portlet.asset.model.AssetTag assetTag)
194                    throws com.liferay.portal.kernel.exception.SystemException;
195    
196            /**
197            * Updates the asset tag in the database. Also notifies the appropriate model listeners.
198            *
199            * @param assetTag the asset tag to update
200            * @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.
201            * @return the asset tag that was updated
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
205                    com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            public com.liferay.portlet.asset.model.AssetTag addTag(long userId,
209                    java.lang.String name, java.lang.String[] tagProperties,
210                    com.liferay.portal.service.ServiceContext serviceContext)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException;
213    
214            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
215                    boolean addCommunityPermissions, boolean addGuestPermissions)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
220                    java.lang.String[] communityPermissions,
221                    java.lang.String[] guestPermissions)
222                    throws com.liferay.portal.kernel.exception.PortalException,
223                            com.liferay.portal.kernel.exception.SystemException;
224    
225            public void checkTags(long userId, long groupId, java.lang.String[] names)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException;
228    
229            public com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
230                    long tagId, long classNameId)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException;
233    
234            public void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            public void deleteTag(long tagId)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException;
241    
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
244                    long entryId)
245                    throws com.liferay.portal.kernel.exception.SystemException;
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
249                    long groupId)
250                    throws com.liferay.portal.kernel.exception.SystemException;
251    
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
254                    throws com.liferay.portal.kernel.exception.PortalException,
255                            com.liferay.portal.kernel.exception.SystemException;
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public com.liferay.portlet.asset.model.AssetTag getTag(long groupId,
259                    java.lang.String name)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException;
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public long[] getTagIds(long groupId, java.lang.String[] names)
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.lang.String[] getTagNames()
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.lang.String[] getTagNames(long classNameId, long classPK)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public java.lang.String[] getTagNames(java.lang.String className,
278                    long classPK)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags()
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
287                    long classNameId, long classPK)
288                    throws com.liferay.portal.kernel.exception.SystemException;
289    
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
292                    long groupId, long classNameId, java.lang.String name)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
297                    long groupId, long classNameId, java.lang.String name, int start,
298                    int end) throws com.liferay.portal.kernel.exception.SystemException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
302                    java.lang.String className, long classPK)
303                    throws com.liferay.portal.kernel.exception.SystemException;
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public int getTagsSize(long groupId, long classNameId, java.lang.String name)
307                    throws com.liferay.portal.kernel.exception.SystemException;
308    
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public boolean hasTag(long groupId, java.lang.String name)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException;
313    
314            public com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
315                    long tagId, long classNameId)
316                    throws com.liferay.portal.kernel.exception.PortalException,
317                            com.liferay.portal.kernel.exception.SystemException;
318    
319            public void mergeTags(long fromTagId, long toTagId)
320                    throws com.liferay.portal.kernel.exception.PortalException,
321                            com.liferay.portal.kernel.exception.SystemException;
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public com.liferay.portal.kernel.json.JSONArray search(long groupId,
325                    java.lang.String name, java.lang.String[] tagProperties, int start,
326                    int end) throws com.liferay.portal.kernel.exception.SystemException;
327    
328            public com.liferay.portlet.asset.model.AssetTag updateTag(long userId,
329                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
330                    com.liferay.portal.service.ServiceContext serviceContext)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    }