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) throws PortalException;
064    
065            public com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
066                    long userId, long groupId, java.lang.String title,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws PortalException;
069    
070            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
071            public com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
072                    long userId, long groupId, java.lang.String title,
073                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
074                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
075                    java.lang.String settings,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws PortalException;
078    
079            public void addVocabularyResources(
080                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
081                    boolean addGroupPermissions, boolean addGuestPermissions)
082                    throws PortalException;
083    
084            public void addVocabularyResources(
085                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
086                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
087                    throws PortalException;
088    
089            /**
090            * Creates a new asset vocabulary with the primary key. Does not add the asset vocabulary to the database.
091            *
092            * @param vocabularyId the primary key for the new asset vocabulary
093            * @return the new asset vocabulary
094            */
095            public com.liferay.portlet.asset.model.AssetVocabulary createAssetVocabulary(
096                    long vocabularyId);
097    
098            /**
099            * Deletes the asset vocabulary from the database. Also notifies the appropriate model listeners.
100            *
101            * @param assetVocabulary the asset vocabulary
102            * @return the asset vocabulary that was removed
103            */
104            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
105            public com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
106                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
107    
108            /**
109            * Deletes the asset vocabulary with the primary key from the database. Also notifies the appropriate model listeners.
110            *
111            * @param vocabularyId the primary key of the asset vocabulary
112            * @return the asset vocabulary that was removed
113            * @throws PortalException if a asset vocabulary with the primary key could not be found
114            */
115            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
116            public com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
117                    long vocabularyId) throws PortalException;
118    
119            /**
120            * @throws PortalException
121            */
122            @Override
123            public com.liferay.portal.model.PersistedModel deletePersistedModel(
124                    com.liferay.portal.model.PersistedModel persistedModel)
125                    throws PortalException;
126    
127            public void deleteVocabularies(long groupId) throws PortalException;
128    
129            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
130            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
131            public com.liferay.portlet.asset.model.AssetVocabulary deleteVocabulary(
132                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary)
133                    throws PortalException;
134    
135            public void deleteVocabulary(long vocabularyId) throws PortalException;
136    
137            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
138    
139            /**
140            * Performs a dynamic query on the database and returns the matching rows.
141            *
142            * @param dynamicQuery the dynamic query
143            * @return the matching rows
144            */
145            public <T> java.util.List<T> dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
147    
148            /**
149            * Performs a dynamic query on the database and returns a range of the matching rows.
150            *
151            * <p>
152            * 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.
153            * </p>
154            *
155            * @param dynamicQuery the dynamic query
156            * @param start the lower bound of the range of model instances
157            * @param end the upper bound of the range of model instances (not inclusive)
158            * @return the range of matching rows
159            */
160            public <T> java.util.List<T> dynamicQuery(
161                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
162                    int end);
163    
164            /**
165            * Performs a dynamic query on the database and returns an ordered 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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
175            * @return the ordered range of matching rows
176            */
177            public <T> java.util.List<T> dynamicQuery(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
179                    int end,
180                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
181    
182            /**
183            * Returns the number of rows matching the dynamic query.
184            *
185            * @param dynamicQuery the dynamic query
186            * @return the number of rows matching the dynamic query
187            */
188            public long dynamicQueryCount(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
190    
191            /**
192            * Returns the number of rows matching the dynamic query.
193            *
194            * @param dynamicQuery the dynamic query
195            * @param projection the projection to apply to the query
196            * @return the number of rows matching the dynamic query
197            */
198            public long dynamicQueryCount(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
200                    com.liferay.portal.kernel.dao.orm.Projection projection);
201    
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabulary(
204                    long vocabularyId);
205    
206            /**
207            * Returns the asset vocabulary matching the UUID and group.
208            *
209            * @param uuid the asset vocabulary's UUID
210            * @param groupId the primary key of the group
211            * @return the matching asset vocabulary, or <code>null</code> if a matching asset vocabulary could not be found
212            */
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
215                    java.lang.String uuid, long groupId);
216    
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
219    
220            /**
221            * Returns a range of all the asset vocabularies.
222            *
223            * <p>
224            * 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.
225            * </p>
226            *
227            * @param start the lower bound of the range of asset vocabularies
228            * @param end the upper bound of the range of asset vocabularies (not inclusive)
229            * @return the range of asset vocabularies
230            */
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabularies(
233                    int start, int end);
234    
235            /**
236            * Returns all the asset vocabularies matching the UUID and company.
237            *
238            * @param uuid the UUID of the asset vocabularies
239            * @param companyId the primary key of the company
240            * @return the matching asset vocabularies, or an empty list if no matches were found
241            */
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
244                    java.lang.String uuid, long companyId);
245    
246            /**
247            * Returns a range of asset vocabularies matching the UUID and company.
248            *
249            * @param uuid the UUID of the asset vocabularies
250            * @param companyId the primary key of the company
251            * @param start the lower bound of the range of asset vocabularies
252            * @param end the upper bound of the range of asset vocabularies (not inclusive)
253            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
254            * @return the range of matching asset vocabularies, or an empty list if no matches were found
255            */
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
258                    java.lang.String uuid, long companyId, int start, int end,
259                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator);
260    
261            /**
262            * Returns the number of asset vocabularies.
263            *
264            * @return the number of asset vocabularies
265            */
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public int getAssetVocabulariesCount();
268    
269            /**
270            * Returns the asset vocabulary with the primary key.
271            *
272            * @param vocabularyId the primary key of the asset vocabulary
273            * @return the asset vocabulary
274            * @throws PortalException if a asset vocabulary with the primary key could not be found
275            */
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
278                    long vocabularyId) throws 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) throws PortalException;
291    
292            /**
293            * Returns the Spring bean ID for this bean.
294            *
295            * @return the Spring bean ID for this bean
296            */
297            public java.lang.String getBeanIdentifier();
298    
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
301                    long companyId);
302    
303            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
305                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
309                    long groupId) throws PortalException;
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
313                    long groupId, boolean addDefaultVocabulary) throws PortalException;
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
317                    long groupId, java.lang.String name, int start, int end,
318                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc);
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
322                    long[] groupIds);
323    
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public int getGroupVocabulariesCount(long[] groupIds);
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
329                    long groupId, java.lang.String name) throws PortalException;
330    
331            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
333                    long[] groupIds);
334    
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
337                    long[] groupIds, java.lang.String className);
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, long classTypePK);
342    
343            @Override
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public com.liferay.portal.model.PersistedModel getPersistedModel(
346                    java.io.Serializable primaryKeyObj) throws PortalException;
347    
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
350                    com.liferay.portal.kernel.search.Hits hits) throws PortalException;
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
354                    long[] vocabularyIds) throws PortalException;
355    
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
358                    long vocabularyId) throws PortalException;
359    
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
362                    long companyId, long groupId, java.lang.String title, int start, int end)
363                    throws PortalException;
364    
365            /**
366            * Sets the Spring bean ID for this bean.
367            *
368            * @param beanIdentifier the Spring bean ID for this bean
369            */
370            public void setBeanIdentifier(java.lang.String beanIdentifier);
371    
372            /**
373            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
374            *
375            * @param assetVocabulary the asset vocabulary
376            * @return the asset vocabulary that was updated
377            */
378            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
379            public com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
380                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary);
381    
382            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
383            public com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
384                    long vocabularyId, java.lang.String title,
385                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
386                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
387                    java.lang.String settings,
388                    com.liferay.portal.service.ServiceContext serviceContext)
389                    throws PortalException;
390    }