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 matching the dynamic query.
200            *
201            * @param dynamicQuery the dynamic query
202            * @return the number of rows matching 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 matching 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 matching 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            /**
252            * Returns all the asset vocabularies matching the UUID and company.
253            *
254            * @param uuid the UUID of the asset vocabularies
255            * @param companyId the primary key of the company
256            * @return the matching asset vocabularies, or an empty list if no matches were found
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
260                    java.lang.String uuid, long companyId);
261    
262            /**
263            * Returns a range of asset vocabularies matching the UUID and company.
264            *
265            * @param uuid the UUID of the asset vocabularies
266            * @param companyId the primary key of the company
267            * @param start the lower bound of the range of asset vocabularies
268            * @param end the upper bound of the range of asset vocabularies (not inclusive)
269            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
270            * @return the range of matching asset vocabularies, or an empty list if no matches were found
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
274                    java.lang.String uuid, long companyId, int start, int end,
275                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator);
276    
277            /**
278            * Returns the number of asset vocabularies.
279            *
280            * @return the number of asset vocabularies
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getAssetVocabulariesCount();
284    
285            /**
286            * Returns the asset vocabulary with the primary key.
287            *
288            * @param vocabularyId the primary key of the asset vocabulary
289            * @return the asset vocabulary
290            * @throws PortalException if a asset vocabulary with the primary key could not be found
291            */
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
294                    long vocabularyId)
295                    throws com.liferay.portal.kernel.exception.PortalException;
296    
297            /**
298            * Returns the asset vocabulary matching the UUID and group.
299            *
300            * @param uuid the asset vocabulary's UUID
301            * @param groupId the primary key of the group
302            * @return the matching asset vocabulary
303            * @throws PortalException if a matching asset vocabulary could not be found
304            */
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabularyByUuidAndGroupId(
307                    java.lang.String uuid, long groupId)
308                    throws com.liferay.portal.kernel.exception.PortalException;
309    
310            /**
311            * Returns the Spring bean ID for this bean.
312            *
313            * @return the Spring bean ID for this bean
314            */
315            public java.lang.String getBeanIdentifier();
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
319                    long companyId);
320    
321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
323                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
327                    long groupId)
328                    throws com.liferay.portal.kernel.exception.PortalException;
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
332                    long groupId, boolean addDefaultVocabulary)
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> getGroupVocabularies(
337                    long groupId, java.lang.String name, int start, int end,
338                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc);
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
342                    long[] groupIds);
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public int getGroupVocabulariesCount(long[] groupIds);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
349                    long groupId, java.lang.String name)
350                    throws com.liferay.portal.kernel.exception.PortalException;
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
354                    long[] groupIds);
355    
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
358                    long[] groupIds, java.lang.String className);
359    
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
362                    long[] groupIds, java.lang.String className, long classTypePK);
363    
364            @Override
365            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366            public com.liferay.portal.model.PersistedModel getPersistedModel(
367                    java.io.Serializable primaryKeyObj)
368                    throws com.liferay.portal.kernel.exception.PortalException;
369    
370            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
372                    long[] vocabularyIds)
373                    throws com.liferay.portal.kernel.exception.PortalException;
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
377                    long vocabularyId)
378                    throws com.liferay.portal.kernel.exception.PortalException;
379    
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
382                    long companyId, long groupId, java.lang.String title, int start, int end)
383                    throws com.liferay.portal.kernel.exception.PortalException;
384    
385            /**
386            * Sets the Spring bean ID for this bean.
387            *
388            * @param beanIdentifier the Spring bean ID for this bean
389            */
390            public void setBeanIdentifier(java.lang.String beanIdentifier);
391    
392            /**
393            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
394            *
395            * @param assetVocabulary the asset vocabulary
396            * @return the asset vocabulary that was updated
397            */
398            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
399            public com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
400                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
401    
402            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
403            public com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
404                    long vocabularyId, java.lang.String title,
405                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
406                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
407                    java.lang.String settings,
408                    com.liferay.portal.service.ServiceContext serviceContext)
409                    throws com.liferay.portal.kernel.exception.PortalException;
410    
411            /**
412            * @deprecated As of 6.1.0
413            */
414            @java.lang.Deprecated
415            public com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
416                    long vocabularyId,
417                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
418                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
419                    java.lang.String settings,
420                    com.liferay.portal.service.ServiceContext serviceContext)
421                    throws com.liferay.portal.kernel.exception.PortalException;
422    }