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