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 * Adds the activity interpreter to the list of available interpreters. 059 * 060 * @param activityInterpreter the activity interpreter 061 */ 062 public void addActivityInterpreter( 063 SocialActivityInterpreter activityInterpreter); 064 065 /** 066 * Removes the activity interpreter from the list of available interpreters. 067 * 068 * @param activityInterpreter the activity interpreter 069 */ 070 public void deleteActivityInterpreter( 071 SocialActivityInterpreter activityInterpreter); 072 073 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 074 public Map<java.lang.String, List<SocialActivityInterpreter>> getActivityInterpreters(); 075 076 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 077 public List<SocialActivityInterpreter> getActivityInterpreters( 078 java.lang.String selector); 079 080 /** 081 * Returns the OSGi service identifier. 082 * 083 * @return the OSGi service identifier 084 */ 085 public java.lang.String getOSGiServiceIdentifier(); 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 SocialActivityFeedEntry interpret(java.lang.String selector, 105 SocialActivity activity, ServiceContext serviceContext); 106 107 public SocialActivityFeedEntry interpret(java.lang.String selector, 108 SocialActivitySet activitySet, ServiceContext serviceContext); 109 110 public void updateActivitySet(long activityId) throws PortalException; 111 }