001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            /**
149            * Returns the asset tag with the primary key.
150            *
151            * @param tagId the primary key of the asset tag
152            * @return the asset tag
153            * @throws PortalException if a asset tag with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public com.liferay.portlet.asset.model.AssetTag getAssetTag(long tagId)
158                    throws com.liferay.portal.kernel.exception.PortalException,
159                            com.liferay.portal.kernel.exception.SystemException;
160    
161            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162            public com.liferay.portal.model.PersistedModel getPersistedModel(
163                    java.io.Serializable primaryKeyObj)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Returns a range of all the asset tags.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param start the lower bound of the range of asset tags
175            * @param end the upper bound of the range of asset tags (not inclusive)
176            * @return the range of asset tags
177            * @throws SystemException if a system exception occurred
178            */
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
181                    int start, int end)
182                    throws com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Returns the number of asset tags.
186            *
187            * @return the number of asset tags
188            * @throws SystemException if a system exception occurred
189            */
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public int getAssetTagsCount()
192                    throws com.liferay.portal.kernel.exception.SystemException;
193    
194            /**
195            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
196            *
197            * @param assetTag the asset tag
198            * @return the asset tag that was updated
199            * @throws SystemException if a system exception occurred
200            */
201            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
202                    com.liferay.portlet.asset.model.AssetTag assetTag)
203                    throws com.liferay.portal.kernel.exception.SystemException;
204    
205            /**
206            * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
207            *
208            * @param assetTag the asset tag
209            * @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.
210            * @return the asset tag that was updated
211            * @throws SystemException if a system exception occurred
212            */
213            public com.liferay.portlet.asset.model.AssetTag updateAssetTag(
214                    com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge)
215                    throws com.liferay.portal.kernel.exception.SystemException;
216    
217            /**
218            * Returns the Spring bean ID for this bean.
219            *
220            * @return the Spring bean ID for this bean
221            */
222            public java.lang.String getBeanIdentifier();
223    
224            /**
225            * Sets the Spring bean ID for this bean.
226            *
227            * @param beanIdentifier the Spring bean ID for this bean
228            */
229            public void setBeanIdentifier(java.lang.String beanIdentifier);
230    
231            public com.liferay.portlet.asset.model.AssetTag addTag(long userId,
232                    java.lang.String name, java.lang.String[] tagProperties,
233                    com.liferay.portal.service.ServiceContext serviceContext)
234                    throws com.liferay.portal.kernel.exception.PortalException,
235                            com.liferay.portal.kernel.exception.SystemException;
236    
237            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
238                    boolean addCommunityPermissions, boolean addGuestPermissions)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException;
241    
242            public void addTagResources(com.liferay.portlet.asset.model.AssetTag tag,
243                    java.lang.String[] communityPermissions,
244                    java.lang.String[] guestPermissions)
245                    throws com.liferay.portal.kernel.exception.PortalException,
246                            com.liferay.portal.kernel.exception.SystemException;
247    
248            public void checkTags(long userId, long groupId, java.lang.String[] names)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException;
251    
252            public com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
253                    long tagId, long classNameId)
254                    throws com.liferay.portal.kernel.exception.PortalException,
255                            com.liferay.portal.kernel.exception.SystemException;
256    
257            public void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException;
260    
261            public void deleteTag(long tagId)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
267                    long entryId)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags(
272                    long[] groupIds)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
277                    long groupId)
278                    throws com.liferay.portal.kernel.exception.SystemException;
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
282                    long groupId, int start, int end)
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public int getGroupTagsCount(long groupId)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException;
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public com.liferay.portlet.asset.model.AssetTag getTag(long groupId,
296                    java.lang.String name)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public long[] getTagIds(long groupId, java.lang.String[] names)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException;
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public long[] getTagIds(long[] groupIds, java.lang.String[] names)
307                    throws com.liferay.portal.kernel.exception.PortalException,
308                            com.liferay.portal.kernel.exception.SystemException;
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public java.lang.String[] getTagNames()
312                    throws com.liferay.portal.kernel.exception.SystemException;
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public java.lang.String[] getTagNames(long classNameId, long classPK)
316                    throws com.liferay.portal.kernel.exception.SystemException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public java.lang.String[] getTagNames(java.lang.String className,
320                    long classPK)
321                    throws com.liferay.portal.kernel.exception.SystemException;
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags()
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
329                    long classNameId, long classPK)
330                    throws com.liferay.portal.kernel.exception.SystemException;
331    
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
334                    long groupId, long classNameId, java.lang.String name)
335                    throws com.liferay.portal.kernel.exception.SystemException;
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
339                    long groupId, long classNameId, java.lang.String name, int start,
340                    int end) 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                    java.lang.String className, long classPK)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public int getTagsSize(long groupId, long classNameId, java.lang.String name)
349                    throws com.liferay.portal.kernel.exception.SystemException;
350    
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public boolean hasTag(long groupId, java.lang.String name)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException;
355    
356            public com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
357                    long tagId, long classNameId)
358                    throws com.liferay.portal.kernel.exception.PortalException,
359                            com.liferay.portal.kernel.exception.SystemException;
360    
361            /**
362            * @deprecated {@link #mergeTags(long, long, boolean)}
363            */
364            public void mergeTags(long fromTagId, long toTagId)
365                    throws com.liferay.portal.kernel.exception.PortalException,
366                            com.liferay.portal.kernel.exception.SystemException;
367    
368            public void mergeTags(long fromTagId, long toTagId,
369                    boolean overrideProperties)
370                    throws com.liferay.portal.kernel.exception.PortalException,
371                            com.liferay.portal.kernel.exception.SystemException;
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public java.util.List<com.liferay.portlet.asset.model.AssetTag> search(
375                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
376                    int start, int end)
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            public com.liferay.portlet.asset.model.AssetTag updateTag(long userId,
380                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
381                    com.liferay.portal.service.ServiceContext serviceContext)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException;
384    }