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 public static java.util.Map<java.lang.String, java.util.List<com.liferay.portlet.social.model.SocialActivityInterpreter>> getActivityInterpreters() { 079 return getService().getActivityInterpreters(); 080 } 081 082 /** 083 * @deprecated As of 6.2.0, replaced by {@link #interpret(String, 084 SocialActivity, ServiceContext)} 085 */ 086 public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret( 087 com.liferay.portlet.social.model.SocialActivity activity, 088 com.liferay.portal.theme.ThemeDisplay themeDisplay) { 089 return getService().interpret(activity, themeDisplay); 090 } 091 092 /** 093 * Creates a human readable activity feed entry for the activity using an 094 * available compatible activity interpreter. 095 * 096 * <p> 097 * This method finds the appropriate interpreter for the activity by going 098 * through the available interpreters and asking them if they can handle the 099 * asset type of the activity. 100 * </p> 101 * 102 * @param activity the activity to be translated to human readable form 103 * @return the activity feed that is a human readable form of the activity 104 record or <code>null</code> if a compatible interpreter is not 105 found 106 */ 107 public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret( 108 java.lang.String selector, 109 com.liferay.portlet.social.model.SocialActivity activity, 110 com.liferay.portal.service.ServiceContext serviceContext) { 111 return getService().interpret(selector, activity, serviceContext); 112 } 113 114 public static com.liferay.portlet.social.model.SocialActivityFeedEntry interpret( 115 java.lang.String selector, 116 com.liferay.portlet.social.model.SocialActivitySet activitySet, 117 com.liferay.portal.service.ServiceContext serviceContext) { 118 return getService().interpret(selector, activitySet, serviceContext); 119 } 120 121 public static void updateActivitySet(long activityId) 122 throws com.liferay.portal.kernel.exception.PortalException, 123 com.liferay.portal.kernel.exception.SystemException { 124 getService().updateActivitySet(activityId); 125 } 126 127 public static SocialActivityInterpreterLocalService getService() { 128 if (_service == null) { 129 _service = (SocialActivityInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialActivityInterpreterLocalService.class.getName()); 130 131 ReferenceRegistry.registerReference(SocialActivityInterpreterLocalServiceUtil.class, 132 "_service"); 133 } 134 135 return _service; 136 } 137 138 /** 139 * @deprecated As of 6.2.0 140 */ 141 public void setService(SocialActivityInterpreterLocalService service) { 142 } 143 144 private static SocialActivityInterpreterLocalService _service; 145 }