001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the social activity setting remote service. This utility wraps {@link com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivitySettingService
030     * @see com.liferay.portlet.social.service.base.SocialActivitySettingServiceBaseImpl
031     * @see com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl
032     * @generated
033     */
034    public class SocialActivitySettingServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040            public static com.liferay.portlet.social.model.SocialActivityDefinition getActivityDefinition(
041                    long groupId, java.lang.String className, int activityType)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService()
045                                       .getActivityDefinition(groupId, className, activityType);
046            }
047    
048            public static java.util.List<com.liferay.portlet.social.model.SocialActivityDefinition> getActivityDefinitions(
049                    long groupId, java.lang.String className)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    return getService().getActivityDefinitions(groupId, className);
053            }
054    
055            public static com.liferay.portal.kernel.json.JSONArray getJSONActivityDefinitions(
056                    long groupId, java.lang.String className)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    return getService().getJSONActivityDefinitions(groupId, className);
060            }
061    
062            public static void updateActivitySetting(long groupId,
063                    java.lang.String className, boolean enabled)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    getService().updateActivitySetting(groupId, className, enabled);
067            }
068    
069            public static void updateActivitySetting(long groupId,
070                    java.lang.String className, int activityType,
071                    com.liferay.portlet.social.model.SocialActivityCounterDefinition activityCounterDefinition)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    getService()
075                            .updateActivitySetting(groupId, className, activityType,
076                            activityCounterDefinition);
077            }
078    
079            public static void updateActivitySettings(long groupId,
080                    java.lang.String className, int activityType,
081                    java.util.List<com.liferay.portlet.social.model.SocialActivityCounterDefinition> activityCounterDefinitions)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    getService()
085                            .updateActivitySettings(groupId, className, activityType,
086                            activityCounterDefinitions);
087            }
088    
089            public static SocialActivitySettingService getService() {
090                    if (_service == null) {
091                            _service = (SocialActivitySettingService)PortalBeanLocatorUtil.locate(SocialActivitySettingService.class.getName());
092    
093                            ReferenceRegistry.registerReference(SocialActivitySettingServiceUtil.class,
094                                    "_service");
095                            MethodCache.remove(SocialActivitySettingService.class);
096                    }
097    
098                    return _service;
099            }
100    
101            public void setService(SocialActivitySettingService service) {
102                    MethodCache.remove(SocialActivitySettingService.class);
103    
104                    _service = service;
105    
106                    ReferenceRegistry.registerReference(SocialActivitySettingServiceUtil.class,
107                            "_service");
108                    MethodCache.remove(SocialActivitySettingService.class);
109            }
110    
111            private static SocialActivitySettingService _service;
112    }