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.json.JSONArray;
022    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
023    import com.liferay.portal.kernel.security.access.control.AccessControlled;
024    import com.liferay.portal.kernel.transaction.Isolation;
025    import com.liferay.portal.kernel.transaction.Propagation;
026    import com.liferay.portal.kernel.transaction.Transactional;
027    import com.liferay.portal.kernel.util.OrderByComparator;
028    import com.liferay.portal.service.BaseService;
029    import com.liferay.portal.service.ServiceContext;
030    
031    import com.liferay.portlet.asset.model.AssetTag;
032    import com.liferay.portlet.asset.model.AssetTagDisplay;
033    
034    import java.util.List;
035    
036    /**
037     * Provides the remote service interface for AssetTag. Methods of this
038     * service are expected to have security checks based on the propagated JAAS
039     * credentials because this service can be accessed remotely.
040     *
041     * @author Brian Wing Shun Chan
042     * @see AssetTagServiceUtil
043     * @see com.liferay.portlet.asset.service.base.AssetTagServiceBaseImpl
044     * @see com.liferay.portlet.asset.service.impl.AssetTagServiceImpl
045     * @generated
046     */
047    @AccessControlled
048    @JSONWebService
049    @ProviderType
050    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
051            PortalException.class, SystemException.class})
052    public interface AssetTagService extends BaseService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this interface directly. Always use {@link AssetTagServiceUtil} to access the asset tag remote service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
057             */
058            public AssetTag addTag(long groupId, java.lang.String name,
059                    ServiceContext serviceContext) throws PortalException;
060    
061            public void deleteTag(long tagId) throws PortalException;
062    
063            public void deleteTags(long[] tagIds) throws PortalException;
064    
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public List<AssetTag> getGroupTags(long groupId);
067    
068            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
069            public List<AssetTag> getGroupTags(long groupId, int start, int end,
070                    OrderByComparator<AssetTag> obc);
071    
072            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
073            public int getGroupTagsCount(long groupId);
074    
075            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076            public AssetTagDisplay getGroupTagsDisplay(long groupId,
077                    java.lang.String name, int start, int end);
078    
079            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080            public List<AssetTag> getGroupsTags(long[] groupIds);
081    
082            /**
083            * Returns the OSGi service identifier.
084            *
085            * @return the OSGi service identifier
086            */
087            public java.lang.String getOSGiServiceIdentifier();
088    
089            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
090            public AssetTag getTag(long tagId) throws PortalException;
091    
092            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
093            public List<AssetTag> getTags(java.lang.String className, long classPK);
094    
095            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096            public List<AssetTag> getTags(long groupId, long classNameId,
097                    java.lang.String name);
098    
099            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100            public List<AssetTag> getTags(long groupId, long classNameId,
101                    java.lang.String name, int start, int end,
102                    OrderByComparator<AssetTag> obc);
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public List<AssetTag> getTags(long groupId, java.lang.String name,
106                    int start, int end);
107    
108            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109            public List<AssetTag> getTags(long groupId, java.lang.String name,
110                    int start, int end, OrderByComparator<AssetTag> obc);
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public List<AssetTag> getTags(long[] groupIds, java.lang.String name,
114                    int start, int end);
115    
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public List<AssetTag> getTags(long[] groupIds, java.lang.String name,
118                    int start, int end, OrderByComparator<AssetTag> obc);
119    
120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121            public int getTagsCount(long groupId, java.lang.String name);
122    
123            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124            public int getVisibleAssetsTagsCount(long groupId, long classNameId,
125                    java.lang.String name);
126    
127            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128            public int getVisibleAssetsTagsCount(long groupId, java.lang.String name);
129    
130            public void mergeTags(long fromTagId, long toTagId)
131                    throws PortalException;
132    
133            public void mergeTags(long[] fromTagIds, long toTagId)
134                    throws PortalException;
135    
136            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137            public JSONArray search(long groupId, java.lang.String name, int start,
138                    int end);
139    
140            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141            public JSONArray search(long[] groupIds, java.lang.String name, int start,
142                    int end);
143    
144            public AssetTag updateTag(long tagId, java.lang.String name,
145                    ServiceContext serviceContext) throws PortalException;
146    }