001    /**
002     * Copyright (c) 2000-2013 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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for SocialRequestInterpreter. This utility wraps
024     * {@link com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see SocialRequestInterpreterLocalService
032     * @see com.liferay.portlet.social.service.base.SocialRequestInterpreterLocalServiceBaseImpl
033     * @see com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SocialRequestInterpreterLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            /**
063            * Adds the social request interpreter to the list of available
064            * interpreters.
065            *
066            * @param requestInterpreter the social request interpreter
067            */
068            public static void addRequestInterpreter(
069                    com.liferay.portlet.social.model.SocialRequestInterpreter requestInterpreter) {
070                    getService().addRequestInterpreter(requestInterpreter);
071            }
072    
073            /**
074            * Removes the social request interpreter from the list of available
075            * interpreters.
076            *
077            * @param requestInterpreter the social request interpreter
078            */
079            public static void deleteRequestInterpreter(
080                    com.liferay.portlet.social.model.SocialRequestInterpreter requestInterpreter) {
081                    getService().deleteRequestInterpreter(requestInterpreter);
082            }
083    
084            /**
085            * Creates a human readable request feed entry for the social request using
086            * an available compatible request interpreter.
087            *
088            * <p>
089            * This method finds the appropriate interpreter for the request by going
090            * through the available interpreters to find one that can handle the asset
091            * type of the request.
092            * </p>
093            *
094            * @param request the social request to be translated to human readable
095            form
096            * @param themeDisplay the theme display needed by interpreters to create
097            links and get localized text fragments
098            * @return the social request feed entry
099            */
100            public static com.liferay.portlet.social.model.SocialRequestFeedEntry interpret(
101                    com.liferay.portlet.social.model.SocialRequest request,
102                    com.liferay.portal.theme.ThemeDisplay themeDisplay) {
103                    return getService().interpret(request, themeDisplay);
104            }
105    
106            /**
107            * Processes the confirmation of the social request.
108            *
109            * <p>
110            * Confirmations are handled by finding the appropriate social request
111            * interpreter and calling its processConfirmation() method. To find the
112            * appropriate interpreter this method goes through the available
113            * interpreters to find one that can handle the asset type of the request.
114            * </p>
115            *
116            * @param request the social request being confirmed
117            * @param themeDisplay the theme display needed by interpreters to create
118            links and get localized text fragments
119            */
120            public static void processConfirmation(
121                    com.liferay.portlet.social.model.SocialRequest request,
122                    com.liferay.portal.theme.ThemeDisplay themeDisplay) {
123                    getService().processConfirmation(request, themeDisplay);
124            }
125    
126            /**
127            * Processes the rejection of the social request.
128            *
129            * <p>
130            * Rejections are handled by finding the appropriate social request
131            * interpreters and calling their processRejection() methods. To find the
132            * appropriate interpreters this method goes through the available
133            * interpreters and asks them if they can handle the asset type of the
134            * request.
135            * </p>
136            *
137            * @param request the social request being rejected
138            * @param themeDisplay the theme display needed by interpreters to create
139            links and get localized text fragments
140            */
141            public static void processRejection(
142                    com.liferay.portlet.social.model.SocialRequest request,
143                    com.liferay.portal.theme.ThemeDisplay themeDisplay) {
144                    getService().processRejection(request, themeDisplay);
145            }
146    
147            public static SocialRequestInterpreterLocalService getService() {
148                    if (_service == null) {
149                            _service = (SocialRequestInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialRequestInterpreterLocalService.class.getName());
150    
151                            ReferenceRegistry.registerReference(SocialRequestInterpreterLocalServiceUtil.class,
152                                    "_service");
153                    }
154    
155                    return _service;
156            }
157    
158            /**
159             * @deprecated As of 6.2.0
160             */
161            public void setService(SocialRequestInterpreterLocalService service) {
162            }
163    
164            private static SocialRequestInterpreterLocalService _service;
165    }