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