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 OrganizationService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see OrganizationService 024 * @generated 025 */ 026 public class OrganizationServiceWrapper implements OrganizationService { 027 public OrganizationServiceWrapper(OrganizationService organizationService) { 028 _organizationService = organizationService; 029 } 030 031 /** 032 * Adds the organizations to the group. 033 * 034 * @param groupId the primary key of the group 035 * @param organizationIds the primary keys of the organizations 036 * @throws PortalException if a group or organization 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 addGroupOrganizations(long groupId, long[] organizationIds) 042 throws com.liferay.portal.kernel.exception.PortalException, 043 com.liferay.portal.kernel.exception.SystemException { 044 _organizationService.addGroupOrganizations(groupId, organizationIds); 045 } 046 047 /** 048 * Adds an organization with additional parameters. 049 * 050 * <p> 051 * This method handles the creation and bookkeeping of the organization 052 * including its resources, metadata, and internal data structures. 053 * </p> 054 * 055 * @param parentOrganizationId the primary key of the organization's parent 056 organization 057 * @param name the organization's name 058 * @param type the organization's type 059 * @param recursable whether the permissions of the organization are to be 060 inherited by its sub-organizations 061 * @param regionId the primary key of the organization's region 062 * @param countryId the primary key of the organization's country 063 * @param statusId the organization's workflow status 064 * @param comments the comments about the organization 065 * @param site whether the organization is to be associated with a main 066 site 067 * @param addresses the organization's addresses 068 * @param emailAddresses the organization's email addresses 069 * @param orgLabors the organization's hours of operation 070 * @param phones the organization's phone numbers 071 * @param websites the organization's websites 072 * @param serviceContext the organization's service context (optionally 073 <code>null</code>). Can specify the organization's asset category 074 IDs, asset tag names, and expando bridge attributes. 075 * @return the organization 076 * @throws PortalException if a parent organization with the primary key 077 could not be found, if the organization's information was 078 invalid, or if the user did not have permission to add the 079 organization 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portal.model.Organization addOrganization( 083 long parentOrganizationId, java.lang.String name, 084 java.lang.String type, boolean recursable, long regionId, 085 long countryId, int statusId, java.lang.String comments, boolean site, 086 java.util.List<com.liferay.portal.model.Address> addresses, 087 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 088 java.util.List<com.liferay.portal.model.OrgLabor> orgLabors, 089 java.util.List<com.liferay.portal.model.Phone> phones, 090 java.util.List<com.liferay.portal.model.Website> websites, 091 com.liferay.portal.service.ServiceContext serviceContext) 092 throws com.liferay.portal.kernel.exception.PortalException, 093 com.liferay.portal.kernel.exception.SystemException { 094 return _organizationService.addOrganization(parentOrganizationId, name, 095 type, recursable, regionId, countryId, statusId, comments, site, 096 addresses, emailAddresses, orgLabors, phones, websites, 097 serviceContext); 098 } 099 100 /** 101 * Adds an organization. 102 * 103 * <p> 104 * This method handles the creation and bookkeeping of the organization 105 * including its resources, metadata, and internal data structures. 106 * </p> 107 * 108 * @param parentOrganizationId the primary key of the organization's parent 109 organization 110 * @param name the organization's name 111 * @param type the organization's type 112 * @param recursable whether the permissions of the organization are to be 113 inherited by its sub-organizations 114 * @param regionId the primary key of the organization's region 115 * @param countryId the primary key of the organization's country 116 * @param statusId the organization's workflow status 117 * @param comments the comments about the organization 118 * @param site whether the organization is to be associated with a main 119 site 120 * @param serviceContext the organization's service context (optionally 121 <code>null</code>). Can specify the organization's asset category 122 IDs, asset tag names, and expando bridge attributes. 123 * @return the organization 124 * @throws PortalException if the parent organization with the primary key 125 could not be found, if the organization information was invalid, 126 or if the user did not have permission to add the organization 127 * @throws SystemException if a system exception occurred 128 */ 129 public com.liferay.portal.model.Organization addOrganization( 130 long parentOrganizationId, java.lang.String name, 131 java.lang.String type, boolean recursable, long regionId, 132 long countryId, int statusId, java.lang.String comments, boolean site, 133 com.liferay.portal.service.ServiceContext serviceContext) 134 throws com.liferay.portal.kernel.exception.PortalException, 135 com.liferay.portal.kernel.exception.SystemException { 136 return _organizationService.addOrganization(parentOrganizationId, name, 137 type, recursable, regionId, countryId, statusId, comments, site, 138 serviceContext); 139 } 140 141 /** 142 * Assigns the password policy to the organizations, removing any other 143 * currently assigned password policies. 144 * 145 * @param passwordPolicyId the primary key of the password policy 146 * @param organizationIds the primary keys of the organizations 147 * @throws PortalException if the user did not have permission to update the 148 password policy 149 * @throws SystemException if a system exception occurred 150 */ 151 public void addPasswordPolicyOrganizations(long passwordPolicyId, 152 long[] organizationIds) 153 throws com.liferay.portal.kernel.exception.PortalException, 154 com.liferay.portal.kernel.exception.SystemException { 155 _organizationService.addPasswordPolicyOrganizations(passwordPolicyId, 156 organizationIds); 157 } 158 159 /** 160 * Deletes the logo of the organization. 161 * 162 * @param organizationId the primary key of the organization 163 * @throws PortalException if an organization with the primary key could not 164 be found, if the organization's logo could not be found, or if 165 the user did not have permission to update the organization 166 * @throws SystemException if a system exception occurred 167 */ 168 public void deleteLogo(long organizationId) 169 throws com.liferay.portal.kernel.exception.PortalException, 170 com.liferay.portal.kernel.exception.SystemException { 171 _organizationService.deleteLogo(organizationId); 172 } 173 174 /** 175 * Deletes the organization. The organization's associated resources and 176 * assets are also deleted. 177 * 178 * @param organizationId the primary key of the organization 179 * @throws PortalException if an organization with the primary key could not 180 be found, if the user did not have permission to delete the 181 organization, if the organization had a workflow in approved 182 status, or if the organization was a parent organization 183 * @throws SystemException if a system exception occurred 184 */ 185 public void deleteOrganization(long organizationId) 186 throws com.liferay.portal.kernel.exception.PortalException, 187 com.liferay.portal.kernel.exception.SystemException { 188 _organizationService.deleteOrganization(organizationId); 189 } 190 191 /** 192 * Returns all the organizations which the user has permission to manage. 193 * 194 * @param actionId the permitted action 195 * @param max the maximum number of the organizations to be considered 196 * @return the organizations which the user has permission to manage 197 * @throws PortalException if a portal exception occurred 198 * @throws SystemException if a system exception occurred 199 * @deprecated Replaced by {@link #getOrganizations(long, long, int, int)} 200 */ 201 public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations( 202 java.lang.String actionId, int max) 203 throws com.liferay.portal.kernel.exception.PortalException, 204 com.liferay.portal.kernel.exception.SystemException { 205 return _organizationService.getManageableOrganizations(actionId, max); 206 } 207 208 /** 209 * Returns the organization with the primary key. 210 * 211 * @param organizationId the primary key of the organization 212 * @return the organization with the primary key 213 * @throws PortalException if an organization with the primary key could not 214 be found or if the user did not have permission to view the 215 organization 216 * @throws SystemException if a system exception occurred 217 */ 218 public com.liferay.portal.model.Organization getOrganization( 219 long organizationId) 220 throws com.liferay.portal.kernel.exception.PortalException, 221 com.liferay.portal.kernel.exception.SystemException { 222 return _organizationService.getOrganization(organizationId); 223 } 224 225 /** 226 * Returns the primary key of the organization with the name. 227 * 228 * @param companyId the primary key of the organization's company 229 * @param name the organization's name 230 * @return the primary key of the organization with the name, or 231 <code>0</code> if the organization could not be found 232 * @throws SystemException if a system exception occurred 233 */ 234 public long getOrganizationId(long companyId, java.lang.String name) 235 throws com.liferay.portal.kernel.exception.SystemException { 236 return _organizationService.getOrganizationId(companyId, name); 237 } 238 239 /** 240 * Returns all the organizations belonging to the parent organization. 241 * 242 * @param companyId the primary key of the organizations' company 243 * @param parentOrganizationId the primary key of the organizations' parent 244 organization 245 * @return the organizations belonging to the parent organization 246 * @throws SystemException if a system exception occurred 247 */ 248 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 249 long companyId, long parentOrganizationId) 250 throws com.liferay.portal.kernel.exception.SystemException { 251 return _organizationService.getOrganizations(companyId, 252 parentOrganizationId); 253 } 254 255 /** 256 * Returns a range of all the organizations belonging to the parent 257 * organization. 258 * 259 * <p> 260 * Useful when paginating results. Returns a maximum of <code>end - 261 * start</code> instances. <code>start</code> and <code>end</code> are not 262 * primary keys, they are indexes in the result set. Thus, <code>0</code> 263 * refers to the first result in the set. Setting both <code>start</code> 264 * and <code>end</code> to {@link 265 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 266 * result set. 267 * </p> 268 * 269 * @param companyId the primary key of the organizations' company 270 * @param parentOrganizationId the primary key of the organizations' parent 271 organization 272 * @param start the lower bound of the range of organizations to return 273 * @param end the upper bound of the range of organizations to return (not 274 inclusive) 275 * @return the range of organizations belonging to the parent organization 276 * @throws SystemException if a system exception occurred 277 */ 278 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 279 long companyId, long parentOrganizationId, int start, int end) 280 throws com.liferay.portal.kernel.exception.SystemException { 281 return _organizationService.getOrganizations(companyId, 282 parentOrganizationId, start, end); 283 } 284 285 /** 286 * Returns the number of organizations belonging to the parent organization. 287 * 288 * @param companyId the primary key of the organizations' company 289 * @param parentOrganizationId the primary key of the organizations' parent 290 organization 291 * @return the number of organizations belonging to the parent organization 292 * @throws SystemException if a system exception occurred 293 */ 294 public int getOrganizationsCount(long companyId, long parentOrganizationId) 295 throws com.liferay.portal.kernel.exception.SystemException { 296 return _organizationService.getOrganizationsCount(companyId, 297 parentOrganizationId); 298 } 299 300 /** 301 * Returns all the organizations associated with the user. 302 * 303 * @param userId the primary key of the user 304 * @return the organizations associated with the user 305 * @throws PortalException if a user with the primary key could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 309 long userId) 310 throws com.liferay.portal.kernel.exception.PortalException, 311 com.liferay.portal.kernel.exception.SystemException { 312 return _organizationService.getUserOrganizations(userId); 313 } 314 315 /** 316 * Returns all the organizations associated with the user, optionally 317 * including the organizations associated with the user groups to which the 318 * user belongs. 319 * 320 * @param userId the primary key of the user 321 * @param inheritUserGroups whether to include organizations associated 322 with the user groups to which the user belongs 323 * @return the organizations associated with the user 324 * @throws PortalException if a user with the primary key could not be found 325 * @throws SystemException if a system exception occurred 326 */ 327 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 328 long userId, boolean inheritUserGroups) 329 throws com.liferay.portal.kernel.exception.PortalException, 330 com.liferay.portal.kernel.exception.SystemException { 331 return _organizationService.getUserOrganizations(userId, 332 inheritUserGroups); 333 } 334 335 /** 336 * Sets the organizations in the group, removing and adding organizations to 337 * the group as necessary. 338 * 339 * @param groupId the primary key of the group 340 * @param organizationIds the primary keys of the organizations 341 * @throws PortalException if a group or organization with the primary key 342 could not be found or if the user did not have permission to 343 assign group members 344 * @throws SystemException if a system exception occurred 345 */ 346 public void setGroupOrganizations(long groupId, long[] organizationIds) 347 throws com.liferay.portal.kernel.exception.PortalException, 348 com.liferay.portal.kernel.exception.SystemException { 349 _organizationService.setGroupOrganizations(groupId, organizationIds); 350 } 351 352 /** 353 * Removes the organizations from the group. 354 * 355 * @param groupId the primary key of the group 356 * @param organizationIds the primary keys of the organizations 357 * @throws PortalException if a group or organization with the primary key 358 could not be found or if the user did not have permission to 359 assign group members 360 * @throws SystemException if a system exception occurred 361 */ 362 public void unsetGroupOrganizations(long groupId, long[] organizationIds) 363 throws com.liferay.portal.kernel.exception.PortalException, 364 com.liferay.portal.kernel.exception.SystemException { 365 _organizationService.unsetGroupOrganizations(groupId, organizationIds); 366 } 367 368 /** 369 * Removes the organizations from the password policy. 370 * 371 * @param passwordPolicyId the primary key of the password policy 372 * @param organizationIds the primary keys of the organizations 373 * @throws PortalException if a password policy or organization with the 374 primary key could not be found, or if the user did not have 375 permission to update the password policy. 376 * @throws SystemException if a system exception occurred 377 */ 378 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 379 long[] organizationIds) 380 throws com.liferay.portal.kernel.exception.PortalException, 381 com.liferay.portal.kernel.exception.SystemException { 382 _organizationService.unsetPasswordPolicyOrganizations(passwordPolicyId, 383 organizationIds); 384 } 385 386 /** 387 * Updates the organization with additional parameters. 388 * 389 * @param organizationId the primary key of the organization 390 * @param parentOrganizationId the primary key of the organization's parent 391 organization 392 * @param name the organization's name 393 * @param type the organization's type 394 * @param recursable whether the permissions of the organization are to be 395 inherited by its sub-organizations 396 * @param regionId the primary key of the organization's region 397 * @param countryId the primary key of the organization's country 398 * @param statusId the organization's workflow status 399 * @param comments the comments about the organization 400 * @param site whether the organization is to be associated with a main 401 site 402 * @param addresses the organization's addresses 403 * @param emailAddresses the organization's email addresses 404 * @param orgLabors the organization's hours of operation 405 * @param phones the organization's phone numbers 406 * @param websites the organization's websites 407 * @param serviceContext the organization's service context (optionally 408 <code>null</code>). Can specify the organization's replacement 409 asset category IDs, replacement asset tag names, and new expando 410 bridge attributes. 411 * @return the organization 412 * @throws PortalException if an organization or parent organization with 413 the primary key could not be found, if the user did not have 414 permission to update the organization information, or if the new 415 information was invalid 416 * @throws SystemException if a system exception occurred 417 */ 418 public com.liferay.portal.model.Organization updateOrganization( 419 long organizationId, long parentOrganizationId, java.lang.String name, 420 java.lang.String type, boolean recursable, long regionId, 421 long countryId, int statusId, java.lang.String comments, boolean site, 422 java.util.List<com.liferay.portal.model.Address> addresses, 423 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 424 java.util.List<com.liferay.portal.model.OrgLabor> orgLabors, 425 java.util.List<com.liferay.portal.model.Phone> phones, 426 java.util.List<com.liferay.portal.model.Website> websites, 427 com.liferay.portal.service.ServiceContext serviceContext) 428 throws com.liferay.portal.kernel.exception.PortalException, 429 com.liferay.portal.kernel.exception.SystemException { 430 return _organizationService.updateOrganization(organizationId, 431 parentOrganizationId, name, type, recursable, regionId, countryId, 432 statusId, comments, site, addresses, emailAddresses, orgLabors, 433 phones, websites, serviceContext); 434 } 435 436 /** 437 * Updates the organization. 438 * 439 * @param organizationId the primary key of the organization 440 * @param parentOrganizationId the primary key of the organization's parent 441 organization 442 * @param name the organization's name 443 * @param type the organization's type 444 * @param recursable whether permissions of the organization are to be 445 inherited by its sub-organizations 446 * @param regionId the primary key of the organization's region 447 * @param countryId the primary key of the organization's country 448 * @param statusId the organization's workflow status 449 * @param comments the comments about the organization 450 * @param site whether the organization is to be associated with a main 451 site 452 * @param serviceContext the organization's service context (optionally 453 <code>null</code>). Can specify the organization's replacement 454 asset category IDs, replacement asset tag names, and new expando 455 bridge attributes. 456 * @return the organization 457 * @throws PortalException if an organization or parent organization with 458 the primary key could not be found, if the user did not have 459 permission to update the organization, or if the new information 460 was invalid 461 * @throws SystemException if a system exception occurred 462 */ 463 public com.liferay.portal.model.Organization updateOrganization( 464 long organizationId, long parentOrganizationId, java.lang.String name, 465 java.lang.String type, boolean recursable, long regionId, 466 long countryId, int statusId, java.lang.String comments, boolean site, 467 com.liferay.portal.service.ServiceContext serviceContext) 468 throws com.liferay.portal.kernel.exception.PortalException, 469 com.liferay.portal.kernel.exception.SystemException { 470 return _organizationService.updateOrganization(organizationId, 471 parentOrganizationId, name, type, recursable, regionId, countryId, 472 statusId, comments, site, serviceContext); 473 } 474 475 public OrganizationService getWrappedOrganizationService() { 476 return _organizationService; 477 } 478 479 public void setWrappedOrganizationService( 480 OrganizationService organizationService) { 481 _organizationService = organizationService; 482 } 483 484 private OrganizationService _organizationService; 485 }