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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for AssetVocabulary. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see AssetVocabularyLocalServiceUtil
037     * @see com.liferay.portlet.asset.service.base.AssetVocabularyLocalServiceBaseImpl
038     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface AssetVocabularyLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link AssetVocabularyLocalServiceUtil} to access the asset vocabulary local service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051    
052            /**
053            * Adds the asset vocabulary to the database. Also notifies the appropriate model listeners.
054            *
055            * @param assetVocabulary the asset vocabulary
056            * @return the asset vocabulary that was added
057            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portlet.asset.model.AssetVocabulary addAssetVocabulary(
060                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
061    
062            public com.liferay.portlet.asset.model.AssetVocabulary addDefaultVocabulary(
063                    long groupId)
064                    throws com.liferay.portal.kernel.exception.PortalException;
065    
066            public com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
067                    long userId, java.lang.String title,
068                    com.liferay.portal.service.ServiceContext serviceContext)
069                    throws com.liferay.portal.kernel.exception.PortalException;
070    
071            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
072            public com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
073                    long userId, java.lang.String title,
074                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
075                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
076                    java.lang.String settings,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws com.liferay.portal.kernel.exception.PortalException;
079    
080            /**
081            * @deprecated As of 6.1.0
082            */
083            @java.lang.Deprecated
084            public com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
085                    long userId,
086                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
087                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
088                    java.lang.String settings,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws com.liferay.portal.kernel.exception.PortalException;
091    
092            public void addVocabularyResources(
093                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
094                    boolean addGroupPermissions, boolean addGuestPermissions)
095                    throws com.liferay.portal.kernel.exception.PortalException;
096    
097            public void addVocabularyResources(
098                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
099                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
100                    throws com.liferay.portal.kernel.exception.PortalException;
101    
102            /**
103            * Creates a new asset vocabulary with the primary key. Does not add the asset vocabulary to the database.
104            *
105            * @param vocabularyId the primary key for the new asset vocabulary
106            * @return the new asset vocabulary
107            */
108            public com.liferay.portlet.asset.model.AssetVocabulary createAssetVocabulary(
109                    long vocabularyId);
110    
111            /**
112            * Deletes the asset vocabulary from the database. Also notifies the appropriate model listeners.
113            *
114            * @param assetVocabulary the asset vocabulary
115            * @return the asset vocabulary that was removed
116            */
117            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
118            public com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
119                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
120    
121            /**
122            * Deletes the asset vocabulary with the primary key from the database. Also notifies the appropriate model listeners.
123            *
124            * @param vocabularyId the primary key of the asset vocabulary
125            * @return the asset vocabulary that was removed
126            * @throws PortalException if a asset vocabulary with the primary key could not be found
127            */
128            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
129            public com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
130                    long vocabularyId)
131                    throws com.liferay.portal.kernel.exception.PortalException;
132    
133            /**
134            * @throws PortalException
135            */
136            @Override
137            public com.liferay.portal.model.PersistedModel deletePersistedModel(
138                    com.liferay.portal.model.PersistedModel persistedModel)
139                    throws com.liferay.portal.kernel.exception.PortalException;
140    
141            public void deleteVocabularies(long groupId)
142                    throws com.liferay.portal.kernel.exception.PortalException;
143    
144            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
145            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
146            public void deleteVocabulary(
147                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary)
148                    throws com.liferay.portal.kernel.exception.PortalException;
149    
150            public void deleteVocabulary(long vocabularyId)
151                    throws com.liferay.portal.kernel.exception.PortalException;
152    
153            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
154    
155            /**
156            * Performs a dynamic query on the database and returns the matching rows.
157            *
158            * @param dynamicQuery the dynamic query
159            * @return the matching rows
160            */
161            public <T> java.util.List<T> dynamicQuery(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
163    
164            /**
165            * Performs a dynamic query on the database and returns a range of the matching rows.
166            *
167            * <p>
168            * 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.AssetVocabularyModelImpl}. 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.
169            * </p>
170            *
171            * @param dynamicQuery the dynamic query
172            * @param start the lower bound of the range of model instances
173            * @param end the upper bound of the range of model instances (not inclusive)
174            * @return the range of matching rows
175            */
176            public <T> java.util.List<T> dynamicQuery(
177                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
178                    int end);
179    
180            /**
181            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
182            *
183            * <p>
184            * 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.AssetVocabularyModelImpl}. 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.
185            * </p>
186            *
187            * @param dynamicQuery the dynamic query
188            * @param start the lower bound of the range of model instances
189            * @param end the upper bound of the range of model instances (not inclusive)
190            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
191            * @return the ordered range of matching rows
192            */
193            public <T> java.util.List<T> dynamicQuery(
194                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
195                    int end,
196                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
197    
198            /**
199            * Returns the number of rows that match the dynamic query.
200            *
201            * @param dynamicQuery the dynamic query
202            * @return the number of rows that match the dynamic query
203            */
204            public long dynamicQueryCount(
205                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
206    
207            /**
208            * Returns the number of rows that match the dynamic query.
209            *
210            * @param dynamicQuery the dynamic query
211            * @param projection the projection to apply to the query
212            * @return the number of rows that match the dynamic query
213            */
214            public long dynamicQueryCount(
215                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
216                    com.liferay.portal.kernel.dao.orm.Projection projection);
217    
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabulary(
220                    long vocabularyId);
221    
222            /**
223            * Returns the asset vocabulary matching the UUID and group.
224            *
225            * @param uuid the asset vocabulary's UUID
226            * @param groupId the primary key of the group
227            * @return the matching asset vocabulary, or <code>null</code> if a matching asset vocabulary could not be found
228            */
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
231                    java.lang.String uuid, long groupId);
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
235    
236            /**
237            * Returns a range of all the asset vocabularies.
238            *
239            * <p>
240            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetVocabularyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
241            * </p>
242            *
243            * @param start the lower bound of the range of asset vocabularies
244            * @param end the upper bound of the range of asset vocabularies (not inclusive)
245            * @return the range of asset vocabularies
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabularies(
249                    int start, int end);
250    
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
253                    java.lang.String uuid, long companyId);
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
257                    java.lang.String uuid, long companyId, int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator);
259    
260            /**
261            * Returns the number of asset vocabularies.
262            *
263            * @return the number of asset vocabularies
264            */
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public int getAssetVocabulariesCount();
267    
268            /**
269            * Returns the asset vocabulary with the primary key.
270            *
271            * @param vocabularyId the primary key of the asset vocabulary
272            * @return the asset vocabulary
273            * @throws PortalException if a asset vocabulary with the primary key could not be found
274            */
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
277                    long vocabularyId)
278                    throws com.liferay.portal.kernel.exception.PortalException;
279    
280            /**
281            * Returns the asset vocabulary matching the UUID and group.
282            *
283            * @param uuid the asset vocabulary's UUID
284            * @param groupId the primary key of the group
285            * @return the matching asset vocabulary
286            * @throws PortalException if a matching asset vocabulary could not be found
287            */
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabularyByUuidAndGroupId(
290                    java.lang.String uuid, long groupId)
291                    throws com.liferay.portal.kernel.exception.PortalException;
292    
293            /**
294            * Returns the Spring bean ID for this bean.
295            *
296            * @return the Spring bean ID for this bean
297            */
298            public java.lang.String getBeanIdentifier();
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
302                    long companyId);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
306                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
310                    long groupId)
311                    throws com.liferay.portal.kernel.exception.PortalException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
315                    long groupId, boolean addDefaultVocabulary)
316                    throws com.liferay.portal.kernel.exception.PortalException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
320                    long groupId, java.lang.String name, int start, int end,
321                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc);
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
325                    long[] groupIds);
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public int getGroupVocabulariesCount(long[] groupIds);
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
332                    long groupId, java.lang.String name)
333                    throws com.liferay.portal.kernel.exception.PortalException;
334    
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
337                    long[] groupIds);
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
341                    long[] groupIds, java.lang.String className);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
345                    long[] groupIds, java.lang.String className, long classTypePK);
346    
347            @Override
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public com.liferay.portal.model.PersistedModel getPersistedModel(
350                    java.io.Serializable primaryKeyObj)
351                    throws com.liferay.portal.kernel.exception.PortalException;
352    
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
355                    long[] vocabularyIds)
356                    throws com.liferay.portal.kernel.exception.PortalException;
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
360                    long vocabularyId)
361                    throws com.liferay.portal.kernel.exception.PortalException;
362    
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
365                    long companyId, long groupId, java.lang.String title, int start, int end)
366                    throws com.liferay.portal.kernel.exception.PortalException;
367    
368            /**
369            * Sets the Spring bean ID for this bean.
370            *
371            * @param beanIdentifier the Spring bean ID for this bean
372            */
373            public void setBeanIdentifier(java.lang.String beanIdentifier);
374    
375            /**
376            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
377            *
378            * @param assetVocabulary the asset vocabulary
379            * @return the asset vocabulary that was updated
380            */
381            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
382            public com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
383                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
384    
385            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
386            public com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
387                    long vocabularyId, java.lang.String title,
388                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
389                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
390                    java.lang.String settings,
391                    com.liferay.portal.service.ServiceContext serviceContext)
392                    throws com.liferay.portal.kernel.exception.PortalException;
393    
394            /**
395            * @deprecated As of 6.1.0
396            */
397            @java.lang.Deprecated
398            public com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
399                    long vocabularyId,
400                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
401                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
402                    java.lang.String settings,
403                    com.liferay.portal.service.ServiceContext serviceContext)
404                    throws com.liferay.portal.kernel.exception.PortalException;
405    }