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