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            public static com.liferay.portal.kernel.json.JSONArray getJSONActivityDefinitions(
063                    long groupId, java.lang.String className)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    return getService().getJSONActivityDefinitions(groupId, className);
066            }
067    
068            /**
069            * Returns the OSGi service identifier.
070            *
071            * @return the OSGi service identifier
072            */
073            public static java.lang.String getOSGiServiceIdentifier() {
074                    return getService().getOSGiServiceIdentifier();
075            }
076    
077            public static void updateActivitySetting(long groupId,
078                    java.lang.String className, int activityType,
079                    com.liferay.portlet.social.model.SocialActivityCounterDefinition activityCounterDefinition)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    getService()
082                            .updateActivitySetting(groupId, className, activityType,
083                            activityCounterDefinition);
084            }
085    
086            public static void updateActivitySetting(long groupId,
087                    java.lang.String className, boolean enabled)
088                    throws com.liferay.portal.kernel.exception.PortalException {
089                    getService().updateActivitySetting(groupId, className, enabled);
090            }
091    
092            public static void updateActivitySettings(long groupId,
093                    java.lang.String className, int activityType,
094                    java.util.List<com.liferay.portlet.social.model.SocialActivityCounterDefinition> activityCounterDefinitions)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    getService()
097                            .updateActivitySettings(groupId, className, activityType,
098                            activityCounterDefinitions);
099            }
100    
101            public static SocialActivitySettingService getService() {
102                    if (_service == null) {
103                            _service = (SocialActivitySettingService)PortalBeanLocatorUtil.locate(SocialActivitySettingService.class.getName());
104    
105                            ReferenceRegistry.registerReference(SocialActivitySettingServiceUtil.class,
106                                    "_service");
107                    }
108    
109                    return _service;
110            }
111    
112            private static SocialActivitySettingService _service;
113    }