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.asset.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.asset.kernel.model.AssetVocabulary;
020    import com.liferay.asset.kernel.model.AssetVocabularyDisplay;
021    
022    import com.liferay.portal.kernel.exception.PortalException;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
025    import com.liferay.portal.kernel.search.Sort;
026    import com.liferay.portal.kernel.security.access.control.AccessControlled;
027    import com.liferay.portal.kernel.service.BaseService;
028    import com.liferay.portal.kernel.service.ServiceContext;
029    import com.liferay.portal.kernel.transaction.Isolation;
030    import com.liferay.portal.kernel.transaction.Propagation;
031    import com.liferay.portal.kernel.transaction.Transactional;
032    import com.liferay.portal.kernel.util.OrderByComparator;
033    
034    import java.util.List;
035    import java.util.Locale;
036    import java.util.Map;
037    
038    /**
039     * Provides the remote service interface for AssetVocabulary. Methods of this
040     * service are expected to have security checks based on the propagated JAAS
041     * credentials because this service can be accessed remotely.
042     *
043     * @author Brian Wing Shun Chan
044     * @see AssetVocabularyServiceUtil
045     * @see com.liferay.portlet.asset.service.base.AssetVocabularyServiceBaseImpl
046     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl
047     * @generated
048     */
049    @AccessControlled
050    @JSONWebService
051    @ProviderType
052    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
053            PortalException.class, SystemException.class})
054    public interface AssetVocabularyService extends BaseService {
055            /*
056             * NOTE FOR DEVELOPERS:
057             *
058             * Never modify or reference this interface directly. Always use {@link AssetVocabularyServiceUtil} to access the asset vocabulary remote service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
059             */
060            public AssetVocabulary addVocabulary(long groupId, java.lang.String title,
061                    ServiceContext serviceContext) throws PortalException;
062    
063            public AssetVocabulary addVocabulary(long groupId, java.lang.String title,
064                    Map<Locale, java.lang.String> titleMap,
065                    Map<Locale, java.lang.String> descriptionMap,
066                    java.lang.String settings, ServiceContext serviceContext)
067                    throws PortalException;
068    
069            public List<AssetVocabulary> deleteVocabularies(long[] vocabularyIds,
070                    ServiceContext serviceContext) throws PortalException;
071    
072            public void deleteVocabulary(long vocabularyId) throws PortalException;
073    
074            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075            public AssetVocabulary fetchVocabulary(long vocabularyId)
076                    throws PortalException;
077    
078            /**
079            * @deprecated As of 7.0.0, with no direct replacement
080            */
081            @java.lang.Deprecated
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public List<AssetVocabulary> getCompanyVocabularies(long companyId)
084                    throws PortalException;
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public List<AssetVocabulary> getGroupVocabularies(long groupId)
088                    throws PortalException;
089    
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public List<AssetVocabulary> getGroupVocabularies(long groupId,
092                    boolean createDefaultVocabulary) throws PortalException;
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public List<AssetVocabulary> getGroupVocabularies(long groupId,
096                    boolean createDefaultVocabulary, int start, int end,
097                    OrderByComparator<AssetVocabulary> obc) throws PortalException;
098    
099            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100            public List<AssetVocabulary> getGroupVocabularies(long groupId,
101                    java.lang.String name, int start, int end,
102                    OrderByComparator<AssetVocabulary> obc);
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public List<AssetVocabulary> getGroupVocabularies(long groupId, int start,
106                    int end, OrderByComparator<AssetVocabulary> obc);
107    
108            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109            public List<AssetVocabulary> getGroupVocabularies(long[] groupIds);
110    
111            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112            public int getGroupVocabulariesCount(long groupId);
113    
114            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115            public int getGroupVocabulariesCount(long groupId, java.lang.String name);
116    
117            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118            public int getGroupVocabulariesCount(long[] groupIds);
119    
120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121            public AssetVocabularyDisplay getGroupVocabulariesDisplay(long groupId,
122                    java.lang.String name, int start, int end,
123                    boolean addDefaultVocabulary, OrderByComparator<AssetVocabulary> obc)
124                    throws PortalException;
125    
126            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127            public AssetVocabularyDisplay getGroupVocabulariesDisplay(long groupId,
128                    java.lang.String name, int start, int end,
129                    OrderByComparator<AssetVocabulary> obc) throws PortalException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds);
133    
134            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
136                    java.lang.String className);
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
140                    java.lang.String className, long classTypePK);
141    
142            /**
143            * Returns the OSGi service identifier.
144            *
145            * @return the OSGi service identifier
146            */
147            public java.lang.String getOSGiServiceIdentifier();
148    
149            /**
150            * @deprecated As of 7.0.0, replaced by {@link
151            AssetUtil#filterVocabularyIds(PermissionChecker, long[])}
152            */
153            @java.lang.Deprecated
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public List<AssetVocabulary> getVocabularies(long[] vocabularyIds)
156                    throws PortalException;
157    
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public AssetVocabulary getVocabulary(long vocabularyId)
160                    throws PortalException;
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public AssetVocabularyDisplay searchVocabulariesDisplay(long groupId,
164                    java.lang.String title, boolean addDefaultVocabulary, int start, int end)
165                    throws PortalException;
166    
167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168            public AssetVocabularyDisplay searchVocabulariesDisplay(long groupId,
169                    java.lang.String title, boolean addDefaultVocabulary, int start,
170                    int end, Sort sort) throws PortalException;
171    
172            public AssetVocabulary updateVocabulary(long vocabularyId,
173                    java.lang.String title, Map<Locale, java.lang.String> titleMap,
174                    Map<Locale, java.lang.String> descriptionMap,
175                    java.lang.String settings, ServiceContext serviceContext)
176                    throws PortalException;
177    }