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.portlet.social.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the remote service utility for SocialActivity. This utility wraps 024 * {@link com.liferay.portlet.social.service.impl.SocialActivityServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on a remote server. Methods of this service are expected to have security 027 * checks based on the propagated JAAS credentials because this service can be 028 * accessed remotely. 029 * 030 * @author Brian Wing Shun Chan 031 * @see SocialActivityService 032 * @see com.liferay.portlet.social.service.base.SocialActivityServiceBaseImpl 033 * @see com.liferay.portlet.social.service.impl.SocialActivityServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class SocialActivityServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Returns a range of all the activities done on assets identified by the 046 * class name. 047 * 048 * <p> 049 * Useful when paginating results. Returns a maximum of <code>end - 050 * start</code> instances. <code>start</code> and <code>end</code> are not 051 * primary keys, they are indexes in the result set. Thus, <code>0</code> 052 * refers to the first result in the set. Setting both <code>start</code> 053 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 054 * result set. 055 * </p> 056 * 057 * @param className the target asset's class name 058 * @param start the lower bound of the range of results 059 * @param end the upper bound of the range of results (not inclusive) 060 * @return the range of matching activities 061 */ 062 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 063 java.lang.String className, int start, int end) 064 throws com.liferay.portal.kernel.exception.PortalException { 065 return getService().getActivities(className, start, end); 066 } 067 068 /** 069 * Returns a range of all the activities done on assets identified by the 070 * class name ID. 071 * 072 * <p> 073 * Useful when paginating results. Returns a maximum of <code>end - 074 * start</code> instances. <code>start</code> and <code>end</code> are not 075 * primary keys, they are indexes in the result set. Thus, <code>0</code> 076 * refers to the first result in the set. Setting both <code>start</code> 077 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 078 * result set. 079 * </p> 080 * 081 * @param classNameId the target asset's class name ID 082 * @param start the lower bound of the range of results 083 * @param end the upper bound of the range of results (not inclusive) 084 * @return the range of matching activities 085 */ 086 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 087 long classNameId, int start, int end) 088 throws com.liferay.portal.kernel.exception.PortalException { 089 return getService().getActivities(classNameId, start, end); 090 } 091 092 /** 093 * Returns a range of all the activities done on the asset identified by the 094 * class name and the class primary key that are mirrors of the activity 095 * identified by the mirror activity ID. 096 * 097 * <p> 098 * Useful when paginating results. Returns a maximum of <code>end - 099 * start</code> instances. <code>start</code> and <code>end</code> are not 100 * primary keys, they are indexes in the result set. Thus, <code>0</code> 101 * refers to the first result in the set. Setting both <code>start</code> 102 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 103 * result set. 104 * </p> 105 * 106 * @param mirrorActivityId the primary key of the mirror activity 107 * @param className the target asset's class name 108 * @param classPK the primary key of the target asset 109 * @param start the lower bound of the range of results 110 * @param end the upper bound of the range of results (not inclusive) 111 * @return the range of matching activities 112 */ 113 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 114 long mirrorActivityId, java.lang.String className, long classPK, 115 int start, int end) 116 throws com.liferay.portal.kernel.exception.PortalException { 117 return getService() 118 .getActivities(mirrorActivityId, className, classPK, start, 119 end); 120 } 121 122 /** 123 * Returns a range of all the activities done on the asset identified by the 124 * class name ID and class primary key that are mirrors of the activity 125 * identified by the mirror activity ID. 126 * 127 * <p> 128 * Useful when paginating results. Returns a maximum of <code>end - 129 * start</code> instances. <code>start</code> and <code>end</code> are not 130 * primary keys, they are indexes in the result set. Thus, <code>0</code> 131 * refers to the first result in the set. Setting both <code>start</code> 132 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 133 * result set. 134 * </p> 135 * 136 * @param mirrorActivityId the primary key of the mirror activity 137 * @param classNameId the target asset's class name ID 138 * @param classPK the primary key of the target asset 139 * @param start the lower bound of the range of results 140 * @param end the upper bound of the range of results (not inclusive) 141 * @return the range of matching activities 142 */ 143 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 144 long mirrorActivityId, long classNameId, long classPK, int start, 145 int end) throws com.liferay.portal.kernel.exception.PortalException { 146 return getService() 147 .getActivities(mirrorActivityId, classNameId, classPK, 148 start, end); 149 } 150 151 /** 152 * Returns the number of activities done on assets identified by class name. 153 * 154 * @param className the target asset's class name 155 * @return the number of matching activities 156 */ 157 public static int getActivitiesCount(java.lang.String className) { 158 return getService().getActivitiesCount(className); 159 } 160 161 /** 162 * Returns the number of activities done on assets identified by the class 163 * name ID. 164 * 165 * @param classNameId the target asset's class name ID 166 * @return the number of matching activities 167 */ 168 public static int getActivitiesCount(long classNameId) { 169 return getService().getActivitiesCount(classNameId); 170 } 171 172 /** 173 * Returns the number of activities done on the asset identified by the 174 * class name and class primary key that are mirrors of the activity 175 * identified by the mirror activity ID. 176 * 177 * @param mirrorActivityId the primary key of the mirror activity 178 * @param className the target asset's class name 179 * @param classPK the primary key of the target asset 180 * @return the number of matching activities 181 */ 182 public static int getActivitiesCount(long mirrorActivityId, 183 java.lang.String className, long classPK) { 184 return getService() 185 .getActivitiesCount(mirrorActivityId, className, classPK); 186 } 187 188 /** 189 * Returns the number of activities done on the asset identified by the 190 * class name ID and class primary key that are mirrors of the activity 191 * identified by the mirror activity ID. 192 * 193 * @param mirrorActivityId the primary key of the mirror activity 194 * @param classNameId the target asset's class name ID 195 * @param classPK the primary key of the target asset 196 * @return the number of matching activities 197 */ 198 public static int getActivitiesCount(long mirrorActivityId, 199 long classNameId, long classPK) { 200 return getService() 201 .getActivitiesCount(mirrorActivityId, classNameId, classPK); 202 } 203 204 /** 205 * Returns the activity identified by its primary key. 206 * 207 * @param activityId the primary key of the activity 208 * @return Returns the activity 209 */ 210 public static com.liferay.portlet.social.model.SocialActivity getActivity( 211 long activityId) 212 throws com.liferay.portal.kernel.exception.PortalException { 213 return getService().getActivity(activityId); 214 } 215 216 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities( 217 long activitySetId, int start, int end) 218 throws com.liferay.portal.kernel.exception.PortalException { 219 return getService().getActivitySetActivities(activitySetId, start, end); 220 } 221 222 /** 223 * Returns a range of all the activities done in the group. 224 * 225 * <p> 226 * This method only finds activities without mirrors. 227 * </p> 228 * 229 * <p> 230 * Useful when paginating results. Returns a maximum of <code>end - 231 * start</code> instances. <code>start</code> and <code>end</code> are not 232 * primary keys, they are indexes in the result set. Thus, <code>0</code> 233 * refers to the first result in the set. Setting both <code>start</code> 234 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 235 * result set. 236 * </p> 237 * 238 * @param groupId the primary key of the group 239 * @param start the lower bound of the range of results 240 * @param end the upper bound of the range of results (not inclusive) 241 * @return the range of matching activities 242 */ 243 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities( 244 long groupId, int start, int end) 245 throws com.liferay.portal.kernel.exception.PortalException { 246 return getService().getGroupActivities(groupId, start, end); 247 } 248 249 /** 250 * Returns the number of activities done in the group. 251 * 252 * <p> 253 * This method only counts activities without mirrors. 254 * </p> 255 * 256 * @param groupId the primary key of the group 257 * @return the number of matching activities 258 */ 259 public static int getGroupActivitiesCount(long groupId) { 260 return getService().getGroupActivitiesCount(groupId); 261 } 262 263 /** 264 * Returns a range of activities done by users that are members of the 265 * group. 266 * 267 * <p> 268 * This method only finds activities without mirrors. 269 * </p> 270 * 271 * <p> 272 * Useful when paginating results. Returns a maximum of <code>end - 273 * start</code> instances. <code>start</code> and <code>end</code> are not 274 * primary keys, they are indexes in the result set. Thus, <code>0</code> 275 * refers to the first result in the set. Setting both <code>start</code> 276 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 277 * result set. 278 * </p> 279 * 280 * @param groupId the primary key of the group 281 * @param start the lower bound of the range of results 282 * @param end the upper bound of the range of results (not inclusive) 283 * @return the range of matching activities 284 */ 285 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities( 286 long groupId, int start, int end) 287 throws com.liferay.portal.kernel.exception.PortalException { 288 return getService().getGroupUsersActivities(groupId, start, end); 289 } 290 291 /** 292 * Returns the number of activities done by users that are members of the 293 * group. 294 * 295 * <p> 296 * This method only counts activities without mirrors. 297 * </p> 298 * 299 * @param groupId the primary key of the group 300 * @return the number of matching activities 301 */ 302 public static int getGroupUsersActivitiesCount(long groupId) { 303 return getService().getGroupUsersActivitiesCount(groupId); 304 } 305 306 /** 307 * Returns the activity that has the mirror activity. 308 * 309 * @param mirrorActivityId the primary key of the mirror activity 310 * @return Returns the mirror activity 311 */ 312 public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity( 313 long mirrorActivityId) 314 throws com.liferay.portal.kernel.exception.PortalException { 315 return getService().getMirrorActivity(mirrorActivityId); 316 } 317 318 /** 319 * Returns the OSGi service identifier. 320 * 321 * @return the OSGi service identifier 322 */ 323 public static java.lang.String getOSGiServiceIdentifier() { 324 return getService().getOSGiServiceIdentifier(); 325 } 326 327 /** 328 * Returns a range of all the activities done in the organization. This 329 * method only finds activities without mirrors. 330 * 331 * <p> 332 * Useful when paginating results. Returns a maximum of <code>end - 333 * start</code> instances. <code>start</code> and <code>end</code> are not 334 * primary keys, they are indexes in the result set. Thus, <code>0</code> 335 * refers to the first result in the set. Setting both <code>start</code> 336 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 337 * result set. 338 * </p> 339 * 340 * @param organizationId the primary key of the organization 341 * @param start the lower bound of the range of results 342 * @param end the upper bound of the range of results (not inclusive) 343 * @return the range of matching activities 344 */ 345 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities( 346 long organizationId, int start, int end) 347 throws com.liferay.portal.kernel.exception.PortalException { 348 return getService().getOrganizationActivities(organizationId, start, end); 349 } 350 351 /** 352 * Returns the number of activities done in the organization. This method 353 * only counts activities without mirrors. 354 * 355 * @param organizationId the primary key of the organization 356 * @return the number of matching activities 357 */ 358 public static int getOrganizationActivitiesCount(long organizationId) { 359 return getService().getOrganizationActivitiesCount(organizationId); 360 } 361 362 /** 363 * Returns a range of all the activities done by users of the organization. 364 * This method only finds activities without mirrors. 365 * 366 * <p> 367 * Useful when paginating results. Returns a maximum of <code>end - 368 * start</code> instances. <code>start</code> and <code>end</code> are not 369 * primary keys, they are indexes in the result set. Thus, <code>0</code> 370 * refers to the first result in the set. Setting both <code>start</code> 371 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 372 * result set. 373 * </p> 374 * 375 * @param organizationId the primary key of the organization 376 * @param start the lower bound of the range of results 377 * @param end the upper bound of the range of results (not inclusive) 378 * @return the range of matching activities 379 */ 380 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities( 381 long organizationId, int start, int end) 382 throws com.liferay.portal.kernel.exception.PortalException { 383 return getService() 384 .getOrganizationUsersActivities(organizationId, start, end); 385 } 386 387 /** 388 * Returns the number of activities done by users of the organization. This 389 * method only counts activities without mirrors. 390 * 391 * @param organizationId the primary key of the organization 392 * @return the number of matching activities 393 */ 394 public static int getOrganizationUsersActivitiesCount(long organizationId) { 395 return getService().getOrganizationUsersActivitiesCount(organizationId); 396 } 397 398 /** 399 * Returns a range of all the activities done by users in a relationship 400 * with the user identified by the user ID. 401 * 402 * <p> 403 * Useful when paginating results. Returns a maximum of <code>end - 404 * start</code> instances. <code>start</code> and <code>end</code> are not 405 * primary keys, they are indexes in the result set. Thus, <>0</code> refers 406 * to the first result in the set. Setting both <code>start</code> and 407 * <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result 408 * set. 409 * </p> 410 * 411 * @param userId the primary key of the user 412 * @param start the lower bound of the range of results 413 * @param end the upper bound of the range of results (not inclusive) 414 * @return the range of matching activities 415 */ 416 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 417 long userId, int start, int end) 418 throws com.liferay.portal.kernel.exception.PortalException { 419 return getService().getRelationActivities(userId, start, end); 420 } 421 422 /** 423 * Returns a range of all the activities done by users in a relationship of 424 * type <code>type</code> with the user identified by <code>userId</code>. 425 * This method only finds activities without mirrors. 426 * 427 * <p> 428 * Useful when paginating results. Returns a maximum of <code>end - 429 * start</code> instances. <code>start</code> and <code>end</code> are not 430 * primary keys, they are indexes in the result set. Thus, <code>0</code> 431 * refers to the first result in the set. Setting both <code>start</code> 432 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 433 * result set. 434 * </p> 435 * 436 * @param userId the primary key of the user 437 * @param type the relationship type 438 * @param start the lower bound of the range of results 439 * @param end the upper bound of the range of results (not inclusive) 440 * @return the range of matching activities 441 */ 442 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 443 long userId, int type, int start, int end) 444 throws com.liferay.portal.kernel.exception.PortalException { 445 return getService().getRelationActivities(userId, type, start, end); 446 } 447 448 /** 449 * Returns the number of activities done by users in a relationship with the 450 * user identified by userId. 451 * 452 * @param userId the primary key of the user 453 * @return the number of matching activities 454 */ 455 public static int getRelationActivitiesCount(long userId) { 456 return getService().getRelationActivitiesCount(userId); 457 } 458 459 /** 460 * Returns the number of activities done by users in a relationship of type 461 * <code>type</code> with the user identified by <code>userId</code>. This 462 * method only counts activities without mirrors. 463 * 464 * @param userId the primary key of the user 465 * @param type the relationship type 466 * @return the number of matching activities 467 */ 468 public static int getRelationActivitiesCount(long userId, int type) { 469 return getService().getRelationActivitiesCount(userId, type); 470 } 471 472 /** 473 * Returns a range of all the activities done by the user. 474 * 475 * <p> 476 * Useful when paginating results. Returns a maximum of <code>end - 477 * start</code> instances. <code>start</code> and <code>end</code> are not 478 * primary keys, they are indexes in the result set. Thus, <code>0</code> 479 * refers to the first result in the set. Setting both <code>start</code> 480 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 481 * result set. 482 * </p> 483 * 484 * @param userId the primary key of the user 485 * @param start the lower bound of the range of results 486 * @param end the upper bound of the range of results (not inclusive) 487 * @return the range of matching activities 488 */ 489 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities( 490 long userId, int start, int end) 491 throws com.liferay.portal.kernel.exception.PortalException { 492 return getService().getUserActivities(userId, start, end); 493 } 494 495 /** 496 * Returns the number of activities done by the user. 497 * 498 * @param userId the primary key of the user 499 * @return the number of matching activities 500 */ 501 public static int getUserActivitiesCount(long userId) { 502 return getService().getUserActivitiesCount(userId); 503 } 504 505 /** 506 * Returns a range of all the activities done in the user's groups. This 507 * method only finds activities without mirrors. 508 * 509 * <p> 510 * Useful when paginating results. Returns a maximum of <code>end - 511 * start</code> instances. <code>start</code> and <code>end</code> are not 512 * primary keys, they are indexes in the result set. Thus, <code>0</code> 513 * refers to the first result in the set. Setting both <code>start</code> 514 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 515 * result set. 516 * </p> 517 * 518 * @param userId the primary key of the user 519 * @param start the lower bound of the range of results 520 * @param end the upper bound of the range of results (not inclusive) 521 * @return the range of matching activities 522 */ 523 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities( 524 long userId, int start, int end) 525 throws com.liferay.portal.kernel.exception.PortalException { 526 return getService().getUserGroupsActivities(userId, start, end); 527 } 528 529 /** 530 * Returns the number of activities done in user's groups. This method only 531 * counts activities without mirrors. 532 * 533 * @param userId the primary key of the user 534 * @return the number of matching activities 535 */ 536 public static int getUserGroupsActivitiesCount(long userId) { 537 return getService().getUserGroupsActivitiesCount(userId); 538 } 539 540 /** 541 * Returns a range of all the activities done in the user's groups and 542 * organizations. This method only finds activities without mirrors. 543 * 544 * <p> 545 * Useful when paginating results. Returns a maximum of <code>end - 546 * start</code> instances. <code>start</code> and <code>end</code> are not 547 * primary keys, they are indexes in the result set. Thus, <code>0</code> 548 * refers to the first result in the set. Setting both <code>start</code> 549 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 550 * result set. 551 * </p> 552 * 553 * @param userId the primary key of the user 554 * @param start the lower bound of the range of results 555 * @param end the upper bound of the range of results (not inclusive) 556 * @return the range of matching activities 557 */ 558 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities( 559 long userId, int start, int end) 560 throws com.liferay.portal.kernel.exception.PortalException { 561 return getService() 562 .getUserGroupsAndOrganizationsActivities(userId, start, end); 563 } 564 565 /** 566 * Returns the number of activities done in user's groups and organizations. 567 * This method only counts activities without mirrors. 568 * 569 * @param userId the primary key of the user 570 * @return the number of matching activities 571 */ 572 public static int getUserGroupsAndOrganizationsActivitiesCount(long userId) { 573 return getService().getUserGroupsAndOrganizationsActivitiesCount(userId); 574 } 575 576 /** 577 * Returns a range of all activities done in the user's organizations. This 578 * method only finds activities without mirrors. 579 * 580 * <p> 581 * Useful when paginating results. Returns a maximum of <code>end - 582 * start</code> instances. <code>start</code> and <code>end</code> are not 583 * primary keys, they are indexes in the result set. Thus, <code>0</code> 584 * refers to the first result in the set. Setting both <code>start</code> 585 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 586 * result set. 587 * </p> 588 * 589 * @param userId the primary key of the user 590 * @param start the lower bound of the range of results 591 * @param end the upper bound of the range of results (not inclusive) 592 * @return the range of matching activities 593 */ 594 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities( 595 long userId, int start, int end) 596 throws com.liferay.portal.kernel.exception.PortalException { 597 return getService().getUserOrganizationsActivities(userId, start, end); 598 } 599 600 /** 601 * Returns the number of activities done in the user's organizations. This 602 * method only counts activities without mirrors. 603 * 604 * @param userId the primary key of the user 605 * @return the number of matching activities 606 */ 607 public static int getUserOrganizationsActivitiesCount(long userId) { 608 return getService().getUserOrganizationsActivitiesCount(userId); 609 } 610 611 public static SocialActivityService getService() { 612 if (_service == null) { 613 _service = (SocialActivityService)PortalBeanLocatorUtil.locate(SocialActivityService.class.getName()); 614 615 ReferenceRegistry.registerReference(SocialActivityServiceUtil.class, 616 "_service"); 617 } 618 619 return _service; 620 } 621 622 private static SocialActivityService _service; 623 }