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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.transaction.Isolation;
022    import com.liferay.portal.kernel.transaction.Propagation;
023    import com.liferay.portal.kernel.transaction.Transactional;
024    import com.liferay.portal.service.BaseLocalService;
025    
026    /**
027     * Provides the local service interface for SocialActivityInterpreter. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see SocialActivityInterpreterLocalServiceUtil
034     * @see com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
035     * @see com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface SocialActivityInterpreterLocalService extends BaseLocalService {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify or reference this interface directly. Always use {@link SocialActivityInterpreterLocalServiceUtil} to access the social activity interpreter local service. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
046             */
047    
048            /**
049            * Adds the activity interpreter to the list of available interpreters.
050            *
051            * @param activityInterpreter the activity interpreter
052            */
053            public void addActivityInterpreter(
054                    com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter);
055    
056            /**
057            * Removes the activity interpreter from the list of available interpreters.
058            *
059            * @param activityInterpreter the activity interpreter
060            */
061            public void deleteActivityInterpreter(
062                    com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter);
063    
064            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
065            public java.util.Map<java.lang.String, java.util.List<com.liferay.portlet.social.model.SocialActivityInterpreter>> getActivityInterpreters();
066    
067            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
068            public java.util.List<com.liferay.portlet.social.model.SocialActivityInterpreter> getActivityInterpreters(
069                    java.lang.String selector);
070    
071            /**
072            * Returns the OSGi service identifier.
073            *
074            * @return the OSGi service identifier
075            */
076            public java.lang.String getOSGiServiceIdentifier();
077    
078            /**
079            * @deprecated As of 6.2.0, replaced by {@link #interpret(String,
080            SocialActivity, ServiceContext)}
081            */
082            @java.lang.Deprecated
083            public com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
084                    com.liferay.portlet.social.model.SocialActivity activity,
085                    com.liferay.portal.theme.ThemeDisplay themeDisplay);
086    
087            /**
088            * Creates a human readable activity feed entry for the activity using an
089            * available compatible activity interpreter.
090            *
091            * <p>
092            * This method finds the appropriate interpreter for the activity by going
093            * through the available interpreters and asking them if they can handle the
094            * asset type of the activity.
095            * </p>
096            *
097            * @param selector the context in which the activity interpreter is used
098            * @param activity the activity to be translated to human readable form
099            * @param serviceContext the service context to be applied
100            * @return the activity feed that is a human readable form of the activity
101            record or <code>null</code> if a compatible interpreter is not
102            found
103            */
104            public com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
105                    java.lang.String selector,
106                    com.liferay.portlet.social.model.SocialActivity activity,
107                    com.liferay.portal.service.ServiceContext serviceContext);
108    
109            public com.liferay.portlet.social.model.SocialActivityFeedEntry interpret(
110                    java.lang.String selector,
111                    com.liferay.portlet.social.model.SocialActivitySet activitySet,
112                    com.liferay.portal.service.ServiceContext serviceContext);
113    
114            public void updateActivitySet(long activityId) throws PortalException;
115    }