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