001
014
015 package com.liferay.portlet.social.util;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018 import com.liferay.portlet.social.model.SocialActivityDefinition;
019
020 import java.util.List;
021
022
025 public class SocialConfigurationUtil {
026
027 public static List<String> getActivityCounterNames() {
028 return getSocialConfiguration().getActivityCounterNames();
029 }
030
031 public static List<String> getActivityCounterNames(
032 boolean transientCounter) {
033
034 return getSocialConfiguration().getActivityCounterNames(
035 transientCounter);
036 }
037
038 public static List<String> getActivityCounterNames(int ownerType) {
039 return getSocialConfiguration().getActivityCounterNames(ownerType);
040 }
041
042 public static List<String> getActivityCounterNames(
043 int ownerType, boolean transientCounter) {
044
045 return getSocialConfiguration().getActivityCounterNames(
046 ownerType, transientCounter);
047 }
048
049 public static SocialActivityDefinition getActivityDefinition(
050 String modelName, int activityType) {
051
052 return getSocialConfiguration().getActivityDefinition(
053 modelName, activityType);
054 }
055
056 public static List<SocialActivityDefinition> getActivityDefinitions(
057 String modelName) {
058
059 return getSocialConfiguration().getActivityDefinitions(modelName);
060 }
061
062 public static String[] getActivityModelNames() {
063 return getSocialConfiguration().getActivityModelNames();
064 }
065
066 public static SocialConfiguration getSocialConfiguration() {
067 PortalRuntimePermission.checkGetBeanProperty(
068 SocialConfigurationUtil.class);
069
070 return _socialConfiguration;
071 }
072
073 public static List<Object> read(ClassLoader classLoader, String[] xmls)
074 throws Exception {
075
076 return getSocialConfiguration().read(classLoader, xmls);
077 }
078
079 public static void removeActivityDefinition(
080 SocialActivityDefinition activityDefinition) {
081
082 getSocialConfiguration().removeActivityDefinition(activityDefinition);
083 }
084
085 public void setSocialConfiguration(
086 SocialConfiguration socialConfiguration) {
087
088 PortalRuntimePermission.checkSetBeanProperty(getClass());
089
090 _socialConfiguration = socialConfiguration;
091 }
092
093 private static SocialConfiguration _socialConfiguration;
094
095 }