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.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 /** 020 * Provides a wrapper for {@link UserGroupService}. 021 * 022 * @author Brian Wing Shun Chan 023 * @see UserGroupService 024 * @generated 025 */ 026 @ProviderType 027 public class UserGroupServiceWrapper implements UserGroupService, 028 ServiceWrapper<UserGroupService> { 029 public UserGroupServiceWrapper(UserGroupService userGroupService) { 030 _userGroupService = userGroupService; 031 } 032 033 /** 034 * Adds the user groups to the group. 035 * 036 * @param groupId the primary key of the group 037 * @param userGroupIds the primary keys of the user groups 038 * @throws PortalException if the user did not have permission to assign 039 group members 040 */ 041 @Override 042 public void addGroupUserGroups(long groupId, long[] userGroupIds) 043 throws com.liferay.portal.kernel.exception.PortalException { 044 _userGroupService.addGroupUserGroups(groupId, userGroupIds); 045 } 046 047 /** 048 * Adds the user groups to the team 049 * 050 * @param teamId the primary key of the team 051 * @param userGroupIds the primary keys of the user groups 052 * @throws PortalException if the user did not have permission to assign 053 team members 054 */ 055 @Override 056 public void addTeamUserGroups(long teamId, long[] userGroupIds) 057 throws com.liferay.portal.kernel.exception.PortalException { 058 _userGroupService.addTeamUserGroups(teamId, userGroupIds); 059 } 060 061 /** 062 * Adds a user group. 063 * 064 * <p> 065 * This method handles the creation and bookkeeping of the user group, 066 * including its resources, metadata, and internal data structures. 067 * </p> 068 * 069 * @param name the user group's name 070 * @param description the user group's description 071 * @return the user group 072 * @throws PortalException if the user group's information was invalid 073 or if the user did not have permission to add the user group 074 * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(String, String, 075 ServiceContext)} 076 */ 077 @Deprecated 078 @Override 079 public com.liferay.portal.model.UserGroup addUserGroup( 080 java.lang.String name, java.lang.String description) 081 throws com.liferay.portal.kernel.exception.PortalException { 082 return _userGroupService.addUserGroup(name, description); 083 } 084 085 /** 086 * Adds a user group. 087 * 088 * <p> 089 * This method handles the creation and bookkeeping of the user group, 090 * including its resources, metadata, and internal data structures. 091 * </p> 092 * 093 * @param name the user group's name 094 * @param description the user group's description 095 * @param serviceContext the service context to be applied (optionally 096 <code>null</code>). Can set expando bridge attributes for the 097 user group. 098 * @return the user group 099 * @throws PortalException if the user group's information was invalid or if 100 the user did not have permission to add the user group 101 */ 102 @Override 103 public com.liferay.portal.model.UserGroup addUserGroup( 104 java.lang.String name, java.lang.String description, 105 com.liferay.portal.service.ServiceContext serviceContext) 106 throws com.liferay.portal.kernel.exception.PortalException { 107 return _userGroupService.addUserGroup(name, description, serviceContext); 108 } 109 110 /** 111 * Deletes the user group. 112 * 113 * @param userGroupId the primary key of the user group 114 * @throws PortalException if a user group with the primary key could not be 115 found, if the user did not have permission to delete the user 116 group, or if the user group had a workflow in approved status 117 */ 118 @Override 119 public void deleteUserGroup(long userGroupId) 120 throws com.liferay.portal.kernel.exception.PortalException { 121 _userGroupService.deleteUserGroup(userGroupId); 122 } 123 124 /** 125 * Fetches the user group with the primary key. 126 * 127 * @param userGroupId the primary key of the user group 128 * @return the user group with the primary key 129 * @throws PortalException if the user did not have permission to view the 130 user group 131 */ 132 @Override 133 public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId) 134 throws com.liferay.portal.kernel.exception.PortalException { 135 return _userGroupService.fetchUserGroup(userGroupId); 136 } 137 138 /** 139 * Returns the Spring bean ID for this bean. 140 * 141 * @return the Spring bean ID for this bean 142 */ 143 @Override 144 public java.lang.String getBeanIdentifier() { 145 return _userGroupService.getBeanIdentifier(); 146 } 147 148 /** 149 * Returns the user group with the name. 150 * 151 * @param name the user group's name 152 * @return the user group with the name 153 * @throws PortalException if a user group with the name could not be found 154 or if the user did not have permission to view the user group 155 */ 156 @Override 157 public com.liferay.portal.model.UserGroup getUserGroup( 158 java.lang.String name) 159 throws com.liferay.portal.kernel.exception.PortalException { 160 return _userGroupService.getUserGroup(name); 161 } 162 163 /** 164 * Returns the user group with the primary key. 165 * 166 * @param userGroupId the primary key of the user group 167 * @return the user group with the primary key 168 * @throws PortalException if a user group with the primary key could not be 169 found or if the user did not have permission to view the user 170 group 171 */ 172 @Override 173 public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId) 174 throws com.liferay.portal.kernel.exception.PortalException { 175 return _userGroupService.getUserGroup(userGroupId); 176 } 177 178 @Override 179 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 180 long companyId) 181 throws com.liferay.portal.kernel.exception.PortalException { 182 return _userGroupService.getUserGroups(companyId); 183 } 184 185 /** 186 * Returns all the user groups to which the user belongs. 187 * 188 * @param userId the primary key of the user 189 * @return the user groups to which the user belongs 190 * @throws PortalException if the current user did not have permission to 191 view the user or any one of the user group members 192 */ 193 @Override 194 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 195 long userId) throws com.liferay.portal.kernel.exception.PortalException { 196 return _userGroupService.getUserUserGroups(userId); 197 } 198 199 /** 200 * Sets the Spring bean ID for this bean. 201 * 202 * @param beanIdentifier the Spring bean ID for this bean 203 */ 204 @Override 205 public void setBeanIdentifier(java.lang.String beanIdentifier) { 206 _userGroupService.setBeanIdentifier(beanIdentifier); 207 } 208 209 /** 210 * Removes the user groups from the group. 211 * 212 * @param groupId the primary key of the group 213 * @param userGroupIds the primary keys of the user groups 214 * @throws PortalException if the user did not have permission to assign 215 group members 216 */ 217 @Override 218 public void unsetGroupUserGroups(long groupId, long[] userGroupIds) 219 throws com.liferay.portal.kernel.exception.PortalException { 220 _userGroupService.unsetGroupUserGroups(groupId, userGroupIds); 221 } 222 223 /** 224 * Removes the user groups from the team. 225 * 226 * @param teamId the primary key of the team 227 * @param userGroupIds the primary keys of the user groups 228 * @throws PortalException if the user did not have permission to assign 229 team members 230 */ 231 @Override 232 public void unsetTeamUserGroups(long teamId, long[] userGroupIds) 233 throws com.liferay.portal.kernel.exception.PortalException { 234 _userGroupService.unsetTeamUserGroups(teamId, userGroupIds); 235 } 236 237 /** 238 * Updates the user group. 239 * 240 * @param userGroupId the primary key of the user group 241 * @param name the user group's name 242 * @param description the the user group's description 243 * @return the user group 244 * @throws PortalException if a user group with the primary key was not 245 found, if the new information was invalid, or if the user did 246 not have permission to update the user group information 247 * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, 248 String, String, ServiceContext)} 249 */ 250 @Deprecated 251 @Override 252 public com.liferay.portal.model.UserGroup updateUserGroup( 253 long userGroupId, java.lang.String name, java.lang.String description) 254 throws com.liferay.portal.kernel.exception.PortalException { 255 return _userGroupService.updateUserGroup(userGroupId, name, description); 256 } 257 258 /** 259 * Updates the user group. 260 * 261 * @param userGroupId the primary key of the user group 262 * @param name the user group's name 263 * @param description the the user group's description 264 * @param serviceContext the service context to be applied (optionally 265 <code>null</code>). Can set expando bridge attributes for the 266 user group. 267 * @return the user group 268 * @throws PortalException if a user group with the primary key was not 269 found, if the new information was invalid, or if the user did not 270 have permission to update the user group information 271 */ 272 @Override 273 public com.liferay.portal.model.UserGroup updateUserGroup( 274 long userGroupId, java.lang.String name, java.lang.String description, 275 com.liferay.portal.service.ServiceContext serviceContext) 276 throws com.liferay.portal.kernel.exception.PortalException { 277 return _userGroupService.updateUserGroup(userGroupId, name, 278 description, serviceContext); 279 } 280 281 /** 282 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 283 */ 284 @Deprecated 285 public UserGroupService getWrappedUserGroupService() { 286 return _userGroupService; 287 } 288 289 /** 290 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 291 */ 292 @Deprecated 293 public void setWrappedUserGroupService(UserGroupService userGroupService) { 294 _userGroupService = userGroupService; 295 } 296 297 @Override 298 public UserGroupService getWrappedService() { 299 return _userGroupService; 300 } 301 302 @Override 303 public void setWrappedService(UserGroupService userGroupService) { 304 _userGroupService = userGroupService; 305 } 306 307 private UserGroupService _userGroupService; 308 }