001 /** 002 * Copyright (c) 2000-2012 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 import com.liferay.portal.kernel.exception.PortalException; 018 import com.liferay.portal.kernel.exception.SystemException; 019 import com.liferay.portal.kernel.transaction.Isolation; 020 import com.liferay.portal.kernel.transaction.Propagation; 021 import com.liferay.portal.kernel.transaction.Transactional; 022 023 /** 024 * The interface for the organization local service. 025 * 026 * <p> 027 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see OrganizationLocalServiceUtil 032 * @see com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.OrganizationLocalServiceImpl 034 * @generated 035 */ 036 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 037 PortalException.class, SystemException.class}) 038 public interface OrganizationLocalService extends BaseLocalService, 039 PersistedModelLocalService { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify or reference this interface directly. Always use {@link OrganizationLocalServiceUtil} to access the organization local service. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 044 */ 045 046 /** 047 * Adds the organization to the database. Also notifies the appropriate model listeners. 048 * 049 * @param organization the organization 050 * @return the organization that was added 051 * @throws SystemException if a system exception occurred 052 */ 053 public com.liferay.portal.model.Organization addOrganization( 054 com.liferay.portal.model.Organization organization) 055 throws com.liferay.portal.kernel.exception.SystemException; 056 057 /** 058 * Creates a new organization with the primary key. Does not add the organization to the database. 059 * 060 * @param organizationId the primary key for the new organization 061 * @return the new organization 062 */ 063 public com.liferay.portal.model.Organization createOrganization( 064 long organizationId); 065 066 /** 067 * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners. 068 * 069 * @param organizationId the primary key of the organization 070 * @return the organization that was removed 071 * @throws PortalException if a organization with the primary key could not be found 072 * @throws SystemException if a system exception occurred 073 */ 074 public com.liferay.portal.model.Organization deleteOrganization( 075 long organizationId) 076 throws com.liferay.portal.kernel.exception.PortalException, 077 com.liferay.portal.kernel.exception.SystemException; 078 079 /** 080 * Deletes the organization from the database. Also notifies the appropriate model listeners. 081 * 082 * @param organization the organization 083 * @return the organization that was removed 084 * @throws PortalException 085 * @throws SystemException if a system exception occurred 086 */ 087 public com.liferay.portal.model.Organization deleteOrganization( 088 com.liferay.portal.model.Organization organization) 089 throws com.liferay.portal.kernel.exception.PortalException, 090 com.liferay.portal.kernel.exception.SystemException; 091 092 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 093 094 /** 095 * Performs a dynamic query on the database and returns the matching rows. 096 * 097 * @param dynamicQuery the dynamic query 098 * @return the matching rows 099 * @throws SystemException if a system exception occurred 100 */ 101 @SuppressWarnings("rawtypes") 102 public java.util.List dynamicQuery( 103 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 104 throws com.liferay.portal.kernel.exception.SystemException; 105 106 /** 107 * Performs a dynamic query on the database and returns a range of the matching rows. 108 * 109 * <p> 110 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 111 * </p> 112 * 113 * @param dynamicQuery the dynamic query 114 * @param start the lower bound of the range of model instances 115 * @param end the upper bound of the range of model instances (not inclusive) 116 * @return the range of matching rows 117 * @throws SystemException if a system exception occurred 118 */ 119 @SuppressWarnings("rawtypes") 120 public java.util.List dynamicQuery( 121 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 122 int end) throws com.liferay.portal.kernel.exception.SystemException; 123 124 /** 125 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 126 * 127 * <p> 128 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 129 * </p> 130 * 131 * @param dynamicQuery the dynamic query 132 * @param start the lower bound of the range of model instances 133 * @param end the upper bound of the range of model instances (not inclusive) 134 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 135 * @return the ordered range of matching rows 136 * @throws SystemException if a system exception occurred 137 */ 138 @SuppressWarnings("rawtypes") 139 public java.util.List dynamicQuery( 140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 141 int end, 142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 143 throws com.liferay.portal.kernel.exception.SystemException; 144 145 /** 146 * Returns the number of rows that match the dynamic query. 147 * 148 * @param dynamicQuery the dynamic query 149 * @return the number of rows that match the dynamic query 150 * @throws SystemException if a system exception occurred 151 */ 152 public long dynamicQueryCount( 153 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 154 throws com.liferay.portal.kernel.exception.SystemException; 155 156 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 157 public com.liferay.portal.model.Organization fetchOrganization( 158 long organizationId) 159 throws com.liferay.portal.kernel.exception.SystemException; 160 161 /** 162 * Returns the organization with the primary key. 163 * 164 * @param organizationId the primary key of the organization 165 * @return the organization 166 * @throws PortalException if a organization with the primary key could not be found 167 * @throws SystemException if a system exception occurred 168 */ 169 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 170 public com.liferay.portal.model.Organization getOrganization( 171 long organizationId) 172 throws com.liferay.portal.kernel.exception.PortalException, 173 com.liferay.portal.kernel.exception.SystemException; 174 175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 176 public com.liferay.portal.model.PersistedModel getPersistedModel( 177 java.io.Serializable primaryKeyObj) 178 throws com.liferay.portal.kernel.exception.PortalException, 179 com.liferay.portal.kernel.exception.SystemException; 180 181 /** 182 * Returns a range of all the organizations. 183 * 184 * <p> 185 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrganizationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 186 * </p> 187 * 188 * @param start the lower bound of the range of organizations 189 * @param end the upper bound of the range of organizations (not inclusive) 190 * @return the range of organizations 191 * @throws SystemException if a system exception occurred 192 */ 193 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 194 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 195 int start, int end) 196 throws com.liferay.portal.kernel.exception.SystemException; 197 198 /** 199 * Returns the number of organizations. 200 * 201 * @return the number of organizations 202 * @throws SystemException if a system exception occurred 203 */ 204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 205 public int getOrganizationsCount() 206 throws com.liferay.portal.kernel.exception.SystemException; 207 208 /** 209 * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 210 * 211 * @param organization the organization 212 * @return the organization that was updated 213 * @throws SystemException if a system exception occurred 214 */ 215 public com.liferay.portal.model.Organization updateOrganization( 216 com.liferay.portal.model.Organization organization) 217 throws com.liferay.portal.kernel.exception.SystemException; 218 219 /** 220 * Returns the Spring bean ID for this bean. 221 * 222 * @return the Spring bean ID for this bean 223 */ 224 public java.lang.String getBeanIdentifier(); 225 226 /** 227 * Sets the Spring bean ID for this bean. 228 * 229 * @param beanIdentifier the Spring bean ID for this bean 230 */ 231 public void setBeanIdentifier(java.lang.String beanIdentifier); 232 233 /** 234 * Adds the organizations to the group. 235 * 236 * @param groupId the primary key of the group 237 * @param organizationIds the primary keys of the organizations 238 * @throws PortalException if a group or organization with the primary key 239 could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public void addGroupOrganizations(long groupId, long[] organizationIds) 243 throws com.liferay.portal.kernel.exception.PortalException, 244 com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Adds an organization. 248 * 249 * <p> 250 * This method handles the creation and bookkeeping of the organization 251 * including its resources, metadata, and internal data structures. It is 252 * not necessary to make a subsequent call to {@link 253 * #addOrganizationResources(long, Organization)}. 254 * </p> 255 * 256 * @param userId the primary key of the creator/owner of the organization 257 * @param parentOrganizationId the primary key of the organization's parent 258 organization 259 * @param name the organization's name 260 * @param type the organization's type 261 * @param recursable whether the permissions of the organization are to be 262 inherited by its suborganizations 263 * @param regionId the primary key of the organization's region 264 * @param countryId the primary key of the organization's country 265 * @param statusId the organization's workflow status 266 * @param comments the comments about the organization 267 * @param site whether the organization is to be associated with a main 268 site 269 * @param serviceContext the organization's service context (optionally 270 <code>null</code>). Can set asset category IDs, asset tag names, 271 and expando bridge attributes for the organization. 272 * @return the organization 273 * @throws PortalException if a creator or parent organization with the 274 primary key could not be found or if the organization's 275 information was invalid 276 * @throws SystemException if a system exception occurred 277 */ 278 public com.liferay.portal.model.Organization addOrganization(long userId, 279 long parentOrganizationId, java.lang.String name, 280 java.lang.String type, boolean recursable, long regionId, 281 long countryId, int statusId, java.lang.String comments, boolean site, 282 com.liferay.portal.service.ServiceContext serviceContext) 283 throws com.liferay.portal.kernel.exception.PortalException, 284 com.liferay.portal.kernel.exception.SystemException; 285 286 /** 287 * Adds a resource for each type of permission available on the 288 * organization. 289 * 290 * @param userId the primary key of the creator/owner of the organization 291 * @param organization the organization 292 * @throws PortalException if a portal exception occurred 293 * @throws SystemException if a system exception occurred 294 */ 295 public void addOrganizationResources(long userId, 296 com.liferay.portal.model.Organization organization) 297 throws com.liferay.portal.kernel.exception.PortalException, 298 com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Assigns the password policy to the organizations, removing any other 302 * currently assigned password policies. 303 * 304 * @param passwordPolicyId the primary key of the password policy 305 * @param organizationIds the primary keys of the organizations 306 * @throws SystemException if a system exception occurred 307 */ 308 public void addPasswordPolicyOrganizations(long passwordPolicyId, 309 long[] organizationIds) 310 throws com.liferay.portal.kernel.exception.SystemException; 311 312 public void checkMembershipPolicy(com.liferay.portal.model.User user) 313 throws com.liferay.portal.kernel.exception.PortalException, 314 com.liferay.portal.kernel.exception.SystemException; 315 316 /** 317 * Deletes the logo of the organization. 318 * 319 * @param organizationId the primary key of the organization 320 * @throws PortalException if an organization or parent organization with 321 the primary key could not be found or if the organization's logo 322 could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public void deleteLogo(long organizationId) 326 throws com.liferay.portal.kernel.exception.PortalException, 327 com.liferay.portal.kernel.exception.SystemException; 328 329 /** 330 * Returns all the organizations belonging to the group. 331 * 332 * @param groupId the primary key of the group 333 * @return the organizations belonging to the group 334 * @throws SystemException if a system exception occurred 335 */ 336 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 337 public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations( 338 long groupId) 339 throws com.liferay.portal.kernel.exception.SystemException; 340 341 /** 342 * Returns the organization with the name. 343 * 344 * @param companyId the primary key of the organization's company 345 * @param name the organization's name 346 * @return the organization with the name 347 * @throws PortalException if the organization with the name could not be 348 found 349 * @throws SystemException if a system exception occurred 350 */ 351 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 352 public com.liferay.portal.model.Organization getOrganization( 353 long companyId, java.lang.String name) 354 throws com.liferay.portal.kernel.exception.PortalException, 355 com.liferay.portal.kernel.exception.SystemException; 356 357 /** 358 * Returns the primary key of the organization with the name. 359 * 360 * @param companyId the primary key of the organization's company 361 * @param name the organization's name 362 * @return the primary key of the organization with the name, or 363 <code>0</code> if the organization could not be found 364 * @throws SystemException if a system exception occurred 365 */ 366 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 367 public long getOrganizationId(long companyId, java.lang.String name) 368 throws com.liferay.portal.kernel.exception.SystemException; 369 370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 371 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 372 long userId, int start, int end, 373 com.liferay.portal.kernel.util.OrderByComparator obc) 374 throws com.liferay.portal.kernel.exception.PortalException, 375 com.liferay.portal.kernel.exception.SystemException; 376 377 /** 378 * Returns all the organizations belonging to the parent organization. 379 * 380 * @param companyId the primary key of the organization's company 381 * @param parentOrganizationId the primary key of the organization's parent 382 organization 383 * @return the organizations belonging to the parent organization 384 * @throws SystemException if a system exception occurred 385 */ 386 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 387 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 388 long companyId, long parentOrganizationId) 389 throws com.liferay.portal.kernel.exception.SystemException; 390 391 /** 392 * Returns a range of all the organizations belonging to the parent 393 * organization. 394 * 395 * <p> 396 * Useful when paginating results. Returns a maximum of <code>end - 397 * start</code> instances. <code>start</code> and <code>end</code> are not 398 * primary keys, they are indexes in the result set. Thus, <code>0</code> 399 * refers to the first result in the set. Setting both <code>start</code> 400 * and <code>end</code> to {@link 401 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 402 * result set. 403 * </p> 404 * 405 * @param companyId the primary key of the organization's company 406 * @param parentOrganizationId the primary key of the organization's parent 407 organization 408 * @param start the lower bound of the range of organizations to return 409 * @param end the upper bound of the range of organizations to return (not 410 inclusive) 411 * @return the range of organizations belonging to the parent organization 412 * @throws SystemException if a system exception occurred 413 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 414 long, long, int, int) 415 */ 416 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 417 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 418 long companyId, long parentOrganizationId, int start, int end) 419 throws com.liferay.portal.kernel.exception.SystemException; 420 421 /** 422 * Returns the organizations with the primary keys. 423 * 424 * @param organizationIds the primary keys of the organizations 425 * @return the organizations with the primary keys 426 * @throws PortalException if any one of the organizations could not be 427 found 428 * @throws SystemException if a system exception occurred 429 */ 430 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 431 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 432 long[] organizationIds) 433 throws com.liferay.portal.kernel.exception.PortalException, 434 com.liferay.portal.kernel.exception.SystemException; 435 436 /** 437 * Returns the number of organizations belonging to the parent organization. 438 * 439 * @param companyId the primary key of the organization's company 440 * @param parentOrganizationId the primary key of the organization's parent 441 organization 442 * @return the number of organizations belonging to the parent organization 443 * @throws SystemException if a system exception occurred 444 */ 445 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 446 public int getOrganizationsCount(long companyId, long parentOrganizationId) 447 throws com.liferay.portal.kernel.exception.SystemException; 448 449 /** 450 * Returns the parent organizations in order by closest ancestor. The list 451 * starts with the organization itself. 452 * 453 * @param organizationId the primary key of the organization 454 * @return the parent organizations in order by closest ancestor 455 * @throws PortalException if an organization with the primary key could not 456 be found 457 * @throws SystemException if a system exception occurred 458 */ 459 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 460 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 461 long organizationId) 462 throws com.liferay.portal.kernel.exception.PortalException, 463 com.liferay.portal.kernel.exception.SystemException; 464 465 /** 466 * Returns the suborganizations of the organizations. 467 * 468 * @param organizations the organizations from which to get 469 suborganizations 470 * @return the suborganizations of the organizations 471 * @throws SystemException if a system exception occurred 472 */ 473 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 474 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 475 java.util.List<com.liferay.portal.model.Organization> organizations) 476 throws com.liferay.portal.kernel.exception.SystemException; 477 478 /** 479 * Returns the suborganizations of the organization. 480 * 481 * @param companyId the primary key of the organization's company 482 * @param organizationId the primary key of the organization 483 * @return the suborganizations of the organization 484 * @throws SystemException if a system exception occurred 485 */ 486 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 487 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 488 long companyId, long organizationId) 489 throws com.liferay.portal.kernel.exception.SystemException; 490 491 /** 492 * Returns the count of suborganizations of the organization. 493 * 494 * @param companyId the primary key of the organization's company 495 * @param organizationId the primary key of the organization 496 * @return the count of suborganizations of the organization 497 * @throws SystemException if a system exception occurred 498 */ 499 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 500 public int getSuborganizationsCount(long companyId, long organizationId) 501 throws com.liferay.portal.kernel.exception.SystemException; 502 503 /** 504 * Returns the intersection of <code>allOrganizations</code> and 505 * <code>availableOrganizations</code>. 506 * 507 * @param allOrganizations the organizations to check for availability 508 * @param availableOrganizations the available organizations 509 * @return the intersection of <code>allOrganizations</code> and 510 <code>availableOrganizations</code> 511 */ 512 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 513 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 514 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 515 java.util.List<com.liferay.portal.model.Organization> availableOrganizations); 516 517 /** 518 * Returns all the organizations associated with the user. 519 * 520 * @param userId the primary key of the user 521 * @return the organizations associated with the user 522 * @throws PortalException if a user with the primary key could not be found 523 * @throws SystemException if a system exception occurred 524 */ 525 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 526 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 527 long userId) 528 throws com.liferay.portal.kernel.exception.PortalException, 529 com.liferay.portal.kernel.exception.SystemException; 530 531 /** 532 * Returns all the organizations associated with the user. If 533 * includeAdministrative is <code>true</code>, the result includes those 534 * organizations that are not directly associated to the user but he is an 535 * administrator or an owner of the organization. 536 * 537 * @param userId the primary key of the user 538 * @param includeAdministrative whether to includes organizations that are 539 indirectly associated to the user because he is an administrator 540 or an owner of the organization 541 * @return the organizations associated with the user 542 * @throws PortalException if a user with the primary key could not be found 543 * @throws SystemException if a system exception occurred 544 */ 545 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 546 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 547 long userId, boolean includeAdministrative) 548 throws com.liferay.portal.kernel.exception.PortalException, 549 com.liferay.portal.kernel.exception.SystemException; 550 551 /** 552 * Returns a range of all the organizations associated with the user. 553 * 554 * <p> 555 * Useful when paginating results. Returns a maximum of <code>end - 556 * start</code> instances. <code>start</code> and <code>end</code> are not 557 * primary keys, they are indexes in the result set. Thus, <code>0</code> 558 * refers to the first result in the set. Setting both <code>start</code> 559 * and <code>end</code> to {@link 560 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 561 * result set. 562 * </p> 563 * 564 * @param userId the primary key of the user 565 * @param start the lower bound of the range of organizations to return 566 * @param end the upper bound of the range of organizations to return (not 567 inclusive) 568 * @return the range organizations associated with the user 569 * @throws PortalException if a user with the primary key could not be found 570 * @throws SystemException if a system exception occurred 571 */ 572 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 573 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 574 long userId, int start, int end) 575 throws com.liferay.portal.kernel.exception.PortalException, 576 com.liferay.portal.kernel.exception.SystemException; 577 578 /** 579 * Returns the number of organizations associated with the user. 580 * 581 * @param userId the primary key of the user 582 * @return the number of organizations associated with the user 583 * @throws SystemException if a system exception occurred 584 */ 585 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 586 public int getUserOrganizationsCount(long userId) 587 throws com.liferay.portal.kernel.exception.SystemException; 588 589 /** 590 * Returns <code>true</code> if the organization belongs to the group. 591 * 592 * @param groupId the primary key of the group 593 * @param organizationId the primary key of the organization 594 * @return <code>true</code> if the organization belongs to the group; 595 <code>false</code> otherwise 596 * @throws SystemException if a system exception occurred 597 */ 598 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 599 public boolean hasGroupOrganization(long groupId, long organizationId) 600 throws com.liferay.portal.kernel.exception.SystemException; 601 602 /** 603 * Returns <code>true</code> if the password policy has been assigned to the 604 * organization. 605 * 606 * @param passwordPolicyId the primary key of the password policy 607 * @param organizationId the primary key of the organization 608 * @return <code>true</code> if the password policy has been assigned to the 609 organization; <code>false</code> otherwise 610 * @throws SystemException if a system exception occurred 611 */ 612 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 613 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 614 long organizationId) 615 throws com.liferay.portal.kernel.exception.SystemException; 616 617 /** 618 * Returns <code>true</code> if the user is a member of the organization. 619 * This method is usually called to determine if the user has view access to 620 * a resource belonging to the organization. 621 * 622 * @param userId the primary key of the user 623 * @param organizationId the primary key of the organization 624 * @return <code>true</code> if the user has access to the organization; 625 <code>false</code> otherwise 626 * @throws SystemException if a system exception occurred 627 */ 628 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 629 public boolean hasUserOrganization(long userId, long organizationId) 630 throws com.liferay.portal.kernel.exception.SystemException; 631 632 /** 633 * Returns <code>true</code> if the user is a member of the organization, 634 * optionally focusing on suborganizations or the specified organization. 635 * This method is usually called to determine if the user has view access to 636 * a resource belonging to the organization. 637 * 638 * <ol> 639 * <li> 640 * If <code>inheritSuborganizations=<code>false</code></code>: 641 * the method checks whether the user belongs to the organization specified 642 * by <code>organizationId</code>. The parameter 643 * <code>includeSpecifiedOrganization</code> is ignored. 644 * </li> 645 * <li> 646 * The parameter <code>includeSpecifiedOrganization</code> is 647 * ignored unless <code>inheritSuborganizations</code> is also 648 * <code>true</code>. 649 * </li> 650 * <li> 651 * If <code>inheritSuborganizations=<code>true</code></code> and 652 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 653 * checks 654 * whether the user belongs to one of the child organizations of the one 655 * specified by <code>organizationId</code>. 656 * </li> 657 * <li> 658 * If <code>inheritSuborganizations=<code>true</code></code> and 659 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 660 * checks whether 661 * the user belongs to the organization specified by 662 * <code>organizationId</code> or any of 663 * its child organizations. 664 * </li> 665 * </ol> 666 * 667 * @param userId the primary key of the organization's user 668 * @param organizationId the primary key of the organization 669 * @param inheritSuborganizations if <code>true</code> suborganizations are 670 considered in the determination 671 * @param includeSpecifiedOrganization if <code>true</code> the 672 organization specified by <code>organizationId</code> is 673 considered in the determination 674 * @return <code>true</code> if the user has access to the organization; 675 <code>false</code> otherwise 676 * @throws PortalException if an organization with the primary key could not 677 be found 678 * @throws SystemException if a system exception occurred 679 * @see com.liferay.portal.service.persistence.OrganizationFinder 680 */ 681 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 682 public boolean hasUserOrganization(long userId, long organizationId, 683 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 684 throws com.liferay.portal.kernel.exception.PortalException, 685 com.liferay.portal.kernel.exception.SystemException; 686 687 /** 688 * Rebuilds the organizations tree. 689 * 690 * <p> 691 * Only call this method if the tree has become stale through operations 692 * other than normal CRUD. Under normal circumstances the tree is 693 * automatically rebuilt whenever necessary. 694 * </p> 695 * 696 * @param companyId the primary key of the organization's company 697 * @throws PortalException if an organization with the primary key could not 698 be found 699 * @throws SystemException if a system exception occurred 700 */ 701 public void rebuildTree(long companyId) 702 throws com.liferay.portal.kernel.exception.PortalException, 703 com.liferay.portal.kernel.exception.SystemException; 704 705 /** 706 * Returns a range of all the organizations of the company. 707 * 708 * <p> 709 * Useful when paginating results. Returns a maximum of <code>end - 710 * start</code> instances. <code>start</code> and <code>end</code> are not 711 * primary keys, they are indexes in the result set. Thus, <code>0</code> 712 * refers to the first result in the set. Setting both <code>start</code> 713 * and <code>end</code> to {@link 714 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 715 * result set. 716 * </p> 717 * 718 * @param companyId the primary key of the company 719 * @param params the finder parameters (optionally <code>null</code>). For 720 more information see {@link 721 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 722 * @param start the lower bound of the range of organizations to return 723 * @param end the upper bound of the range of organizations to return (not 724 inclusive) 725 * @return the range of all the organizations of the company 726 * @throws SystemException if a system exception occurred 727 */ 728 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 729 public java.util.List<com.liferay.portal.model.Organization> search( 730 long companyId, 731 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 732 int start, int end) 733 throws com.liferay.portal.kernel.exception.SystemException; 734 735 /** 736 * Returns an ordered range of all the organizations that match the 737 * keywords, using the indexer. It is preferable to use this method instead 738 * of the non-indexed version whenever possible for performance reasons. 739 * 740 * <p> 741 * Useful when paginating results. Returns a maximum of <code>end - 742 * start</code> instances. <code>start</code> and <code>end</code> are not 743 * primary keys, they are indexes in the result set. Thus, <code>0</code> 744 * refers to the first result in the set. Setting both <code>start</code> 745 * and <code>end</code> to {@link 746 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 747 * result set. 748 * </p> 749 * 750 * @param companyId the primary key of the organization's company 751 * @param parentOrganizationId the primary key of the organization's parent 752 organization 753 * @param keywords the keywords (space separated), which may occur in the 754 organization's name, street, city, zipcode, type, region or 755 country (optionally <code>null</code>) 756 * @param params the finder parameters (optionally <code>null</code>). For 757 more information see {@link 758 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 759 * @param start the lower bound of the range of organizations to return 760 * @param end the upper bound of the range of organizations to return (not 761 inclusive) 762 * @param sort the field and direction by which to sort (optionally 763 <code>null</code>) 764 * @return the matching organizations ordered by name 765 * @throws SystemException if a system exception occurred 766 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 767 */ 768 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 769 public com.liferay.portal.kernel.search.Hits search(long companyId, 770 long parentOrganizationId, java.lang.String keywords, 771 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 772 int start, int end, com.liferay.portal.kernel.search.Sort sort) 773 throws com.liferay.portal.kernel.exception.SystemException; 774 775 /** 776 * Returns a name ordered range of all the organizations that match the 777 * keywords, type, region, and country, without using the indexer. It is 778 * preferable to use the indexed version {@link #search(long, long, String, 779 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 780 * for performance reasons. 781 * 782 * <p> 783 * Useful when paginating results. Returns a maximum of <code>end - 784 * start</code> instances. <code>start</code> and <code>end</code> are not 785 * primary keys, they are indexes in the result set. Thus, <code>0</code> 786 * refers to the first result in the set. Setting both <code>start</code> 787 * and <code>end</code> to {@link 788 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 789 * result set. 790 * </p> 791 * 792 * @param companyId the primary key of the organization's company 793 * @param parentOrganizationId the primary key of the organization's parent 794 organization 795 * @param keywords the keywords (space separated), which may occur in the 796 organization's name, street, city, or zipcode (optionally 797 <code>null</code>) 798 * @param type the organization's type (optionally <code>null</code>) 799 * @param regionId the primary key of the organization's region (optionally 800 <code>null</code>) 801 * @param countryId the primary key of the organization's country 802 (optionally <code>null</code>) 803 * @param params the finder params. For more information see {@link 804 com.liferay.portal.service.persistence.OrganizationFinder} 805 * @param start the lower bound of the range of organizations to return 806 * @param end the upper bound of the range of organizations to return (not 807 inclusive) 808 * @return the matching organizations ordered by name 809 * @throws SystemException if a system exception occurred 810 * @see com.liferay.portal.service.persistence.OrganizationFinder 811 */ 812 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 813 public java.util.List<com.liferay.portal.model.Organization> search( 814 long companyId, long parentOrganizationId, java.lang.String keywords, 815 java.lang.String type, java.lang.Long regionId, 816 java.lang.Long countryId, 817 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 818 int start, int end) 819 throws com.liferay.portal.kernel.exception.SystemException; 820 821 /** 822 * Returns an ordered range of all the organizations that match the 823 * keywords, type, region, and country, without using the indexer. It is 824 * preferable to use the indexed version {@link #search(long, long, String, 825 * String, String, String, String, String, String, LinkedHashMap, boolean, 826 * int, int, Sort)} instead of this method wherever possible for performance 827 * reasons. 828 * 829 * <p> 830 * Useful when paginating results. Returns a maximum of <code>end - 831 * start</code> instances. <code>start</code> and <code>end</code> are not 832 * primary keys, they are indexes in the result set. Thus, <code>0</code> 833 * refers to the first result in the set. Setting both <code>start</code> 834 * and <code>end</code> to {@link 835 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 836 * result set. 837 * </p> 838 * 839 * @param companyId the primary key of the organization's company 840 * @param parentOrganizationId the primary key of the organization's parent 841 organization 842 * @param keywords the keywords (space separated), which may occur in the 843 organization's name, street, city, or zipcode (optionally 844 <code>null</code>) 845 * @param type the organization's type (optionally <code>null</code>) 846 * @param regionId the primary key of the organization's region (optionally 847 <code>null</code>) 848 * @param countryId the primary key of the organization's country 849 (optionally <code>null</code>) 850 * @param params the finder params. For more information see {@link 851 com.liferay.portal.service.persistence.OrganizationFinder} 852 * @param start the lower bound of the range of organizations to return 853 * @param end the upper bound of the range of organizations to return (not 854 inclusive) 855 * @param obc the comparator to order the organizations (optionally 856 <code>null</code>) 857 * @return the matching organizations ordered by comparator <code>obc</code> 858 * @throws SystemException if a system exception occurred 859 * @see com.liferay.portal.service.persistence.OrganizationFinder 860 */ 861 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 862 public java.util.List<com.liferay.portal.model.Organization> search( 863 long companyId, long parentOrganizationId, java.lang.String keywords, 864 java.lang.String type, java.lang.Long regionId, 865 java.lang.Long countryId, 866 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 867 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 868 throws com.liferay.portal.kernel.exception.SystemException; 869 870 /** 871 * Returns a name ordered range of all the organizations with the type, 872 * region, and country, and whose name, street, city, and zipcode match the 873 * keywords specified for them, without using the indexer. It is preferable 874 * to use the indexed version {@link #search(long, long, String, String, 875 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 876 * Sort)} instead of this method wherever possible for performance reasons. 877 * 878 * <p> 879 * Useful when paginating results. Returns a maximum of <code>end - 880 * start</code> instances. <code>start</code> and <code>end</code> are not 881 * primary keys, they are indexes in the result set. Thus, <code>0</code> 882 * refers to the first result in the set. Setting both <code>start</code> 883 * and <code>end</code> to {@link 884 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 885 * result set. 886 * </p> 887 * 888 * @param companyId the primary key of the organization's company 889 * @param parentOrganizationId the primary key of the organization's parent 890 * @param name the name keywords (space separated, optionally 891 <code>null</code>) 892 * @param type the organization's type (optionally <code>null</code>) 893 * @param street the street keywords (optionally <code>null</code>) 894 * @param city the city keywords (optionally <code>null</code>) 895 * @param zip the zipcode keywords (optionally <code>null</code>) 896 * @param regionId the primary key of the organization's region (optionally 897 <code>null</code>) 898 * @param countryId the primary key of the organization's country 899 (optionally <code>null</code>) 900 * @param params the finder parameters (optionally <code>null</code>). For 901 more information see {@link 902 com.liferay.portal.service.persistence.OrganizationFinder} 903 * @param andOperator whether every field must match its keywords, or just 904 one field. For example, "organizations with the name 905 'Employees' and city 'Chicago'" vs "organizations with 906 the name 'Employees' or the city 'Chicago'". 907 * @param start the lower bound of the range of organizations to return 908 * @param end the upper bound of the range of organizations to return (not 909 inclusive) 910 * @return the matching organizations ordered by name 911 * @throws SystemException if a system exception occurred 912 * @see com.liferay.portal.service.persistence.OrganizationFinder 913 */ 914 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 915 public java.util.List<com.liferay.portal.model.Organization> search( 916 long companyId, long parentOrganizationId, java.lang.String name, 917 java.lang.String type, java.lang.String street, java.lang.String city, 918 java.lang.String zip, java.lang.Long regionId, 919 java.lang.Long countryId, 920 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 921 boolean andOperator, int start, int end) 922 throws com.liferay.portal.kernel.exception.SystemException; 923 924 /** 925 * Returns an ordered range of all the organizations with the type, region, 926 * and country, and whose name, street, city, and zipcode match the keywords 927 * specified for them, without using the indexer. It is preferable to use 928 * the indexed version {@link #search(long, long, String, String, String, 929 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 930 * instead of this method wherever possible for performance reasons. 931 * 932 * <p> 933 * Useful when paginating results. Returns a maximum of <code>end - 934 * start</code> instances. <code>start</code> and <code>end</code> are not 935 * primary keys, they are indexes in the result set. Thus, <code>0</code> 936 * refers to the first result in the set. Setting both <code>start</code> 937 * and <code>end</code> to {@link 938 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 939 * result set. 940 * </p> 941 * 942 * @param companyId the primary key of the organization's company 943 * @param parentOrganizationId the primary key of the organization's parent 944 organization 945 * @param name the name keywords (space separated, optionally 946 <code>null</code>) 947 * @param type the organization's type (optionally <code>null</code>) 948 * @param street the street keywords (optionally <code>null</code>) 949 * @param city the city keywords (optionally <code>null</code>) 950 * @param zip the zipcode keywords (optionally <code>null</code>) 951 * @param regionId the primary key of the organization's region (optionally 952 <code>null</code>) 953 * @param countryId the primary key of the organization's country 954 (optionally <code>null</code>) 955 * @param params the finder parameters (optionally <code>null</code>). For 956 more information see {@link 957 com.liferay.portal.service.persistence.OrganizationFinder} 958 * @param andOperator whether every field must match its keywords, or just 959 one field. For example, "organizations with the name 960 'Employees' and city 'Chicago'" vs "organizations with 961 the name 'Employees' or the city 'Chicago'". 962 * @param start the lower bound of the range of organizations to return 963 * @param end the upper bound of the range of organizations to return (not 964 inclusive) 965 * @param obc the comparator to order the organizations (optionally 966 <code>null</code>) 967 * @return the matching organizations ordered by comparator <code>obc</code> 968 * @throws SystemException if a system exception occurred 969 * @see com.liferay.portal.service.persistence.OrganizationFinder 970 */ 971 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 972 public java.util.List<com.liferay.portal.model.Organization> search( 973 long companyId, long parentOrganizationId, java.lang.String name, 974 java.lang.String type, java.lang.String street, java.lang.String city, 975 java.lang.String zip, java.lang.Long regionId, 976 java.lang.Long countryId, 977 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 978 boolean andOperator, int start, int end, 979 com.liferay.portal.kernel.util.OrderByComparator obc) 980 throws com.liferay.portal.kernel.exception.SystemException; 981 982 /** 983 * Returns an ordered range of all the organizations whose name, type, or 984 * location fields match the keywords specified for them, using the indexer. 985 * It is preferable to use this method instead of the non-indexed version 986 * whenever possible for performance reasons. 987 * 988 * <p> 989 * Useful when paginating results. Returns a maximum of <code>end - 990 * start</code> instances. <code>start</code> and <code>end</code> are not 991 * primary keys, they are indexes in the result set. Thus, <code>0</code> 992 * refers to the first result in the set. Setting both <code>start</code> 993 * and <code>end</code> to {@link 994 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 995 * result set. 996 * </p> 997 * 998 * @param companyId the primary key of the organization's company 999 * @param parentOrganizationId the primary key of the organization's parent 1000 organization 1001 * @param name the name keywords (space separated, optionally 1002 <code>null</code>) 1003 * @param type the type keywords (optionally <code>null</code>) 1004 * @param street the street keywords (optionally <code>null</code>) 1005 * @param city the city keywords (optionally <code>null</code>) 1006 * @param zip the zipcode keywords (optionally <code>null</code>) 1007 * @param region the region keywords (optionally <code>null</code>) 1008 * @param country the country keywords (optionally <code>null</code>) 1009 * @param params the finder parameters (optionally <code>null</code>). For 1010 more information see {@link 1011 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 1012 * @param andSearch whether every field must match its keywords or just one 1013 field 1014 * @param start the lower bound of the range of organizations to return 1015 * @param end the upper bound of the range of organizations to return (not 1016 inclusive) 1017 * @param sort the field and direction by which to sort (optionally 1018 <code>null</code>) 1019 * @return the matching organizations ordered by <code>sort</code> 1020 * @throws SystemException if a system exception occurred 1021 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 1022 */ 1023 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1024 public com.liferay.portal.kernel.search.Hits search(long companyId, 1025 long parentOrganizationId, java.lang.String name, 1026 java.lang.String type, java.lang.String street, java.lang.String city, 1027 java.lang.String zip, java.lang.String region, 1028 java.lang.String country, 1029 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1030 boolean andSearch, int start, int end, 1031 com.liferay.portal.kernel.search.Sort sort) 1032 throws com.liferay.portal.kernel.exception.SystemException; 1033 1034 /** 1035 * Returns the number of organizations that match the keywords, type, 1036 * region, and country. 1037 * 1038 * @param companyId the primary key of the organization's company 1039 * @param parentOrganizationId the primary key of the organization's parent 1040 organization 1041 * @param keywords the keywords (space separated), which may occur in the 1042 organization's name, street, city, or zipcode (optionally 1043 <code>null</code>) 1044 * @param type the organization's type (optionally <code>null</code>) 1045 * @param regionId the primary key of the organization's region (optionally 1046 <code>null</code>) 1047 * @param countryId the primary key of the organization's country 1048 (optionally <code>null</code>) 1049 * @param params the finder parameters (optionally <code>null</code>). For 1050 more information see {@link 1051 com.liferay.portal.service.persistence.OrganizationFinder} 1052 * @return the number of matching organizations 1053 * @throws SystemException if a system exception occurred 1054 * @see com.liferay.portal.service.persistence.OrganizationFinder 1055 */ 1056 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1057 public int searchCount(long companyId, long parentOrganizationId, 1058 java.lang.String keywords, java.lang.String type, 1059 java.lang.Long regionId, java.lang.Long countryId, 1060 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1061 throws com.liferay.portal.kernel.exception.SystemException; 1062 1063 /** 1064 * Returns the number of organizations with the type, region, and country, 1065 * and whose name, street, city, and zipcode match the keywords specified 1066 * for them. 1067 * 1068 * @param companyId the primary key of the organization's company 1069 * @param parentOrganizationId the primary key of the organization's parent 1070 organization 1071 * @param name the name keywords (space separated, optionally 1072 <code>null</code>) 1073 * @param type the organization's type (optionally <code>null</code>) 1074 * @param street the street keywords (optionally <code>null</code>) 1075 * @param city the city keywords (optionally <code>null</code>) 1076 * @param zip the zipcode keywords (optionally <code>null</code>) 1077 * @param regionId the primary key of the organization's region (optionally 1078 <code>null</code>) 1079 * @param countryId the primary key of the organization's country 1080 (optionally <code>null</code>) 1081 * @param params the finder parameters (optionally <code>null</code>). For 1082 more information see {@link 1083 com.liferay.portal.service.persistence.OrganizationFinder} 1084 * @param andOperator whether every field must match its keywords, or just 1085 one field. For example, "organizations with the name 1086 'Employees' and city 'Chicago'" vs "organizations with 1087 the name 'Employees' or the city 'Chicago'". 1088 * @return the number of matching organizations 1089 * @throws SystemException if a system exception occurred 1090 * @see com.liferay.portal.service.persistence.OrganizationFinder 1091 */ 1092 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1093 public int searchCount(long companyId, long parentOrganizationId, 1094 java.lang.String name, java.lang.String type, java.lang.String street, 1095 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1096 java.lang.Long countryId, 1097 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1098 boolean andOperator) 1099 throws com.liferay.portal.kernel.exception.SystemException; 1100 1101 /** 1102 * Sets the organizations in the group, removing and adding organizations to 1103 * the group as necessary. 1104 * 1105 * @param groupId the primary key of the group 1106 * @param organizationIds the primary keys of the organizations 1107 * @throws PortalException if a portal exception occurred 1108 * @throws SystemException if a system exception occurred 1109 */ 1110 public void setGroupOrganizations(long groupId, long[] organizationIds) 1111 throws com.liferay.portal.kernel.exception.PortalException, 1112 com.liferay.portal.kernel.exception.SystemException; 1113 1114 /** 1115 * Removes the organizations from the group. 1116 * 1117 * @param groupId the primary key of the group 1118 * @param organizationIds the primary keys of the organizations 1119 * @throws PortalException if a portal exception occurred 1120 * @throws SystemException if a system exception occurred 1121 */ 1122 public void unsetGroupOrganizations(long groupId, long[] organizationIds) 1123 throws com.liferay.portal.kernel.exception.PortalException, 1124 com.liferay.portal.kernel.exception.SystemException; 1125 1126 /** 1127 * Removes the organizations from the password policy. 1128 * 1129 * @param passwordPolicyId the primary key of the password policy 1130 * @param organizationIds the primary keys of the organizations 1131 * @throws SystemException if a system exception occurred 1132 */ 1133 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1134 long[] organizationIds) 1135 throws com.liferay.portal.kernel.exception.SystemException; 1136 1137 /** 1138 * Updates the organization's asset with the new asset categories and tag 1139 * names, removing and adding asset categories and tag names as necessary. 1140 * 1141 * @param userId the primary key of the user 1142 * @param organization the organization 1143 * @param assetCategoryIds the primary keys of the asset categories 1144 * @param assetTagNames the asset tag names 1145 * @throws PortalException if a user with the primary key could not be found 1146 * @throws SystemException if a system exception occurred 1147 */ 1148 public void updateAsset(long userId, 1149 com.liferay.portal.model.Organization organization, 1150 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1151 throws com.liferay.portal.kernel.exception.PortalException, 1152 com.liferay.portal.kernel.exception.SystemException; 1153 1154 /** 1155 * Updates the organization. 1156 * 1157 * @param companyId the primary key of the organization's company 1158 * @param organizationId the primary key of the organization 1159 * @param parentOrganizationId the primary key of organization's parent 1160 organization 1161 * @param name the organization's name 1162 * @param type the organization's type 1163 * @param recursable whether permissions of the organization are to be 1164 inherited by its suborganizations 1165 * @param regionId the primary key of the organization's region 1166 * @param countryId the primary key of the organization's country 1167 * @param statusId the organization's workflow status 1168 * @param comments the comments about the organization 1169 * @param site whether the organization is to be associated with a main 1170 site 1171 * @param serviceContext the organization's service context (optionally 1172 <code>null</code>). Can set asset category IDs and asset tag 1173 names for the organization, and merge expando bridge attributes 1174 for the organization. 1175 * @return the organization 1176 * @throws PortalException if an organization or parent organization with 1177 the primary key could not be found or if the new information was 1178 invalid 1179 * @throws SystemException if a system exception occurred 1180 */ 1181 public com.liferay.portal.model.Organization updateOrganization( 1182 long companyId, long organizationId, long parentOrganizationId, 1183 java.lang.String name, java.lang.String type, boolean recursable, 1184 long regionId, long countryId, int statusId, java.lang.String comments, 1185 boolean site, com.liferay.portal.service.ServiceContext serviceContext) 1186 throws com.liferay.portal.kernel.exception.PortalException, 1187 com.liferay.portal.kernel.exception.SystemException; 1188 }