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.AssetTag;
020    import com.liferay.asset.kernel.model.AssetTagDisplay;
021    
022    import com.liferay.portal.kernel.exception.PortalException;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.kernel.json.JSONArray;
025    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
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    
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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
062            public AssetTag getTag(long tagId) throws PortalException;
063    
064            public AssetTag updateTag(long tagId, java.lang.String name,
065                    ServiceContext serviceContext) throws PortalException;
066    
067            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
068            public AssetTagDisplay getGroupTagsDisplay(long groupId,
069                    java.lang.String name, int start, int end);
070    
071            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072            public JSONArray search(long groupId, java.lang.String name, int start,
073                    int end);
074    
075            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076            public JSONArray search(long[] groupIds, java.lang.String name, int start,
077                    int end);
078    
079            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080            public int getGroupTagsCount(long groupId);
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public int getTagsCount(long groupId, java.lang.String name);
084    
085            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086            public int getVisibleAssetsTagsCount(long groupId, java.lang.String name);
087    
088            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
089            public int getVisibleAssetsTagsCount(long groupId, long classNameId,
090                    java.lang.String name);
091    
092            /**
093            * Returns the OSGi service identifier.
094            *
095            * @return the OSGi service identifier
096            */
097            public java.lang.String getOSGiServiceIdentifier();
098    
099            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100            public List<AssetTag> getGroupTags(long groupId);
101    
102            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103            public List<AssetTag> getGroupTags(long groupId, int start, int end,
104                    OrderByComparator<AssetTag> obc);
105    
106            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107            public List<AssetTag> getGroupsTags(long[] groupIds);
108    
109            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110            public List<AssetTag> getTags(java.lang.String className, long classPK);
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public List<AssetTag> getTags(long groupId, java.lang.String name,
114                    int start, int end);
115    
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public List<AssetTag> getTags(long groupId, java.lang.String name,
118                    int start, int end, OrderByComparator<AssetTag> obc);
119    
120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121            public List<AssetTag> getTags(long groupId, long classNameId,
122                    java.lang.String name);
123    
124            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125            public List<AssetTag> getTags(long groupId, long classNameId,
126                    java.lang.String name, int start, int end,
127                    OrderByComparator<AssetTag> obc);
128    
129            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130            public List<AssetTag> getTags(long[] groupIds, java.lang.String name,
131                    int start, int end);
132    
133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134            public List<AssetTag> getTags(long[] groupIds, java.lang.String name,
135                    int start, int end, OrderByComparator<AssetTag> obc);
136    
137            public void deleteTag(long tagId) throws PortalException;
138    
139            public void deleteTags(long[] tagIds) throws PortalException;
140    
141            public void mergeTags(long fromTagId, long toTagId)
142                    throws PortalException;
143    
144            public void mergeTags(long[] fromTagIds, long toTagId)
145                    throws PortalException;
146    }