/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.social.kernel.service;
import aQute.bnd.annotation.ProviderType;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.service.BaseLocalService;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.social.kernel.model.SocialActivity;
import com.liferay.social.kernel.model.SocialActivityFeedEntry;
import com.liferay.social.kernel.model.SocialActivityInterpreter;
import com.liferay.social.kernel.model.SocialActivitySet;
import java.util.List;
import java.util.Map;
/**
* Provides the local service interface for SocialActivityInterpreter. Methods of this
* service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same
* VM.
*
* @author Brian Wing Shun Chan
* @see SocialActivityInterpreterLocalServiceUtil
* @see com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
* @see com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
* @generated
*/
@ProviderType
@Transactional(isolation = Isolation.PORTAL, rollbackFor = {
PortalException.class, SystemException.class})
public interface SocialActivityInterpreterLocalService extends BaseLocalService {
/*
* NOTE FOR DEVELOPERS:
*
* 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.
*/
/**
* Creates a human readable activity feed entry for the activity using an
* available compatible activity interpreter.
*
* <p>
* This method finds the appropriate interpreter for the activity by going
* through the available interpreters and asking them if they can handle the
* asset type of the activity.
* </p>
*
* @param selector the context in which the activity interpreter is used
* @param activity the activity to be translated to human readable form
* @param serviceContext the service context to be applied
* @return the activity feed that is a human readable form of the activity
record or <code>null</code> if a compatible interpreter is not
found
*/
public SocialActivityFeedEntry interpret(java.lang.String selector,
SocialActivity activity, ServiceContext serviceContext);
public SocialActivityFeedEntry interpret(java.lang.String selector,
SocialActivitySet activitySet, ServiceContext serviceContext);
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
public java.lang.String getOSGiServiceIdentifier();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List<SocialActivityInterpreter> getActivityInterpreters(
java.lang.String selector);
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Map<java.lang.String, List<SocialActivityInterpreter>> getActivityInterpreters();
/**
* Adds the activity interpreter to the list of available interpreters.
*
* @param activityInterpreter the activity interpreter
*/
public void addActivityInterpreter(
SocialActivityInterpreter activityInterpreter);
/**
* Removes the activity interpreter from the list of available interpreters.
*
* @param activityInterpreter the activity interpreter
*/
public void deleteActivityInterpreter(
SocialActivityInterpreter activityInterpreter);
public void updateActivitySet(long activityId) throws PortalException;
}