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.portal.kernel.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.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.model.Team;
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    
029    import java.util.LinkedHashMap;
030    import java.util.List;
031    
032    /**
033     * Provides the remote service interface for Team. Methods of this
034     * service are expected to have security checks based on the propagated JAAS
035     * credentials because this service can be accessed remotely.
036     *
037     * @author Brian Wing Shun Chan
038     * @see TeamServiceUtil
039     * @see com.liferay.portal.service.base.TeamServiceBaseImpl
040     * @see com.liferay.portal.service.impl.TeamServiceImpl
041     * @generated
042     */
043    @AccessControlled
044    @JSONWebService
045    @ProviderType
046    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
047            PortalException.class, SystemException.class})
048    public interface TeamService extends BaseService {
049            /*
050             * NOTE FOR DEVELOPERS:
051             *
052             * Never modify or reference this interface directly. Always use {@link TeamServiceUtil} to access the team remote service. Add custom service methods to {@link com.liferay.portal.service.impl.TeamServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
053             */
054    
055            /**
056            * @deprecated As of 7.0.0, replaced by {@link #addTeam(long, String,
057            String, ServiceContext)}
058            */
059            @java.lang.Deprecated
060            public Team addTeam(long groupId, java.lang.String name,
061                    java.lang.String description) throws PortalException;
062    
063            public Team addTeam(long groupId, java.lang.String name,
064                    java.lang.String description,
065                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
066                    throws PortalException;
067    
068            public void deleteTeam(long teamId) throws PortalException;
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public List<Team> getGroupTeams(long groupId) throws PortalException;
072    
073            /**
074            * Returns the OSGi service identifier.
075            *
076            * @return the OSGi service identifier
077            */
078            public java.lang.String getOSGiServiceIdentifier();
079    
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public Team getTeam(long groupId, java.lang.String name)
082                    throws PortalException;
083    
084            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085            public Team getTeam(long teamId) throws PortalException;
086    
087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088            public List<Team> getUserTeams(long userId) throws PortalException;
089    
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public List<Team> getUserTeams(long userId, long groupId)
092                    throws PortalException;
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public boolean hasUserTeam(long userId, long teamId)
096                    throws PortalException;
097    
098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099            public List<Team> search(long groupId, java.lang.String name,
100                    java.lang.String description,
101                    LinkedHashMap<java.lang.String, java.lang.Object> params, int start,
102                    int end, OrderByComparator<Team> obc);
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public int searchCount(long groupId, java.lang.String name,
106                    java.lang.String description,
107                    LinkedHashMap<java.lang.String, java.lang.Object> params);
108    
109            public Team updateTeam(long teamId, java.lang.String name,
110                    java.lang.String description) throws PortalException;
111    }