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