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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
070            public AssetVocabulary fetchVocabulary(long vocabularyId)
071                    throws PortalException;
072    
073            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
074            public AssetVocabulary getVocabulary(long vocabularyId)
075                    throws PortalException;
076    
077            public AssetVocabulary updateVocabulary(long vocabularyId,
078                    java.lang.String title, Map<Locale, java.lang.String> titleMap,
079                    Map<Locale, java.lang.String> descriptionMap,
080                    java.lang.String settings, ServiceContext serviceContext)
081                    throws PortalException;
082    
083            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
084            public AssetVocabularyDisplay getGroupVocabulariesDisplay(long groupId,
085                    java.lang.String name, int start, int end,
086                    boolean addDefaultVocabulary, OrderByComparator<AssetVocabulary> obc)
087                    throws PortalException;
088    
089            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
090            public AssetVocabularyDisplay getGroupVocabulariesDisplay(long groupId,
091                    java.lang.String name, int start, int end,
092                    OrderByComparator<AssetVocabulary> obc) throws PortalException;
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public AssetVocabularyDisplay searchVocabulariesDisplay(long groupId,
096                    java.lang.String title, boolean addDefaultVocabulary, int start, int end)
097                    throws PortalException;
098    
099            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100            public AssetVocabularyDisplay searchVocabulariesDisplay(long groupId,
101                    java.lang.String title, boolean addDefaultVocabulary, int start,
102                    int end, Sort sort) throws PortalException;
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public int getGroupVocabulariesCount(long groupId);
106    
107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108            public int getGroupVocabulariesCount(long groupId, java.lang.String name);
109    
110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111            public int getGroupVocabulariesCount(long[] groupIds);
112    
113            /**
114            * Returns the OSGi service identifier.
115            *
116            * @return the OSGi service identifier
117            */
118            public java.lang.String getOSGiServiceIdentifier();
119    
120            public List<AssetVocabulary> deleteVocabularies(long[] vocabularyIds,
121                    ServiceContext serviceContext) throws PortalException;
122    
123            /**
124            * @deprecated As of 7.0.0, with no direct replacement
125            */
126            @java.lang.Deprecated
127            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128            public List<AssetVocabulary> getCompanyVocabularies(long companyId)
129                    throws PortalException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public List<AssetVocabulary> getGroupVocabularies(long groupId)
133                    throws PortalException;
134    
135            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136            public List<AssetVocabulary> getGroupVocabularies(long groupId,
137                    boolean createDefaultVocabulary) throws PortalException;
138    
139            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140            public List<AssetVocabulary> getGroupVocabularies(long groupId,
141                    boolean createDefaultVocabulary, int start, int end,
142                    OrderByComparator<AssetVocabulary> obc) throws PortalException;
143    
144            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145            public List<AssetVocabulary> getGroupVocabularies(long groupId, int start,
146                    int end, OrderByComparator<AssetVocabulary> obc);
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public List<AssetVocabulary> getGroupVocabularies(long groupId,
150                    java.lang.String name, int start, int end,
151                    OrderByComparator<AssetVocabulary> obc);
152    
153            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154            public List<AssetVocabulary> getGroupVocabularies(long[] groupIds);
155    
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds);
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
161                    java.lang.String className);
162    
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
165                    java.lang.String className, long classTypePK);
166    
167            /**
168            * @deprecated As of 7.0.0, replaced by {@link
169            AssetUtil#filterVocabularyIds(PermissionChecker, long[])}
170            */
171            @java.lang.Deprecated
172            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173            public List<AssetVocabulary> getVocabularies(long[] vocabularyIds)
174                    throws PortalException;
175    
176            public void deleteVocabulary(long vocabularyId) throws PortalException;
177    }