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