001    /**
002     * Copyright (c) 2000-2013 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.ReferenceRegistry;
019    
020    /**
021     * Provides the local service utility for SocialActivityInterpreter. This utility wraps
022     * {@link com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on the local server. Methods of this service will not have security checks
025     * based on the propagated JAAS credentials because this service can only be
026     * accessed from within the same VM.
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivityInterpreterLocalService
030     * @see com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
031     * @see com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
032     * @generated
033     */
034    public class SocialActivityInterpreterLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Returns the Spring bean ID for this bean.
043            *
044            * @return the Spring bean ID for this bean
045            */
046            public static java.lang.String getBeanIdentifier() {
047                    return getService().getBeanIdentifier();
048            }
049    
050            /**
051            * Sets the Spring bean ID for this bean.
052            *
053            * @param beanIdentifier the Spring bean ID for this bean
054            */
055            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056                    getService().setBeanIdentifier(beanIdentifier);
057            }
058    
059            /**
060            * Adds the activity interpreter to the list of available interpreters.
061            *
062            * @param activityInterpreter the activity interpreter
063            */
064            public static void addActivityInterpreter(
065                    com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter) {
066                    getService().addActivityInterpreter(activityInterpreter);
067            }
068    
069            /**
070            * Removes the activity interpreter from the list of available interpreters.
071            *
072            * @param activityInterpreter the activity interpreter
073            */
074            public static void deleteActivityInterpreter(
075                    com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter) {
076                    getService().deleteActivityInterpreter(activityInterpreter);
077            }
078    
079            public static java.util.Map<java.lang.String, java.util.List<com.liferay.portlet.social.model.SocialActivityInterpreter>> getActivityInterpreters() {
080                    return getService().getActivityInterpreters();
081            }
082    
083            /**
084            * @deprecated As of 6.2.0, replaced by {@link #interpret(String,
085            SocialActivity, ServiceContext)}
086            */
087            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
088                    com.liferay.portlet.social.model.SocialActivity activity,
089                    com.liferay.portal.theme.ThemeDisplay themeDisplay) {
090                    return getService().interpret(activity, themeDisplay);
091            }
092    
093            /**
094            * Creates a human readable activity feed entry for the activity using an
095            * available compatible activity interpreter.
096            *
097            * <p>
098            * This method finds the appropriate interpreter for the activity by going
099            * through the available interpreters and asking them if they can handle the
100            * asset type of the activity.
101            * </p>
102            *
103            * @param activity the activity to be translated to human readable form
104            * @return the activity feed that is a human readable form of the activity
105            record or <code>null</code> if a compatible interpreter is not
106            found
107            */
108            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
109                    java.lang.String selector,
110                    com.liferay.portlet.social.model.SocialActivity activity,
111                    com.liferay.portal.service.ServiceContext serviceContext) {
112                    return getService().interpret(selector, activity, serviceContext);
113            }
114    
115            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
116                    java.lang.String selector,
117                    com.liferay.portlet.social.model.SocialActivitySet activitySet,
118                    com.liferay.portal.service.ServiceContext serviceContext) {
119                    return getService().interpret(selector, activitySet, serviceContext);
120            }
121    
122            public static void updateActivitySet(long activityId)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    getService().updateActivitySet(activityId);
126            }
127    
128            public static SocialActivityInterpreterLocalService getService() {
129                    if (_service == null) {
130                            _service = (SocialActivityInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialActivityInterpreterLocalService.class.getName());
131    
132                            ReferenceRegistry.registerReference(SocialActivityInterpreterLocalServiceUtil.class,
133                                    "_service");
134                    }
135    
136                    return _service;
137            }
138    
139            /**
140             * @deprecated As of 6.2.0
141             */
142            public void setService(SocialActivityInterpreterLocalService service) {
143            }
144    
145            private static SocialActivityInterpreterLocalService _service;
146    }