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.theme.ThemeDisplay; 023 import com.liferay.portal.kernel.transaction.Isolation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 026 import com.liferay.social.kernel.model.SocialRequest; 027 import com.liferay.social.kernel.model.SocialRequestFeedEntry; 028 import com.liferay.social.kernel.model.SocialRequestInterpreter; 029 030 /** 031 * Provides the local service interface for SocialRequestInterpreter. Methods of this 032 * service will not have security checks based on the propagated JAAS 033 * credentials because this service can only be accessed from within the same 034 * VM. 035 * 036 * @author Brian Wing Shun Chan 037 * @see SocialRequestInterpreterLocalServiceUtil 038 * @see com.liferay.portlet.social.service.base.SocialRequestInterpreterLocalServiceBaseImpl 039 * @see com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl 040 * @generated 041 */ 042 @ProviderType 043 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 044 PortalException.class, SystemException.class}) 045 public interface SocialRequestInterpreterLocalService extends BaseLocalService { 046 /* 047 * NOTE FOR DEVELOPERS: 048 * 049 * Never modify or reference this interface directly. Always use {@link SocialRequestInterpreterLocalServiceUtil} to access the social request interpreter local service. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 050 */ 051 052 /** 053 * Creates a human readable request feed entry for the social request using 054 * an available compatible request interpreter. 055 * 056 * <p> 057 * This method finds the appropriate interpreter for the request by going 058 * through the available interpreters to find one that can handle the asset 059 * type of the request. 060 * </p> 061 * 062 * @param request the social request to be translated to human readable 063 form 064 * @param themeDisplay the theme display needed by interpreters to create 065 links and get localized text fragments 066 * @return the social request feed entry 067 */ 068 public SocialRequestFeedEntry interpret(SocialRequest request, 069 ThemeDisplay themeDisplay); 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 * Adds the social request interpreter to the list of available 080 * interpreters. 081 * 082 * @param requestInterpreter the social request interpreter 083 */ 084 public void addRequestInterpreter( 085 SocialRequestInterpreter requestInterpreter); 086 087 /** 088 * Removes the social request interpreter from the list of available 089 * interpreters. 090 * 091 * @param requestInterpreter the social request interpreter 092 */ 093 public void deleteRequestInterpreter( 094 SocialRequestInterpreter requestInterpreter); 095 096 /** 097 * Processes the confirmation of the social request. 098 * 099 * <p> 100 * Confirmations are handled by finding the appropriate social request 101 * interpreter and calling its processConfirmation() method. To find the 102 * appropriate interpreter this method goes through the available 103 * interpreters to find one that can handle the asset type of the request. 104 * </p> 105 * 106 * @param request the social request being confirmed 107 * @param themeDisplay the theme display needed by interpreters to create 108 links and get localized text fragments 109 */ 110 public void processConfirmation(SocialRequest request, 111 ThemeDisplay themeDisplay); 112 113 /** 114 * Processes the rejection of the social request. 115 * 116 * <p> 117 * Rejections are handled by finding the appropriate social request 118 * interpreters and calling their processRejection() methods. To find the 119 * appropriate interpreters this method goes through the available 120 * interpreters and asks them if they can handle the asset type of the 121 * request. 122 * </p> 123 * 124 * @param request the social request being rejected 125 * @param themeDisplay the theme display needed by interpreters to create 126 links and get localized text fragments 127 */ 128 public void processRejection(SocialRequest request, 129 ThemeDisplay themeDisplay); 130 }