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 public static List<AssetRendererFactory> getAssetRendererFactories() {
029 return getAssetRendererFactoryRegistry().getAssetRendererFactories();
030 }
031
032 public static AssetRendererFactory getAssetRendererFactoryByClassName(
033 String className) {
034
035 return getAssetRendererFactoryRegistry().
036 getAssetRendererFactoryByClassName(className);
037 }
038
039 public static AssetRendererFactory getAssetRendererFactoryByType(
040 String type) {
041
042 return getAssetRendererFactoryRegistry().getAssetRendererFactoryByType(
043 type);
044 }
045
046 public static AssetRendererFactoryRegistry
047 getAssetRendererFactoryRegistry() {
048
049 PortalRuntimePermission.checkGetBeanProperty(
050 AssetRendererFactoryRegistryUtil.class);
051
052 return _assetRendererFactoryRegistry;
053 }
054
055 public static long[] getClassNameIds() {
056 return getAssetRendererFactoryRegistry().getClassNameIds();
057 }
058
059 public static void register(AssetRendererFactory assetRendererFactory) {
060 getAssetRendererFactoryRegistry().register(assetRendererFactory);
061 }
062
063 public static void register(
064 List<AssetRendererFactory> assetRendererFactories) {
065
066 for (AssetRendererFactory assetRendererFactory :
067 assetRendererFactories) {
068
069 register(assetRendererFactory);
070 }
071 }
072
073 public static void unregister(AssetRendererFactory assetRendererFactory) {
074 getAssetRendererFactoryRegistry().unregister(assetRendererFactory);
075 }
076
077 public static void unregister(
078 List<AssetRendererFactory> assetRendererFactories) {
079
080 for (AssetRendererFactory assetRendererFactory :
081 assetRendererFactories) {
082
083 unregister(assetRendererFactory);
084 }
085 }
086
087 public void setAssetRendererFactoryRegistry(
088 AssetRendererFactoryRegistry assetRendererFactoryRegistry) {
089
090 PortalRuntimePermission.checkSetBeanProperty(getClass());
091
092 _assetRendererFactoryRegistry = assetRendererFactoryRegistry;
093 }
094
095 private static AssetRendererFactoryRegistry _assetRendererFactoryRegistry;
096
097 }