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