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