001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class TeamServiceUtil {
035
040 public static com.liferay.portal.model.Team addTeam(long groupId,
041 java.lang.String name, java.lang.String description)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 return getService().addTeam(groupId, name, description);
045 }
046
047 public static void deleteTeam(long teamId)
048 throws com.liferay.portal.kernel.exception.PortalException,
049 com.liferay.portal.kernel.exception.SystemException {
050 getService().deleteTeam(teamId);
051 }
052
053 public static java.util.List<com.liferay.portal.model.Team> getGroupTeams(
054 long groupId)
055 throws com.liferay.portal.kernel.exception.PortalException,
056 com.liferay.portal.kernel.exception.SystemException {
057 return getService().getGroupTeams(groupId);
058 }
059
060 public static com.liferay.portal.model.Team getTeam(long teamId)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 return getService().getTeam(teamId);
064 }
065
066 public static com.liferay.portal.model.Team getTeam(long groupId,
067 java.lang.String name)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService().getTeam(groupId, name);
071 }
072
073 public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
074 long userId)
075 throws com.liferay.portal.kernel.exception.PortalException,
076 com.liferay.portal.kernel.exception.SystemException {
077 return getService().getUserTeams(userId);
078 }
079
080 public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
081 long userId, long groupId)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException {
084 return getService().getUserTeams(userId, groupId);
085 }
086
087 public static boolean hasUserTeam(long userId, long teamId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService().hasUserTeam(userId, teamId);
091 }
092
093 public static com.liferay.portal.model.Team updateTeam(long teamId,
094 java.lang.String name, java.lang.String description)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 return getService().updateTeam(teamId, name, description);
098 }
099
100 public static TeamService getService() {
101 if (_service == null) {
102 _service = (TeamService)PortalBeanLocatorUtil.locate(TeamService.class.getName());
103
104 ReferenceRegistry.registerReference(TeamServiceUtil.class,
105 "_service");
106 MethodCache.remove(TeamService.class);
107 }
108
109 return _service;
110 }
111
112 public void setService(TeamService service) {
113 MethodCache.remove(TeamService.class);
114
115 _service = service;
116
117 ReferenceRegistry.registerReference(TeamServiceUtil.class, "_service");
118 MethodCache.remove(TeamService.class);
119 }
120
121 private static TeamService _service;
122 }