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    import com.liferay.portal.theme.ThemeDisplay;
025    
026    import com.liferay.portlet.social.model.SocialRequest;
027    import com.liferay.portlet.social.model.SocialRequestFeedEntry;
028    import com.liferay.portlet.social.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            * Adds the social request interpreter to the list of available
054            * interpreters.
055            *
056            * @param requestInterpreter the social request interpreter
057            */
058            public void addRequestInterpreter(
059                    SocialRequestInterpreter requestInterpreter);
060    
061            /**
062            * Removes the social request interpreter from the list of available
063            * interpreters.
064            *
065            * @param requestInterpreter the social request interpreter
066            */
067            public void deleteRequestInterpreter(
068                    SocialRequestInterpreter requestInterpreter);
069    
070            /**
071            * Returns the OSGi service identifier.
072            *
073            * @return the OSGi service identifier
074            */
075            public java.lang.String getOSGiServiceIdentifier();
076    
077            /**
078            * Creates a human readable request feed entry for the social request using
079            * an available compatible request interpreter.
080            *
081            * <p>
082            * This method finds the appropriate interpreter for the request by going
083            * through the available interpreters to find one that can handle the asset
084            * type of the request.
085            * </p>
086            *
087            * @param request the social request to be translated to human readable
088            form
089            * @param themeDisplay the theme display needed by interpreters to create
090            links and get localized text fragments
091            * @return the social request feed entry
092            */
093            public SocialRequestFeedEntry interpret(SocialRequest request,
094                    ThemeDisplay themeDisplay);
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    }