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