001 /** 002 * Copyright (c) 2000-2011 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 /** 018 * <p> 019 * This class is a wrapper for {@link UserGroupService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see UserGroupService 024 * @generated 025 */ 026 public class UserGroupServiceWrapper implements UserGroupService { 027 public UserGroupServiceWrapper(UserGroupService userGroupService) { 028 _userGroupService = userGroupService; 029 } 030 031 /** 032 * Adds the user groups to the group. 033 * 034 * @param groupId the primary key of the group 035 * @param userGroupIds the primary keys of the user groups 036 * @throws PortalException if a group or user group with the primary key 037 could not be found, or if the user did not have permission to 038 assign group members 039 * @throws SystemException if a system exception occurred 040 */ 041 public void addGroupUserGroups(long groupId, long[] userGroupIds) 042 throws com.liferay.portal.kernel.exception.PortalException, 043 com.liferay.portal.kernel.exception.SystemException { 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 a team or user group with the primary key 053 could not be found, or if the user did not have permission to 054 assign team members 055 * @throws SystemException if a system exception occurred 056 */ 057 public void addTeamUserGroups(long teamId, long[] userGroupIds) 058 throws com.liferay.portal.kernel.exception.PortalException, 059 com.liferay.portal.kernel.exception.SystemException { 060 _userGroupService.addTeamUserGroups(teamId, userGroupIds); 061 } 062 063 /** 064 * Adds a user group. 065 * 066 * <p> 067 * This method handles the creation and bookkeeping of the user group, 068 * including its resources, metadata, and internal data structures. 069 * </p> 070 * 071 * @param name the user group's name 072 * @param description the user group's description 073 * @param publicLayoutSetPrototypeId the primary key of the user group's 074 public layout set 075 * @param privateLayoutSetPrototypeId the primary key of the user group's 076 private layout set 077 * @return the user group 078 * @throws PortalException if the user group's information was invalid or 079 if the user did not have permission to add the user group 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portal.model.UserGroup addUserGroup( 083 java.lang.String name, java.lang.String description, 084 long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId) 085 throws com.liferay.portal.kernel.exception.PortalException, 086 com.liferay.portal.kernel.exception.SystemException { 087 return _userGroupService.addUserGroup(name, description, 088 publicLayoutSetPrototypeId, privateLayoutSetPrototypeId); 089 } 090 091 /** 092 * Deletes the user group. 093 * 094 * @param userGroupId the primary key of the user group 095 * @throws PortalException if a user group with the primary key could not 096 be found, if the user did not have permission to delete the user 097 group, or if the user group had a workflow in approved status 098 * @throws SystemException if a system exception occurred 099 */ 100 public void deleteUserGroup(long userGroupId) 101 throws com.liferay.portal.kernel.exception.PortalException, 102 com.liferay.portal.kernel.exception.SystemException { 103 _userGroupService.deleteUserGroup(userGroupId); 104 } 105 106 /** 107 * Returns the user group with the primary key. 108 * 109 * @param userGroupId the primary key of the user group 110 * @return Returns the user group with the primary key 111 * @throws PortalException if a user group with the primary key could not 112 be found or if the user did not have permission to view the user 113 group 114 * @throws SystemException if a system exception occurred 115 */ 116 public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId) 117 throws com.liferay.portal.kernel.exception.PortalException, 118 com.liferay.portal.kernel.exception.SystemException { 119 return _userGroupService.getUserGroup(userGroupId); 120 } 121 122 /** 123 * Returns the user group with the name. 124 * 125 * @param name the user group's name 126 * @return Returns the user group with the name 127 * @throws PortalException if a user group with the name could not be found 128 or if the user did not have permission to view the user group 129 * @throws SystemException if a system exception occurred 130 */ 131 public com.liferay.portal.model.UserGroup getUserGroup( 132 java.lang.String name) 133 throws com.liferay.portal.kernel.exception.PortalException, 134 com.liferay.portal.kernel.exception.SystemException { 135 return _userGroupService.getUserGroup(name); 136 } 137 138 /** 139 * Returns all the user groups to which the user belongs. 140 * 141 * @param userId the primary key of the user 142 * @return the user groups to which the user belongs 143 * @throws SystemException if a system exception occurred 144 */ 145 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 146 long userId) throws com.liferay.portal.kernel.exception.SystemException { 147 return _userGroupService.getUserUserGroups(userId); 148 } 149 150 /** 151 * Removes the user groups from the group. 152 * 153 * @param groupId the primary key of the group 154 * @param userGroupIds the primary keys of the user groups 155 * @throws PortalException if the user did not have permission to assign 156 group members 157 * @throws SystemException if a system exception occurred 158 */ 159 public void unsetGroupUserGroups(long groupId, long[] userGroupIds) 160 throws com.liferay.portal.kernel.exception.PortalException, 161 com.liferay.portal.kernel.exception.SystemException { 162 _userGroupService.unsetGroupUserGroups(groupId, userGroupIds); 163 } 164 165 /** 166 * Removes the user groups from the team. 167 * 168 * @param teamId the primary key of the team 169 * @param userGroupIds the primary keys of the user groups 170 * @throws PortalException if the user did not have permission to assign 171 team members 172 * @throws SystemException if a system exception occurred 173 */ 174 public void unsetTeamUserGroups(long teamId, long[] userGroupIds) 175 throws com.liferay.portal.kernel.exception.PortalException, 176 com.liferay.portal.kernel.exception.SystemException { 177 _userGroupService.unsetTeamUserGroups(teamId, userGroupIds); 178 } 179 180 /** 181 * Updates the user group. 182 * 183 * @param userGroupId the primary key of the user group 184 * @param name the user group's name 185 * @param description the the user group's description 186 * @param publicLayoutSetPrototypeId the primary key of the user group's 187 public layout set 188 * @param privateLayoutSetPrototypeId the primary key of the user group's 189 private layout set 190 * @return the user group 191 * @throws PortalException if a user group with the primary key was not 192 found, if the new information was invalid, or if the user did 193 not have permission to update the user group information 194 * @throws SystemException if a system exception occurred 195 */ 196 public com.liferay.portal.model.UserGroup updateUserGroup( 197 long userGroupId, java.lang.String name, java.lang.String description, 198 long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId) 199 throws com.liferay.portal.kernel.exception.PortalException, 200 com.liferay.portal.kernel.exception.SystemException { 201 return _userGroupService.updateUserGroup(userGroupId, name, 202 description, publicLayoutSetPrototypeId, privateLayoutSetPrototypeId); 203 } 204 205 public UserGroupService getWrappedUserGroupService() { 206 return _userGroupService; 207 } 208 209 public void setWrappedUserGroupService(UserGroupService userGroupService) { 210 _userGroupService = userGroupService; 211 } 212 213 private UserGroupService _userGroupService; 214 }