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 SocialActivitySetting. This utility wraps
024     * {@link com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl} 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 SocialActivitySettingService
032     * @see com.liferay.portlet.social.service.base.SocialActivitySettingServiceBaseImpl
033     * @see com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SocialActivitySettingServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.social.model.SocialActivityDefinition getActivityDefinition(
044                    long groupId, java.lang.String className, int activityType)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService()
047                                       .getActivityDefinition(groupId, className, activityType);
048            }
049    
050            public static java.util.List<com.liferay.portlet.social.model.SocialActivityDefinition> getActivityDefinitions(
051                    long groupId, java.lang.String className)
052                    throws com.liferay.portal.kernel.exception.PortalException {
053                    return getService().getActivityDefinitions(groupId, className);
054            }
055    
056            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> getActivitySettings(
057                    long groupId)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return getService().getActivitySettings(groupId);
060            }
061    
062            /**
063            * Returns the Spring bean ID for this bean.
064            *
065            * @return the Spring bean ID for this bean
066            */
067            public static java.lang.String getBeanIdentifier() {
068                    return getService().getBeanIdentifier();
069            }
070    
071            public static com.liferay.portal.kernel.json.JSONArray getJSONActivityDefinitions(
072                    long groupId, java.lang.String className)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    return getService().getJSONActivityDefinitions(groupId, className);
075            }
076    
077            /**
078            * Sets the Spring bean ID for this bean.
079            *
080            * @param beanIdentifier the Spring bean ID for this bean
081            */
082            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
083                    getService().setBeanIdentifier(beanIdentifier);
084            }
085    
086            public static void updateActivitySetting(long groupId,
087                    java.lang.String className, int activityType,
088                    com.liferay.portlet.social.model.SocialActivityCounterDefinition activityCounterDefinition)
089                    throws com.liferay.portal.kernel.exception.PortalException {
090                    getService()
091                            .updateActivitySetting(groupId, className, activityType,
092                            activityCounterDefinition);
093            }
094    
095            public static void updateActivitySetting(long groupId,
096                    java.lang.String className, boolean enabled)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    getService().updateActivitySetting(groupId, className, enabled);
099            }
100    
101            public static void updateActivitySettings(long groupId,
102                    java.lang.String className, int activityType,
103                    java.util.List<com.liferay.portlet.social.model.SocialActivityCounterDefinition> activityCounterDefinitions)
104                    throws com.liferay.portal.kernel.exception.PortalException {
105                    getService()
106                            .updateActivitySettings(groupId, className, activityType,
107                            activityCounterDefinitions);
108            }
109    
110            public static SocialActivitySettingService getService() {
111                    if (_service == null) {
112                            _service = (SocialActivitySettingService)PortalBeanLocatorUtil.locate(SocialActivitySettingService.class.getName());
113    
114                            ReferenceRegistry.registerReference(SocialActivitySettingServiceUtil.class,
115                                    "_service");
116                    }
117    
118                    return _service;
119            }
120    
121            /**
122             * @deprecated As of 6.2.0
123             */
124            @Deprecated
125            public void setService(SocialActivitySettingService service) {
126            }
127    
128            private static SocialActivitySettingService _service;
129    }