001 /** 002 * Copyright (c) 2000-2012 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 * Returns the Spring bean ID for this bean. 034 * 035 * @return the Spring bean ID for this bean 036 */ 037 public java.lang.String getBeanIdentifier() { 038 return _organizationService.getBeanIdentifier(); 039 } 040 041 /** 042 * Sets the Spring bean ID for this bean. 043 * 044 * @param beanIdentifier the Spring bean ID for this bean 045 */ 046 public void setBeanIdentifier(java.lang.String beanIdentifier) { 047 _organizationService.setBeanIdentifier(beanIdentifier); 048 } 049 050 /** 051 * Adds the organizations to the group. 052 * 053 * @param groupId the primary key of the group 054 * @param organizationIds the primary keys of the organizations 055 * @throws PortalException if a group or organization with the primary key 056 could not be found or if the user did not have permission to 057 assign group members 058 * @throws SystemException if a system exception occurred 059 */ 060 public void addGroupOrganizations(long groupId, long[] organizationIds) 061 throws com.liferay.portal.kernel.exception.PortalException, 062 com.liferay.portal.kernel.exception.SystemException { 063 _organizationService.addGroupOrganizations(groupId, organizationIds); 064 } 065 066 /** 067 * Adds an organization with additional parameters. 068 * 069 * <p> 070 * This method handles the creation and bookkeeping of the organization 071 * including its resources, metadata, and internal data structures. 072 * </p> 073 * 074 * @param parentOrganizationId the primary key of the organization's parent 075 organization 076 * @param name the organization's name 077 * @param type the organization's type 078 * @param recursable whether the permissions of the organization are to be 079 inherited by its sub-organizations 080 * @param regionId the primary key of the organization's region 081 * @param countryId the primary key of the organization's country 082 * @param statusId the organization's workflow status 083 * @param comments the comments about the organization 084 * @param site whether the organization is to be associated with a main 085 site 086 * @param addresses the organization's addresses 087 * @param emailAddresses the organization's email addresses 088 * @param orgLabors the organization's hours of operation 089 * @param phones the organization's phone numbers 090 * @param websites the organization's websites 091 * @param serviceContext the organization's service context (optionally 092 <code>null</code>). Can set asset category IDs, asset tag names, 093 and expando bridge attributes for the organization. 094 * @return the organization 095 * @throws PortalException if a parent organization with the primary key 096 could not be found, if the organization's information was 097 invalid, or if the user did not have permission to add the 098 organization 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portal.model.Organization addOrganization( 102 long parentOrganizationId, java.lang.String name, 103 java.lang.String type, boolean recursable, long regionId, 104 long countryId, int statusId, java.lang.String comments, boolean site, 105 java.util.List<com.liferay.portal.model.Address> addresses, 106 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 107 java.util.List<com.liferay.portal.model.OrgLabor> orgLabors, 108 java.util.List<com.liferay.portal.model.Phone> phones, 109 java.util.List<com.liferay.portal.model.Website> websites, 110 com.liferay.portal.service.ServiceContext serviceContext) 111 throws com.liferay.portal.kernel.exception.PortalException, 112 com.liferay.portal.kernel.exception.SystemException { 113 return _organizationService.addOrganization(parentOrganizationId, name, 114 type, recursable, regionId, countryId, statusId, comments, site, 115 addresses, emailAddresses, orgLabors, phones, websites, 116 serviceContext); 117 } 118 119 /** 120 * Adds an organization. 121 * 122 * <p> 123 * This method handles the creation and bookkeeping of the organization 124 * including its resources, metadata, and internal data structures. 125 * </p> 126 * 127 * @param parentOrganizationId the primary key of the organization's parent 128 organization 129 * @param name the organization's name 130 * @param type the organization's type 131 * @param recursable whether the permissions of the organization are to be 132 inherited by its sub-organizations 133 * @param regionId the primary key of the organization's region 134 * @param countryId the primary key of the organization's country 135 * @param statusId the organization's workflow status 136 * @param comments the comments about the organization 137 * @param site whether the organization is to be associated with a main 138 site 139 * @param serviceContext the organization's service context (optionally 140 <code>null</code>). Can set asset category IDs, asset tag names, 141 and expando bridge attributes for the organization. 142 * @return the organization 143 * @throws PortalException if the parent organization with the primary key 144 could not be found, if the organization information was invalid, 145 or if the user did not have permission to add the organization 146 * @throws SystemException if a system exception occurred 147 */ 148 public com.liferay.portal.model.Organization addOrganization( 149 long parentOrganizationId, java.lang.String name, 150 java.lang.String type, boolean recursable, long regionId, 151 long countryId, int statusId, java.lang.String comments, boolean site, 152 com.liferay.portal.service.ServiceContext serviceContext) 153 throws com.liferay.portal.kernel.exception.PortalException, 154 com.liferay.portal.kernel.exception.SystemException { 155 return _organizationService.addOrganization(parentOrganizationId, name, 156 type, recursable, regionId, countryId, statusId, comments, site, 157 serviceContext); 158 } 159 160 /** 161 * Assigns the password policy to the organizations, removing any other 162 * currently assigned password policies. 163 * 164 * @param passwordPolicyId the primary key of the password policy 165 * @param organizationIds the primary keys of the organizations 166 * @throws PortalException if the user did not have permission to update the 167 password policy 168 * @throws SystemException if a system exception occurred 169 */ 170 public void addPasswordPolicyOrganizations(long passwordPolicyId, 171 long[] organizationIds) 172 throws com.liferay.portal.kernel.exception.PortalException, 173 com.liferay.portal.kernel.exception.SystemException { 174 _organizationService.addPasswordPolicyOrganizations(passwordPolicyId, 175 organizationIds); 176 } 177 178 /** 179 * Deletes the logo of the organization. 180 * 181 * @param organizationId the primary key of the organization 182 * @throws PortalException if an organization with the primary key could not 183 be found, if the organization's logo could not be found, or if 184 the user did not have permission to update the organization 185 * @throws SystemException if a system exception occurred 186 */ 187 public void deleteLogo(long organizationId) 188 throws com.liferay.portal.kernel.exception.PortalException, 189 com.liferay.portal.kernel.exception.SystemException { 190 _organizationService.deleteLogo(organizationId); 191 } 192 193 /** 194 * Deletes the organization. The organization's associated resources and 195 * assets are also deleted. 196 * 197 * @param organizationId the primary key of the organization 198 * @throws PortalException if an organization with the primary key could not 199 be found, if the user did not have permission to delete the 200 organization, if the organization had a workflow in approved 201 status, or if the organization was a parent organization 202 * @throws SystemException if a system exception occurred 203 */ 204 public void deleteOrganization(long organizationId) 205 throws com.liferay.portal.kernel.exception.PortalException, 206 com.liferay.portal.kernel.exception.SystemException { 207 _organizationService.deleteOrganization(organizationId); 208 } 209 210 /** 211 * Returns all the organizations which the user has permission to manage. 212 * 213 * @param actionId the permitted action 214 * @param max the maximum number of the organizations to be considered 215 * @return the organizations which the user has permission to manage 216 * @throws PortalException if a portal exception occurred 217 * @throws SystemException if a system exception occurred 218 * @deprecated Replaced by {@link #getOrganizations(long, long, int, int)} 219 */ 220 public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations( 221 java.lang.String actionId, int max) 222 throws com.liferay.portal.kernel.exception.PortalException, 223 com.liferay.portal.kernel.exception.SystemException { 224 return _organizationService.getManageableOrganizations(actionId, max); 225 } 226 227 /** 228 * Returns the organization with the primary key. 229 * 230 * @param organizationId the primary key of the organization 231 * @return the organization with the primary key 232 * @throws PortalException if an organization with the primary key could not 233 be found or if the user did not have permission to view the 234 organization 235 * @throws SystemException if a system exception occurred 236 */ 237 public com.liferay.portal.model.Organization getOrganization( 238 long organizationId) 239 throws com.liferay.portal.kernel.exception.PortalException, 240 com.liferay.portal.kernel.exception.SystemException { 241 return _organizationService.getOrganization(organizationId); 242 } 243 244 /** 245 * Returns the primary key of the organization with the name. 246 * 247 * @param companyId the primary key of the organization's company 248 * @param name the organization's name 249 * @return the primary key of the organization with the name, or 250 <code>0</code> if the organization could not be found 251 * @throws SystemException if a system exception occurred 252 */ 253 public long getOrganizationId(long companyId, java.lang.String name) 254 throws com.liferay.portal.kernel.exception.PortalException, 255 com.liferay.portal.kernel.exception.SystemException { 256 return _organizationService.getOrganizationId(companyId, name); 257 } 258 259 /** 260 * Returns all the organizations belonging to the parent organization. 261 * 262 * @param companyId the primary key of the organizations' company 263 * @param parentOrganizationId the primary key of the organizations' parent 264 organization 265 * @return the organizations belonging to the parent organization 266 * @throws SystemException if a system exception occurred 267 */ 268 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 269 long companyId, long parentOrganizationId) 270 throws com.liferay.portal.kernel.exception.SystemException { 271 return _organizationService.getOrganizations(companyId, 272 parentOrganizationId); 273 } 274 275 /** 276 * Returns a range of all the organizations belonging to the parent 277 * organization. 278 * 279 * <p> 280 * Useful when paginating results. Returns a maximum of <code>end - 281 * start</code> instances. <code>start</code> and <code>end</code> are not 282 * primary keys, they are indexes in the result set. Thus, <code>0</code> 283 * refers to the first result in the set. Setting both <code>start</code> 284 * and <code>end</code> to {@link 285 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 286 * result set. 287 * </p> 288 * 289 * @param companyId the primary key of the organizations' company 290 * @param parentOrganizationId the primary key of the organizations' parent 291 organization 292 * @param start the lower bound of the range of organizations to return 293 * @param end the upper bound of the range of organizations to return (not 294 inclusive) 295 * @return the range of organizations belonging to the parent organization 296 * @throws SystemException if a system exception occurred 297 */ 298 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 299 long companyId, long parentOrganizationId, int start, int end) 300 throws com.liferay.portal.kernel.exception.SystemException { 301 return _organizationService.getOrganizations(companyId, 302 parentOrganizationId, start, end); 303 } 304 305 /** 306 * Returns the number of organizations belonging to the parent organization. 307 * 308 * @param companyId the primary key of the organizations' company 309 * @param parentOrganizationId the primary key of the organizations' parent 310 organization 311 * @return the number of organizations belonging to the parent organization 312 * @throws SystemException if a system exception occurred 313 */ 314 public int getOrganizationsCount(long companyId, long parentOrganizationId) 315 throws com.liferay.portal.kernel.exception.SystemException { 316 return _organizationService.getOrganizationsCount(companyId, 317 parentOrganizationId); 318 } 319 320 /** 321 * Returns all the organizations associated with the user. 322 * 323 * @param userId the primary key of the user 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) 330 throws com.liferay.portal.kernel.exception.PortalException, 331 com.liferay.portal.kernel.exception.SystemException { 332 return _organizationService.getUserOrganizations(userId); 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 set asset category IDs and asset tag 409 names for the organization, and merge expando bridge attributes 410 for the organization. 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 set asset category IDs and asset tag 454 names for the organization, and merge expando bridge attributes 455 for the organization. 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 /** 476 * @deprecated Renamed to {@link #getWrappedService} 477 */ 478 public OrganizationService getWrappedOrganizationService() { 479 return _organizationService; 480 } 481 482 /** 483 * @deprecated Renamed to {@link #setWrappedService} 484 */ 485 public void setWrappedOrganizationService( 486 OrganizationService organizationService) { 487 _organizationService = organizationService; 488 } 489 490 public OrganizationService getWrappedService() { 491 return _organizationService; 492 } 493 494 public void setWrappedService(OrganizationService organizationService) { 495 _organizationService = organizationService; 496 } 497 498 private OrganizationService _organizationService; 499 }