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 activity interpreter local service. This utility wraps {@link com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl} 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 SocialActivityInterpreterLocalService 029 * @see com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl 030 * @see com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl 031 * @generated 032 */ 033 public class SocialActivityInterpreterLocalServiceUtil { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl} 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 activity interpreter to the list of available interpreters. 060 * 061 * @param activityInterpreter the activity interpreter 062 */ 063 public static void addActivityInterpreter( 064 com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter) { 065 getService().addActivityInterpreter(activityInterpreter); 066 } 067 068 /** 069 * Removes the activity interpreter from the list of available interpreters. 070 * 071 * @param activityInterpreter the activity interpreter 072 */ 073 public static void deleteActivityInterpreter( 074 com.liferay.portlet.social.model.SocialActivityInterpreter activityInterpreter) { 075 getService().deleteActivityInterpreter(activityInterpreter); 076 } 077 078 /** 079 * Creates a human readable activity feed entry for the activity using an 080 * available compatible activity interpreter. 081 * 082 * <p> 083 * This method finds the appropriate interpreter for the activity by going 084 * through the available interpreters and asking them if they can handle the 085 * asset type of the activity. 086 * </p> 087 * 088 * @param activity the activity to be translated to human readable form 089 * @param themeDisplay the theme display needed by interpreters to create 090 links and get localized text fragments 091 * @return the activity feed that is a human readable form of the activity 092 record or <code>null</code> if a compatible interpreter is not 093 found 094 */ 095 public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret( 096 com.liferay.portlet.social.model.SocialActivity activity, 097 com.liferay.portal.theme.ThemeDisplay themeDisplay) { 098 return getService().interpret(activity, themeDisplay); 099 } 100 101 public static SocialActivityInterpreterLocalService getService() { 102 if (_service == null) { 103 _service = (SocialActivityInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialActivityInterpreterLocalService.class.getName()); 104 105 ReferenceRegistry.registerReference(SocialActivityInterpreterLocalServiceUtil.class, 106 "_service"); 107 } 108 109 return _service; 110 } 111 112 /** 113 * @deprecated 114 */ 115 public void setService(SocialActivityInterpreterLocalService service) { 116 } 117 118 private static SocialActivityInterpreterLocalService _service; 119 }