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            public static java.util.List<com.liferay.portlet.social.model.SocialActivityInterpreter> getActivityInterpreters(
084                    java.lang.String selector) {
085                    return getService().getActivityInterpreters(selector);
086            }
087    
088            /**
089            * @deprecated As of 6.2.0, replaced by {@link #interpret(String,
090            SocialActivity, ServiceContext)}
091            */
092            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
093                    com.liferay.portlet.social.model.SocialActivity activity,
094                    com.liferay.portal.theme.ThemeDisplay themeDisplay) {
095                    return getService().interpret(activity, themeDisplay);
096            }
097    
098            /**
099            * Creates a human readable activity feed entry for the activity using an
100            * available compatible activity interpreter.
101            *
102            * <p>
103            * This method finds the appropriate interpreter for the activity by going
104            * through the available interpreters and asking them if they can handle the
105            * asset type of the activity.
106            * </p>
107            *
108            * @param activity the activity to be translated to human readable form
109            * @return the activity feed that is a human readable form of the activity
110            record or <code>null</code> if a compatible interpreter is not
111            found
112            */
113            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
114                    java.lang.String selector,
115                    com.liferay.portlet.social.model.SocialActivity activity,
116                    com.liferay.portal.service.ServiceContext serviceContext) {
117                    return getService().interpret(selector, activity, serviceContext);
118            }
119    
120            public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
121                    java.lang.String selector,
122                    com.liferay.portlet.social.model.SocialActivitySet activitySet,
123                    com.liferay.portal.service.ServiceContext serviceContext) {
124                    return getService().interpret(selector, activitySet, serviceContext);
125            }
126    
127            public static void updateActivitySet(long activityId)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    getService().updateActivitySet(activityId);
131            }
132    
133            public static SocialActivityInterpreterLocalService getService() {
134                    if (_service == null) {
135                            _service = (SocialActivityInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialActivityInterpreterLocalService.class.getName());
136    
137                            ReferenceRegistry.registerReference(SocialActivityInterpreterLocalServiceUtil.class,
138                                    "_service");
139                    }
140    
141                    return _service;
142            }
143    
144            /**
145             * @deprecated As of 6.2.0
146             */
147            public void setService(SocialActivityInterpreterLocalService service) {
148            }
149    
150            private static SocialActivityInterpreterLocalService _service;
151    }