001
014
015 package com.liferay.portlet.asset;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018 import com.liferay.portlet.asset.model.AssetRendererFactory;
019
020 import java.util.List;
021
022
026 public class AssetRendererFactoryRegistryUtil {
027
028
032 public static List<AssetRendererFactory> getAssetRendererFactories() {
033 return getAssetRendererFactoryRegistry().getAssetRendererFactories();
034 }
035
036 public static List<AssetRendererFactory> getAssetRendererFactories(
037 long companyId) {
038
039 return getAssetRendererFactoryRegistry().getAssetRendererFactories(
040 companyId);
041 }
042
043 public static AssetRendererFactory getAssetRendererFactoryByClassName(
044 String className) {
045
046 return getAssetRendererFactoryRegistry().
047 getAssetRendererFactoryByClassName(className);
048 }
049
050 public static AssetRendererFactory getAssetRendererFactoryByType(
051 String type) {
052
053 return getAssetRendererFactoryRegistry().getAssetRendererFactoryByType(
054 type);
055 }
056
057 public static AssetRendererFactoryRegistry
058 getAssetRendererFactoryRegistry() {
059
060 PortalRuntimePermission.checkGetBeanProperty(
061 AssetRendererFactoryRegistryUtil.class);
062
063 return _assetRendererFactoryRegistry;
064 }
065
066
069 public static long[] getClassNameIds() {
070 return getAssetRendererFactoryRegistry().getClassNameIds();
071 }
072
073 public static long[] getClassNameIds(long companyId) {
074 return getAssetRendererFactoryRegistry().getClassNameIds(companyId);
075 }
076
077 public static void register(AssetRendererFactory assetRendererFactory) {
078 getAssetRendererFactoryRegistry().register(assetRendererFactory);
079 }
080
081 public static void register(
082 List<AssetRendererFactory> assetRendererFactories) {
083
084 for (AssetRendererFactory assetRendererFactory :
085 assetRendererFactories) {
086
087 register(assetRendererFactory);
088 }
089 }
090
091 public static void unregister(AssetRendererFactory assetRendererFactory) {
092 getAssetRendererFactoryRegistry().unregister(assetRendererFactory);
093 }
094
095 public static void unregister(
096 List<AssetRendererFactory> assetRendererFactories) {
097
098 for (AssetRendererFactory assetRendererFactory :
099 assetRendererFactories) {
100
101 unregister(assetRendererFactory);
102 }
103 }
104
105 public void setAssetRendererFactoryRegistry(
106 AssetRendererFactoryRegistry assetRendererFactoryRegistry) {
107
108 PortalRuntimePermission.checkSetBeanProperty(getClass());
109
110 _assetRendererFactoryRegistry = assetRendererFactoryRegistry;
111 }
112
113 private static AssetRendererFactoryRegistry _assetRendererFactoryRegistry;
114
115 }