001    /**
002     * Copyright (c) 2000-2013 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.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * Provides the remote service utility for Team. This utility wraps
022     * {@link com.liferay.portal.service.impl.TeamServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on a remote server. Methods of this service are expected to have security
025     * checks based on the propagated JAAS credentials because this service can be
026     * accessed remotely.
027     *
028     * @author Brian Wing Shun Chan
029     * @see TeamService
030     * @see com.liferay.portal.service.base.TeamServiceBaseImpl
031     * @see com.liferay.portal.service.impl.TeamServiceImpl
032     * @generated
033     */
034    public class TeamServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.TeamServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Returns the Spring bean ID for this bean.
043            *
044            * @return the Spring bean ID for this bean
045            */
046            public static java.lang.String getBeanIdentifier() {
047                    return getService().getBeanIdentifier();
048            }
049    
050            /**
051            * Sets the Spring bean ID for this bean.
052            *
053            * @param beanIdentifier the Spring bean ID for this bean
054            */
055            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056                    getService().setBeanIdentifier(beanIdentifier);
057            }
058    
059            public static com.liferay.portal.model.Team addTeam(long groupId,
060                    java.lang.String name, java.lang.String description)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    return getService().addTeam(groupId, name, description);
064            }
065    
066            public static void deleteTeam(long teamId)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    getService().deleteTeam(teamId);
070            }
071    
072            public static java.util.List<com.liferay.portal.model.Team> getGroupTeams(
073                    long groupId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getGroupTeams(groupId);
077            }
078    
079            public static com.liferay.portal.model.Team getTeam(long teamId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService().getTeam(teamId);
083            }
084    
085            public static com.liferay.portal.model.Team getTeam(long groupId,
086                    java.lang.String name)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService().getTeam(groupId, name);
090            }
091    
092            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
093                    long userId)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getUserTeams(userId);
097            }
098    
099            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
100                    long userId, long groupId)
101                    throws com.liferay.portal.kernel.exception.PortalException,
102                            com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getUserTeams(userId, groupId);
104            }
105    
106            public static boolean hasUserTeam(long userId, long teamId)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService().hasUserTeam(userId, teamId);
110            }
111    
112            public static com.liferay.portal.model.Team updateTeam(long teamId,
113                    java.lang.String name, java.lang.String description)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService().updateTeam(teamId, name, description);
117            }
118    
119            public static TeamService getService() {
120                    if (_service == null) {
121                            _service = (TeamService)PortalBeanLocatorUtil.locate(TeamService.class.getName());
122    
123                            ReferenceRegistry.registerReference(TeamServiceUtil.class,
124                                    "_service");
125                    }
126    
127                    return _service;
128            }
129    
130            /**
131             * @deprecated As of 6.2.0
132             */
133            public void setService(TeamService service) {
134            }
135    
136            private static TeamService _service;
137    }