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 sub-organizations 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 /** 313 * Deletes the logo of the organization. 314 * 315 * @param organizationId the primary key of the organization 316 * @throws PortalException if an organization or parent organization with 317 the primary key could not be found or if the organization's logo 318 could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public void deleteLogo(long organizationId) 322 throws com.liferay.portal.kernel.exception.PortalException, 323 com.liferay.portal.kernel.exception.SystemException; 324 325 /** 326 * Returns all the organizations belonging to the group. 327 * 328 * @param groupId the primary key of the group 329 * @return the organizations belonging to the group 330 * @throws SystemException if a system exception occurred 331 */ 332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 333 public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations( 334 long groupId) 335 throws com.liferay.portal.kernel.exception.SystemException; 336 337 /** 338 * Returns the organization with the name. 339 * 340 * @param companyId the primary key of the organization's company 341 * @param name the organization's name 342 * @return the organization with the name 343 * @throws PortalException if the organization with the name could not be 344 found 345 * @throws SystemException if a system exception occurred 346 */ 347 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 348 public com.liferay.portal.model.Organization getOrganization( 349 long companyId, java.lang.String name) 350 throws com.liferay.portal.kernel.exception.PortalException, 351 com.liferay.portal.kernel.exception.SystemException; 352 353 /** 354 * Returns the primary key of 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 primary key of the organization with the name, or 359 <code>0</code> if the organization could not be found 360 * @throws SystemException if a system exception occurred 361 */ 362 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 363 public long getOrganizationId(long companyId, java.lang.String name) 364 throws com.liferay.portal.kernel.exception.SystemException; 365 366 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 367 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 368 long userId, int start, int end, 369 com.liferay.portal.kernel.util.OrderByComparator obc) 370 throws com.liferay.portal.kernel.exception.PortalException, 371 com.liferay.portal.kernel.exception.SystemException; 372 373 /** 374 * Returns all the organizations belonging to the parent organization. 375 * 376 * @param companyId the primary key of the organization's company 377 * @param parentOrganizationId the primary key of the organization's parent 378 organization 379 * @return the organizations belonging to the parent organization 380 * @throws SystemException if a system exception occurred 381 */ 382 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 383 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 384 long companyId, long parentOrganizationId) 385 throws com.liferay.portal.kernel.exception.SystemException; 386 387 /** 388 * Returns a range of all the organizations belonging to the parent 389 * organization. 390 * 391 * <p> 392 * Useful when paginating results. Returns a maximum of <code>end - 393 * start</code> instances. <code>start</code> and <code>end</code> are not 394 * primary keys, they are indexes in the result set. Thus, <code>0</code> 395 * refers to the first result in the set. Setting both <code>start</code> 396 * and <code>end</code> to {@link 397 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 398 * result set. 399 * </p> 400 * 401 * @param companyId the primary key of the organization's company 402 * @param parentOrganizationId the primary key of the organization's parent 403 organization 404 * @param start the lower bound of the range of organizations to return 405 * @param end the upper bound of the range of organizations to return (not 406 inclusive) 407 * @return the range of organizations belonging to the parent organization 408 * @throws SystemException if a system exception occurred 409 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 410 long, long, int, int) 411 */ 412 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 413 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 414 long companyId, long parentOrganizationId, int start, int end) 415 throws com.liferay.portal.kernel.exception.SystemException; 416 417 /** 418 * Returns the organizations with the primary keys. 419 * 420 * @param organizationIds the primary keys of the organizations 421 * @return the organizations with the primary keys 422 * @throws PortalException if any one of the organizations could not be 423 found 424 * @throws SystemException if a system exception occurred 425 */ 426 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 427 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 428 long[] organizationIds) 429 throws com.liferay.portal.kernel.exception.PortalException, 430 com.liferay.portal.kernel.exception.SystemException; 431 432 /** 433 * Returns the number of organizations belonging to the parent organization. 434 * 435 * @param companyId the primary key of the organization's company 436 * @param parentOrganizationId the primary key of the organization's parent 437 organization 438 * @return the number of organizations belonging to the parent organization 439 * @throws SystemException if a system exception occurred 440 */ 441 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 442 public int getOrganizationsCount(long companyId, long parentOrganizationId) 443 throws com.liferay.portal.kernel.exception.SystemException; 444 445 /** 446 * Returns the parent organizations in order by closest ancestor. The list 447 * starts with the organization itself. 448 * 449 * @param organizationId the primary key of the organization 450 * @return the parent organizations in order by closest ancestor 451 * @throws PortalException if an organization with the primary key could not 452 be found 453 * @throws SystemException if a system exception occurred 454 */ 455 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 456 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 457 long organizationId) 458 throws com.liferay.portal.kernel.exception.PortalException, 459 com.liferay.portal.kernel.exception.SystemException; 460 461 /** 462 * Returns the sub-organizations of the organizations. 463 * 464 * @param organizations the organizations from which to get 465 sub-organizations 466 * @return the sub-organizations of the organizations 467 * @throws SystemException if a system exception occurred 468 */ 469 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 470 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 471 java.util.List<com.liferay.portal.model.Organization> organizations) 472 throws com.liferay.portal.kernel.exception.SystemException; 473 474 /** 475 * Returns the intersection of <code>allOrganizations</code> and 476 * <code>availableOrganizations</code>. 477 * 478 * @param allOrganizations the organizations to check for availability 479 * @param availableOrganizations the available organizations 480 * @return the intersection of <code>allOrganizations</code> and 481 <code>availableOrganizations</code> 482 */ 483 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 484 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 485 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 486 java.util.List<com.liferay.portal.model.Organization> availableOrganizations); 487 488 /** 489 * Returns all the organizations associated with the user. 490 * 491 * @param userId the primary key of the user 492 * @return the organizations associated with the user 493 * @throws PortalException if a user with the primary key could not be found 494 * @throws SystemException if a system exception occurred 495 */ 496 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 497 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 498 long userId) 499 throws com.liferay.portal.kernel.exception.PortalException, 500 com.liferay.portal.kernel.exception.SystemException; 501 502 /** 503 * Returns all the organizations associated with the user. If 504 * includeAdministrative is <code>true</code>, the result includes those 505 * organizations that are not directly associated to the user but he is an 506 * administrator or an owner of the organization. 507 * 508 * @param userId the primary key of the user 509 * @param includeAdministrative whether to includes organizations that are 510 indirectly associated to the user because he is an administrator 511 or an owner of the organization 512 * @return the organizations associated with the user 513 * @throws PortalException if a user with the primary key could not be found 514 * @throws SystemException if a system exception occurred 515 */ 516 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 517 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 518 long userId, boolean includeAdministrative) 519 throws com.liferay.portal.kernel.exception.PortalException, 520 com.liferay.portal.kernel.exception.SystemException; 521 522 /** 523 * Returns a range of all the organizations associated with the user. 524 * 525 * <p> 526 * Useful when paginating results. Returns a maximum of <code>end - 527 * start</code> instances. <code>start</code> and <code>end</code> are not 528 * primary keys, they are indexes in the result set. Thus, <code>0</code> 529 * refers to the first result in the set. Setting both <code>start</code> 530 * and <code>end</code> to {@link 531 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 532 * result set. 533 * </p> 534 * 535 * @param userId the primary key of the user 536 * @param start the lower bound of the range of organizations to return 537 * @param end the upper bound of the range of organizations to return (not 538 inclusive) 539 * @return the range organizations associated with the user 540 * @throws PortalException if a user with the primary key could not be found 541 * @throws SystemException if a system exception occurred 542 */ 543 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 544 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 545 long userId, int start, int end) 546 throws com.liferay.portal.kernel.exception.PortalException, 547 com.liferay.portal.kernel.exception.SystemException; 548 549 /** 550 * Returns the number of organizations associated with the user. 551 * 552 * @param userId the primary key of the user 553 * @return the number of organizations associated with the user 554 * @throws SystemException if a system exception occurred 555 */ 556 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 557 public int getUserOrganizationsCount(long userId) 558 throws com.liferay.portal.kernel.exception.SystemException; 559 560 /** 561 * Returns <code>true</code> if the organization belongs to the group. 562 * 563 * @param groupId the primary key of the group 564 * @param organizationId the primary key of the organization 565 * @return <code>true</code> if the organization belongs to the group; 566 <code>false</code> otherwise 567 * @throws SystemException if a system exception occurred 568 */ 569 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 570 public boolean hasGroupOrganization(long groupId, long organizationId) 571 throws com.liferay.portal.kernel.exception.SystemException; 572 573 /** 574 * Returns <code>true</code> if the password policy has been assigned to the 575 * organization. 576 * 577 * @param passwordPolicyId the primary key of the password policy 578 * @param organizationId the primary key of the organization 579 * @return <code>true</code> if the password policy has been assigned to the 580 organization; <code>false</code> otherwise 581 * @throws SystemException if a system exception occurred 582 */ 583 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 584 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 585 long organizationId) 586 throws com.liferay.portal.kernel.exception.SystemException; 587 588 /** 589 * Returns <code>true</code> if the user is a member of the organization. 590 * This method is usually called to determine if the user has view access to 591 * a resource belonging to the organization. 592 * 593 * @param userId the primary key of the user 594 * @param organizationId the primary key of the organization 595 * @return <code>true</code> if the user has access to the organization; 596 <code>false</code> otherwise 597 * @throws SystemException if a system exception occurred 598 */ 599 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 600 public boolean hasUserOrganization(long userId, long organizationId) 601 throws com.liferay.portal.kernel.exception.SystemException; 602 603 /** 604 * Returns <code>true</code> if the user is a member of the organization, 605 * optionally focusing on sub-organizations or the specified organization. 606 * This method is usually called to determine if the user has view access to 607 * a resource belonging to the organization. 608 * 609 * <p> 610 * 611 * <ol> 612 * <li> 613 * If <code>inheritSuborganizations=<code>false</code></code>: 614 * the method checks whether the user belongs to the organization specified 615 * by <code>organizationId</code>. The parameter 616 * <code>includeSpecifiedOrganization</code> is ignored. 617 * </li> 618 * <li> 619 * The parameter <code>includeSpecifiedOrganization</code> is 620 * ignored unless <code>inheritSuborganizations</code> is also 621 * <code>true</code>. 622 * </li> 623 * <li> 624 * If <code>inheritSuborganizations=<code>true</code></code> and 625 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 626 * checks 627 * whether the user belongs to one of the child organizations of the one 628 * specified by <code>organizationId</code>. 629 * </li> 630 * <li> 631 * If <code>inheritSuborganizations=<code>true</code></code> and 632 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 633 * checks whether 634 * the user belongs to the organization specified by 635 * <code>organizationId</code> or any of 636 * its child organizations. 637 * </li> 638 * </ol> 639 * 640 * <p> 641 * 642 * @param userId the primary key of the organization's user 643 * @param organizationId the primary key of the organization 644 * @param inheritSuborganizations if <code>true</code> sub-organizations 645 are considered in the determination 646 * @param includeSpecifiedOrganization if <code>true</code> the 647 organization specified by <code>organizationId</code> is 648 considered in the determination 649 * @return <code>true</code> if the user has access to the organization; 650 <code>false</code> otherwise 651 * @throws PortalException if an organization with the primary key could not 652 be found 653 * @throws SystemException if a system exception occurred 654 * @see com.liferay.portal.service.persistence.OrganizationFinder 655 */ 656 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 657 public boolean hasUserOrganization(long userId, long organizationId, 658 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 659 throws com.liferay.portal.kernel.exception.PortalException, 660 com.liferay.portal.kernel.exception.SystemException; 661 662 /** 663 * Rebuilds the organizations tree. 664 * 665 * <p> 666 * Only call this method if the tree has become stale through operations 667 * other than normal CRUD. Under normal circumstances the tree is 668 * automatically rebuilt whenever necessary. 669 * </p> 670 * 671 * @param companyId the primary key of the organization's company 672 * @throws PortalException if an organization with the primary key could not 673 be found 674 * @throws SystemException if a system exception occurred 675 */ 676 public void rebuildTree(long companyId) 677 throws com.liferay.portal.kernel.exception.PortalException, 678 com.liferay.portal.kernel.exception.SystemException; 679 680 /** 681 * Returns a range of all the organizations of the company. 682 * 683 * <p> 684 * Useful when paginating results. Returns a maximum of <code>end - 685 * start</code> instances. <code>start</code> and <code>end</code> are not 686 * primary keys, they are indexes in the result set. Thus, <code>0</code> 687 * refers to the first result in the set. Setting both <code>start</code> 688 * and <code>end</code> to {@link 689 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 690 * result set. 691 * </p> 692 * 693 * @param companyId the primary key of the company 694 * @param params the finder parameters (optionally <code>null</code>). For 695 more information see {@link 696 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 697 * @param start the lower bound of the range of organizations to return 698 * @param end the upper bound of the range of organizations to return (not 699 inclusive) 700 * @return the range of all the organizations of the company 701 * @throws SystemException if a system exception occurred 702 */ 703 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 704 public java.util.List<com.liferay.portal.model.Organization> search( 705 long companyId, 706 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 707 int start, int end) 708 throws com.liferay.portal.kernel.exception.SystemException; 709 710 /** 711 * Returns an ordered range of all the organizations that match the 712 * keywords, using the indexer. It is preferable to use this method instead 713 * of the non-indexed version whenever possible for performance reasons. 714 * 715 * <p> 716 * Useful when paginating results. Returns a maximum of <code>end - 717 * start</code> instances. <code>start</code> and <code>end</code> are not 718 * primary keys, they are indexes in the result set. Thus, <code>0</code> 719 * refers to the first result in the set. Setting both <code>start</code> 720 * and <code>end</code> to {@link 721 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 722 * result set. 723 * </p> 724 * 725 * @param companyId the primary key of the organization's company 726 * @param parentOrganizationId the primary key of the organization's parent 727 organization 728 * @param keywords the keywords (space separated), which may occur in the 729 organization's name, street, city, zipcode, type, region or 730 country (optionally <code>null</code>) 731 * @param params the finder parameters (optionally <code>null</code>). For 732 more information see {@link 733 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 734 * @param start the lower bound of the range of organizations to return 735 * @param end the upper bound of the range of organizations to return (not 736 inclusive) 737 * @param sort the field and direction by which to sort (optionally 738 <code>null</code>) 739 * @return the matching organizations ordered by name 740 * @throws SystemException if a system exception occurred 741 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 742 */ 743 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 744 public com.liferay.portal.kernel.search.Hits search(long companyId, 745 long parentOrganizationId, java.lang.String keywords, 746 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 747 int start, int end, com.liferay.portal.kernel.search.Sort sort) 748 throws com.liferay.portal.kernel.exception.SystemException; 749 750 /** 751 * Returns a name ordered range of all the organizations that match the 752 * keywords, type, region, and country, without using the indexer. It is 753 * preferable to use the indexed version {@link #search(long, long, String, 754 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 755 * for performance reasons. 756 * 757 * <p> 758 * Useful when paginating results. Returns a maximum of <code>end - 759 * start</code> instances. <code>start</code> and <code>end</code> are not 760 * primary keys, they are indexes in the result set. Thus, <code>0</code> 761 * refers to the first result in the set. Setting both <code>start</code> 762 * and <code>end</code> to {@link 763 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 764 * result set. 765 * </p> 766 * 767 * @param companyId the primary key of the organization's company 768 * @param parentOrganizationId the primary key of the organization's parent 769 organization 770 * @param keywords the keywords (space separated), which may occur in the 771 organization's name, street, city, or zipcode (optionally 772 <code>null</code>) 773 * @param type the organization's type (optionally <code>null</code>) 774 * @param regionId the primary key of the organization's region (optionally 775 <code>null</code>) 776 * @param countryId the primary key of the organization's country 777 (optionally <code>null</code>) 778 * @param params the finder params. For more information see {@link 779 com.liferay.portal.service.persistence.OrganizationFinder} 780 * @param start the lower bound of the range of organizations to return 781 * @param end the upper bound of the range of organizations to return (not 782 inclusive) 783 * @return the matching organizations ordered by name 784 * @throws SystemException if a system exception occurred 785 * @see com.liferay.portal.service.persistence.OrganizationFinder 786 */ 787 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 788 public java.util.List<com.liferay.portal.model.Organization> search( 789 long companyId, long parentOrganizationId, java.lang.String keywords, 790 java.lang.String type, java.lang.Long regionId, 791 java.lang.Long countryId, 792 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 793 int start, int end) 794 throws com.liferay.portal.kernel.exception.SystemException; 795 796 /** 797 * Returns an ordered range of all the organizations that match the 798 * keywords, type, region, and country, without using the indexer. It is 799 * preferable to use the indexed version {@link #search(long, long, String, 800 * String, String, String, String, String, String, LinkedHashMap, boolean, 801 * int, int, Sort)} instead of this method wherever possible for performance 802 * reasons. 803 * 804 * <p> 805 * Useful when paginating results. Returns a maximum of <code>end - 806 * start</code> instances. <code>start</code> and <code>end</code> are not 807 * primary keys, they are indexes in the result set. Thus, <code>0</code> 808 * refers to the first result in the set. Setting both <code>start</code> 809 * and <code>end</code> to {@link 810 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 811 * result set. 812 * </p> 813 * 814 * @param companyId the primary key of the organization's company 815 * @param parentOrganizationId the primary key of the organization's parent 816 organization 817 * @param keywords the keywords (space separated), which may occur in the 818 organization's name, street, city, or zipcode (optionally 819 <code>null</code>) 820 * @param type the organization's type (optionally <code>null</code>) 821 * @param regionId the primary key of the organization's region (optionally 822 <code>null</code>) 823 * @param countryId the primary key of the organization's country 824 (optionally <code>null</code>) 825 * @param params the finder params. For more information see {@link 826 com.liferay.portal.service.persistence.OrganizationFinder} 827 * @param start the lower bound of the range of organizations to return 828 * @param end the upper bound of the range of organizations to return (not 829 inclusive) 830 * @param obc the comparator to order the organizations (optionally 831 <code>null</code>) 832 * @return the matching organizations ordered by comparator <code>obc</code> 833 * @throws SystemException if a system exception occurred 834 * @see com.liferay.portal.service.persistence.OrganizationFinder 835 */ 836 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 837 public java.util.List<com.liferay.portal.model.Organization> search( 838 long companyId, long parentOrganizationId, java.lang.String keywords, 839 java.lang.String type, java.lang.Long regionId, 840 java.lang.Long countryId, 841 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 842 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 843 throws com.liferay.portal.kernel.exception.SystemException; 844 845 /** 846 * Returns a name ordered range of all the organizations with the type, 847 * region, and country, and whose name, street, city, and zipcode match the 848 * keywords specified for them, without using the indexer. It is preferable 849 * to use the indexed version {@link #search(long, long, String, String, 850 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 851 * Sort)} instead of this method wherever possible for performance reasons. 852 * 853 * <p> 854 * Useful when paginating results. Returns a maximum of <code>end - 855 * start</code> instances. <code>start</code> and <code>end</code> are not 856 * primary keys, they are indexes in the result set. Thus, <code>0</code> 857 * refers to the first result in the set. Setting both <code>start</code> 858 * and <code>end</code> to {@link 859 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 860 * result set. 861 * </p> 862 * 863 * @param companyId the primary key of the organization's company 864 * @param parentOrganizationId the primary key of the organization's parent 865 * @param name the name keywords (space separated, optionally 866 <code>null</code>) 867 * @param type the organization's type (optionally <code>null</code>) 868 * @param street the street keywords (optionally <code>null</code>) 869 * @param city the city keywords (optionally <code>null</code>) 870 * @param zip the zipcode keywords (optionally <code>null</code>) 871 * @param regionId the primary key of the organization's region (optionally 872 <code>null</code>) 873 * @param countryId the primary key of the organization's country 874 (optionally <code>null</code>) 875 * @param params the finder parameters (optionally <code>null</code>). For 876 more information see {@link 877 com.liferay.portal.service.persistence.OrganizationFinder} 878 * @param andOperator whether every field must match its keywords, or just 879 one field. For example, "organizations with the name 880 'Employees' and city 'Chicago'" vs "organizations with 881 the name 'Employees' or the city 'Chicago'". 882 * @param start the lower bound of the range of organizations to return 883 * @param end the upper bound of the range of organizations to return (not 884 inclusive) 885 * @return the matching organizations ordered by name 886 * @throws SystemException if a system exception occurred 887 * @see com.liferay.portal.service.persistence.OrganizationFinder 888 */ 889 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 890 public java.util.List<com.liferay.portal.model.Organization> search( 891 long companyId, long parentOrganizationId, java.lang.String name, 892 java.lang.String type, java.lang.String street, java.lang.String city, 893 java.lang.String zip, java.lang.Long regionId, 894 java.lang.Long countryId, 895 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 896 boolean andOperator, int start, int end) 897 throws com.liferay.portal.kernel.exception.SystemException; 898 899 /** 900 * Returns an ordered range of all the organizations with the type, region, 901 * and country, and whose name, street, city, and zipcode match the keywords 902 * specified for them, without using the indexer. It is preferable to use 903 * the indexed version {@link #search(long, long, String, String, String, 904 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 905 * instead of this method wherever possible for performance reasons. 906 * 907 * <p> 908 * Useful when paginating results. Returns a maximum of <code>end - 909 * start</code> instances. <code>start</code> and <code>end</code> are not 910 * primary keys, they are indexes in the result set. Thus, <code>0</code> 911 * refers to the first result in the set. Setting both <code>start</code> 912 * and <code>end</code> to {@link 913 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 914 * result set. 915 * </p> 916 * 917 * @param companyId the primary key of the organization's company 918 * @param parentOrganizationId the primary key of the organization's parent 919 organization 920 * @param name the name keywords (space separated, optionally 921 <code>null</code>) 922 * @param type the organization's type (optionally <code>null</code>) 923 * @param street the street keywords (optionally <code>null</code>) 924 * @param city the city keywords (optionally <code>null</code>) 925 * @param zip the zipcode keywords (optionally <code>null</code>) 926 * @param regionId the primary key of the organization's region (optionally 927 <code>null</code>) 928 * @param countryId the primary key of the organization's country 929 (optionally <code>null</code>) 930 * @param params the finder parameters (optionally <code>null</code>). For 931 more information see {@link 932 com.liferay.portal.service.persistence.OrganizationFinder} 933 * @param andOperator whether every field must match its keywords, or just 934 one field. For example, "organizations with the name 935 'Employees' and city 'Chicago'" vs "organizations with 936 the name 'Employees' or the city 'Chicago'". 937 * @param start the lower bound of the range of organizations to return 938 * @param end the upper bound of the range of organizations to return (not 939 inclusive) 940 * @param obc the comparator to order the organizations (optionally 941 <code>null</code>) 942 * @return the matching organizations ordered by comparator <code>obc</code> 943 * @throws SystemException if a system exception occurred 944 * @see com.liferay.portal.service.persistence.OrganizationFinder 945 */ 946 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 947 public java.util.List<com.liferay.portal.model.Organization> search( 948 long companyId, long parentOrganizationId, java.lang.String name, 949 java.lang.String type, java.lang.String street, java.lang.String city, 950 java.lang.String zip, java.lang.Long regionId, 951 java.lang.Long countryId, 952 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 953 boolean andOperator, int start, int end, 954 com.liferay.portal.kernel.util.OrderByComparator obc) 955 throws com.liferay.portal.kernel.exception.SystemException; 956 957 /** 958 * Returns an ordered range of all the organizations whose name, type, or 959 * location fields match the keywords specified for them, using the indexer. 960 * It is preferable to use this method instead of the non-indexed version 961 * whenever possible for performance reasons. 962 * 963 * <p> 964 * Useful when paginating results. Returns a maximum of <code>end - 965 * start</code> instances. <code>start</code> and <code>end</code> are not 966 * primary keys, they are indexes in the result set. Thus, <code>0</code> 967 * refers to the first result in the set. Setting both <code>start</code> 968 * and <code>end</code> to {@link 969 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 970 * result set. 971 * </p> 972 * 973 * @param companyId the primary key of the organization's company 974 * @param parentOrganizationId the primary key of the organization's parent 975 organization 976 * @param name the name keywords (space separated, optionally 977 <code>null</code>) 978 * @param type the type keywords (optionally <code>null</code>) 979 * @param street the street keywords (optionally <code>null</code>) 980 * @param city the city keywords (optionally <code>null</code>) 981 * @param zip the zipcode keywords (optionally <code>null</code>) 982 * @param region the region keywords (optionally <code>null</code>) 983 * @param country the country keywords (optionally <code>null</code>) 984 * @param params the finder parameters (optionally <code>null</code>). For 985 more information see {@link 986 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 987 * @param andSearch whether every field must match its keywords or just one 988 field 989 * @param start the lower bound of the range of organizations to return 990 * @param end the upper bound of the range of organizations to return (not 991 inclusive) 992 * @param sort the field and direction by which to sort (optionally 993 <code>null</code>) 994 * @return the matching organizations ordered by <code>sort</code> 995 * @throws SystemException if a system exception occurred 996 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 997 */ 998 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 999 public com.liferay.portal.kernel.search.Hits search(long companyId, 1000 long parentOrganizationId, java.lang.String name, 1001 java.lang.String type, java.lang.String street, java.lang.String city, 1002 java.lang.String zip, java.lang.String region, 1003 java.lang.String country, 1004 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1005 boolean andSearch, int start, int end, 1006 com.liferay.portal.kernel.search.Sort sort) 1007 throws com.liferay.portal.kernel.exception.SystemException; 1008 1009 /** 1010 * Returns the number of organizations that match the keywords, type, 1011 * region, and country. 1012 * 1013 * @param companyId the primary key of the organization's company 1014 * @param parentOrganizationId the primary key of the organization's parent 1015 organization 1016 * @param keywords the keywords (space separated), which may occur in the 1017 organization's name, street, city, or zipcode (optionally 1018 <code>null</code>) 1019 * @param type the organization's type (optionally <code>null</code>) 1020 * @param regionId the primary key of the organization's region (optionally 1021 <code>null</code>) 1022 * @param countryId the primary key of the organization's country 1023 (optionally <code>null</code>) 1024 * @param params the finder parameters (optionally <code>null</code>). For 1025 more information see {@link 1026 com.liferay.portal.service.persistence.OrganizationFinder} 1027 * @return the number of matching organizations 1028 * @throws SystemException if a system exception occurred 1029 * @see com.liferay.portal.service.persistence.OrganizationFinder 1030 */ 1031 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1032 public int searchCount(long companyId, long parentOrganizationId, 1033 java.lang.String keywords, java.lang.String type, 1034 java.lang.Long regionId, java.lang.Long countryId, 1035 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1036 throws com.liferay.portal.kernel.exception.SystemException; 1037 1038 /** 1039 * Returns the number of organizations with the type, region, and country, 1040 * and whose name, street, city, and zipcode match the keywords specified 1041 * for them. 1042 * 1043 * @param companyId the primary key of the organization's company 1044 * @param parentOrganizationId the primary key of the organization's parent 1045 organization 1046 * @param name the name keywords (space separated, optionally 1047 <code>null</code>) 1048 * @param type the organization's type (optionally <code>null</code>) 1049 * @param street the street keywords (optionally <code>null</code>) 1050 * @param city the city keywords (optionally <code>null</code>) 1051 * @param zip the zipcode keywords (optionally <code>null</code>) 1052 * @param regionId the primary key of the organization's region (optionally 1053 <code>null</code>) 1054 * @param countryId the primary key of the organization's country 1055 (optionally <code>null</code>) 1056 * @param params the finder parameters (optionally <code>null</code>). For 1057 more information see {@link 1058 com.liferay.portal.service.persistence.OrganizationFinder} 1059 * @param andOperator whether every field must match its keywords, or just 1060 one field. For example, "organizations with the name 1061 'Employees' and city 'Chicago'" vs "organizations with 1062 the name 'Employees' or the city 'Chicago'". 1063 * @return the number of matching organizations 1064 * @throws SystemException if a system exception occurred 1065 * @see com.liferay.portal.service.persistence.OrganizationFinder 1066 */ 1067 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1068 public int searchCount(long companyId, long parentOrganizationId, 1069 java.lang.String name, java.lang.String type, java.lang.String street, 1070 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1071 java.lang.Long countryId, 1072 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1073 boolean andOperator) 1074 throws com.liferay.portal.kernel.exception.SystemException; 1075 1076 /** 1077 * Sets the organizations in the group, removing and adding organizations to 1078 * the group as necessary. 1079 * 1080 * @param groupId the primary key of the group 1081 * @param organizationIds the primary keys of the organizations 1082 * @throws PortalException if a portal exception occurred 1083 * @throws SystemException if a system exception occurred 1084 */ 1085 public void setGroupOrganizations(long groupId, long[] organizationIds) 1086 throws com.liferay.portal.kernel.exception.PortalException, 1087 com.liferay.portal.kernel.exception.SystemException; 1088 1089 /** 1090 * Removes the organizations from the group. 1091 * 1092 * @param groupId the primary key of the group 1093 * @param organizationIds the primary keys of the organizations 1094 * @throws PortalException if a portal exception occurred 1095 * @throws SystemException if a system exception occurred 1096 */ 1097 public void unsetGroupOrganizations(long groupId, long[] organizationIds) 1098 throws com.liferay.portal.kernel.exception.PortalException, 1099 com.liferay.portal.kernel.exception.SystemException; 1100 1101 /** 1102 * Removes the organizations from the password policy. 1103 * 1104 * @param passwordPolicyId the primary key of the password policy 1105 * @param organizationIds the primary keys of the organizations 1106 * @throws SystemException if a system exception occurred 1107 */ 1108 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1109 long[] organizationIds) 1110 throws com.liferay.portal.kernel.exception.SystemException; 1111 1112 /** 1113 * Updates the organization's asset with the new asset categories and tag 1114 * names, removing and adding asset categories and tag names as necessary. 1115 * 1116 * @param userId the primary key of the user 1117 * @param organization the organization 1118 * @param assetCategoryIds the primary keys of the asset categories 1119 * @param assetTagNames the asset tag names 1120 * @throws PortalException if a user with the primary key could not be found 1121 * @throws SystemException if a system exception occurred 1122 */ 1123 public void updateAsset(long userId, 1124 com.liferay.portal.model.Organization organization, 1125 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1126 throws com.liferay.portal.kernel.exception.PortalException, 1127 com.liferay.portal.kernel.exception.SystemException; 1128 1129 /** 1130 * Updates the organization. 1131 * 1132 * @param companyId the primary key of the organization's company 1133 * @param organizationId the primary key of the organization 1134 * @param parentOrganizationId the primary key of organization's parent 1135 organization 1136 * @param name the organization's name 1137 * @param type the organization's type 1138 * @param recursable whether permissions of the organization are to be 1139 inherited by its sub-organizations 1140 * @param regionId the primary key of the organization's region 1141 * @param countryId the primary key of the organization's country 1142 * @param statusId the organization's workflow status 1143 * @param comments the comments about the organization 1144 * @param site whether the organization is to be associated with a main 1145 site 1146 * @param serviceContext the organization's service context (optionally 1147 <code>null</code>). Can set asset category IDs and asset tag 1148 names for the organization, and merge expando bridge attributes 1149 for the organization. 1150 * @return the organization 1151 * @throws PortalException if an organization or parent organization with 1152 the primary key could not be found or if the new information was 1153 invalid 1154 * @throws SystemException if a system exception occurred 1155 */ 1156 public com.liferay.portal.model.Organization updateOrganization( 1157 long companyId, long organizationId, long parentOrganizationId, 1158 java.lang.String name, java.lang.String type, boolean recursable, 1159 long regionId, long countryId, int statusId, java.lang.String comments, 1160 boolean site, com.liferay.portal.service.ServiceContext serviceContext) 1161 throws com.liferay.portal.kernel.exception.PortalException, 1162 com.liferay.portal.kernel.exception.SystemException; 1163 }