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.dao.orm.ActionableDynamicQuery;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.Projection;
023    import com.liferay.portal.kernel.exception.PortalException;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.search.Indexable;
026    import com.liferay.portal.kernel.search.IndexableType;
027    import com.liferay.portal.kernel.transaction.Isolation;
028    import com.liferay.portal.kernel.transaction.Propagation;
029    import com.liferay.portal.kernel.transaction.Transactional;
030    import com.liferay.portal.kernel.util.OrderByComparator;
031    import com.liferay.portal.model.PersistedModel;
032    import com.liferay.portal.service.BaseLocalService;
033    import com.liferay.portal.service.PersistedModelLocalService;
034    
035    import com.liferay.portlet.social.model.SocialActivityCounterDefinition;
036    import com.liferay.portlet.social.model.SocialActivityDefinition;
037    import com.liferay.portlet.social.model.SocialActivitySetting;
038    
039    import java.io.Serializable;
040    
041    import java.util.List;
042    
043    /**
044     * Provides the local service interface for SocialActivitySetting. Methods of this
045     * service will not have security checks based on the propagated JAAS
046     * credentials because this service can only be accessed from within the same
047     * VM.
048     *
049     * @author Brian Wing Shun Chan
050     * @see SocialActivitySettingLocalServiceUtil
051     * @see com.liferay.portlet.social.service.base.SocialActivitySettingLocalServiceBaseImpl
052     * @see com.liferay.portlet.social.service.impl.SocialActivitySettingLocalServiceImpl
053     * @generated
054     */
055    @ProviderType
056    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
057            PortalException.class, SystemException.class})
058    public interface SocialActivitySettingLocalService extends BaseLocalService,
059            PersistedModelLocalService {
060            /*
061             * NOTE FOR DEVELOPERS:
062             *
063             * Never modify or reference this interface directly. Always use {@link SocialActivitySettingLocalServiceUtil} to access the social activity setting local service. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivitySettingLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
064             */
065    
066            /**
067            * Adds the social activity setting to the database. Also notifies the appropriate model listeners.
068            *
069            * @param socialActivitySetting the social activity setting
070            * @return the social activity setting that was added
071            */
072            @Indexable(type = IndexableType.REINDEX)
073            public SocialActivitySetting addSocialActivitySetting(
074                    SocialActivitySetting socialActivitySetting);
075    
076            /**
077            * Creates a new social activity setting with the primary key. Does not add the social activity setting to the database.
078            *
079            * @param activitySettingId the primary key for the new social activity setting
080            * @return the new social activity setting
081            */
082            public SocialActivitySetting createSocialActivitySetting(
083                    long activitySettingId);
084    
085            public void deleteActivitySetting(long groupId, java.lang.String className,
086                    long classPK);
087    
088            public void deleteActivitySettings(long groupId);
089    
090            /**
091            * @throws PortalException
092            */
093            @Override
094            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
095                    throws PortalException;
096    
097            /**
098            * Deletes the social activity setting with the primary key from the database. Also notifies the appropriate model listeners.
099            *
100            * @param activitySettingId the primary key of the social activity setting
101            * @return the social activity setting that was removed
102            * @throws PortalException if a social activity setting with the primary key could not be found
103            */
104            @Indexable(type = IndexableType.DELETE)
105            public SocialActivitySetting deleteSocialActivitySetting(
106                    long activitySettingId) throws PortalException;
107    
108            /**
109            * Deletes the social activity setting from the database. Also notifies the appropriate model listeners.
110            *
111            * @param socialActivitySetting the social activity setting
112            * @return the social activity setting that was removed
113            */
114            @Indexable(type = IndexableType.DELETE)
115            public SocialActivitySetting deleteSocialActivitySetting(
116                    SocialActivitySetting socialActivitySetting);
117    
118            public DynamicQuery dynamicQuery();
119    
120            /**
121            * Performs a dynamic query on the database and returns the matching rows.
122            *
123            * @param dynamicQuery the dynamic query
124            * @return the matching rows
125            */
126            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
127    
128            /**
129            * Performs a dynamic query on the database and returns a range of the matching rows.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySettingModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @return the range of matching rows
139            */
140            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
141                    int end);
142    
143            /**
144            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
145            *
146            * <p>
147            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySettingModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
148            * </p>
149            *
150            * @param dynamicQuery the dynamic query
151            * @param start the lower bound of the range of model instances
152            * @param end the upper bound of the range of model instances (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching rows
155            */
156            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
157                    int end, OrderByComparator<T> orderByComparator);
158    
159            /**
160            * Returns the number of rows matching the dynamic query.
161            *
162            * @param dynamicQuery the dynamic query
163            * @return the number of rows matching the dynamic query
164            */
165            public long dynamicQueryCount(DynamicQuery dynamicQuery);
166    
167            /**
168            * Returns the number of rows matching the dynamic query.
169            *
170            * @param dynamicQuery the dynamic query
171            * @param projection the projection to apply to the query
172            * @return the number of rows matching the dynamic query
173            */
174            public long dynamicQueryCount(DynamicQuery dynamicQuery,
175                    Projection projection);
176    
177            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178            public SocialActivitySetting fetchSocialActivitySetting(
179                    long activitySettingId);
180    
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public ActionableDynamicQuery getActionableDynamicQuery();
183    
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public SocialActivityDefinition getActivityDefinition(long groupId,
186                    java.lang.String className, int activityType);
187    
188            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189            public List<SocialActivityDefinition> getActivityDefinitions(long groupId,
190                    java.lang.String className);
191    
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public List<SocialActivitySetting> getActivitySettings(long groupId);
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
197    
198            /**
199            * Returns the OSGi service identifier.
200            *
201            * @return the OSGi service identifier
202            */
203            public java.lang.String getOSGiServiceIdentifier();
204    
205            @Override
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
208                    throws PortalException;
209    
210            /**
211            * Returns the social activity setting with the primary key.
212            *
213            * @param activitySettingId the primary key of the social activity setting
214            * @return the social activity setting
215            * @throws PortalException if a social activity setting with the primary key could not be found
216            */
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public SocialActivitySetting getSocialActivitySetting(
219                    long activitySettingId) throws PortalException;
220    
221            /**
222            * Returns a range of all the social activity settings.
223            *
224            * <p>
225            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySettingModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
226            * </p>
227            *
228            * @param start the lower bound of the range of social activity settings
229            * @param end the upper bound of the range of social activity settings (not inclusive)
230            * @return the range of social activity settings
231            */
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public List<SocialActivitySetting> getSocialActivitySettings(int start,
234                    int end);
235    
236            /**
237            * Returns the number of social activity settings.
238            *
239            * @return the number of social activity settings
240            */
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public int getSocialActivitySettingsCount();
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public boolean isEnabled(long groupId, long classNameId);
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public boolean isEnabled(long groupId, long classNameId, long classPK);
249    
250            public void updateActivitySetting(long groupId, java.lang.String className,
251                    int activityType,
252                    SocialActivityCounterDefinition activityCounterDefinition)
253                    throws PortalException;
254    
255            public void updateActivitySetting(long groupId, java.lang.String className,
256                    long classPK, boolean enabled) throws PortalException;
257    
258            public void updateActivitySetting(long groupId, java.lang.String className,
259                    boolean enabled) throws PortalException;
260    
261            public void updateActivitySettings(long groupId,
262                    java.lang.String className, int activityType,
263                    List<SocialActivityCounterDefinition> activityCounterDefinitions)
264                    throws PortalException;
265    
266            /**
267            * Updates the social activity setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
268            *
269            * @param socialActivitySetting the social activity setting
270            * @return the social activity setting that was updated
271            */
272            @Indexable(type = IndexableType.REINDEX)
273            public SocialActivitySetting updateSocialActivitySetting(
274                    SocialActivitySetting socialActivitySetting);
275    }