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