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