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