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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
055            public boolean hasUserTeam(long userId, long teamId)
056                    throws PortalException;
057    
058            /**
059            * @deprecated As of 7.0.0, replaced by {@link #addTeam(long, String,
060            String, ServiceContext)}
061            */
062            @java.lang.Deprecated
063            public Team addTeam(long groupId, java.lang.String name,
064                    java.lang.String description) throws PortalException;
065    
066            public Team addTeam(long groupId, java.lang.String name,
067                    java.lang.String description, ServiceContext serviceContext)
068                    throws PortalException;
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public Team getTeam(long groupId, java.lang.String name)
072                    throws PortalException;
073    
074            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075            public Team getTeam(long teamId) throws PortalException;
076    
077            public Team updateTeam(long teamId, java.lang.String name,
078                    java.lang.String description) throws PortalException;
079    
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public int searchCount(long groupId, java.lang.String name,
082                    java.lang.String description,
083                    LinkedHashMap<java.lang.String, java.lang.Object> params);
084    
085            /**
086            * Returns the OSGi service identifier.
087            *
088            * @return the OSGi service identifier
089            */
090            public java.lang.String getOSGiServiceIdentifier();
091    
092            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
093            public List<Team> getGroupTeams(long groupId) throws PortalException;
094    
095            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096            public List<Team> getUserTeams(long userId) throws PortalException;
097    
098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099            public List<Team> getUserTeams(long userId, long groupId)
100                    throws PortalException;
101    
102            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103            public List<Team> search(long groupId, java.lang.String name,
104                    java.lang.String description,
105                    LinkedHashMap<java.lang.String, java.lang.Object> params, int start,
106                    int end, OrderByComparator<Team> obc);
107    
108            public void deleteTeam(long teamId) throws PortalException;
109    }