001
014
015 package com.liferay.portlet.asset;
016
017 import com.liferay.portlet.asset.model.AssetRendererFactory;
018
019 import java.util.List;
020
021
025 public class AssetRendererFactoryRegistryUtil {
026
027 public static List<AssetRendererFactory> getAssetRendererFactories() {
028 return getAssetRendererFactoryRegistry().getAssetRendererFactories();
029 }
030
031 public static AssetRendererFactory getAssetRendererFactoryByClassName(
032 String className) {
033
034 return getAssetRendererFactoryRegistry().
035 getAssetRendererFactoryByClassName(className);
036 }
037
038 public static AssetRendererFactory getAssetRendererFactoryByType(
039 String type) {
040
041 return getAssetRendererFactoryRegistry().getAssetRendererFactoryByType(
042 type);
043 }
044
045 public static AssetRendererFactoryRegistry
046 getAssetRendererFactoryRegistry() {
047
048 return _assetRendererFactoryRegistry;
049 }
050
051 public static long[] getClassNameIds() {
052 return getAssetRendererFactoryRegistry().getClassNameIds();
053 }
054
055 public static void register(AssetRendererFactory assetRendererFactory) {
056 getAssetRendererFactoryRegistry().register(assetRendererFactory);
057 }
058
059 public static void register(
060 List<AssetRendererFactory> assetRendererFactories) {
061
062 for (AssetRendererFactory assetRendererFactory :
063 assetRendererFactories) {
064
065 register(assetRendererFactory);
066 }
067 }
068
069 public static void unregister(AssetRendererFactory assetRendererFactory) {
070 getAssetRendererFactoryRegistry().unregister(assetRendererFactory);
071 }
072
073 public static void unregister(
074 List<AssetRendererFactory> assetRendererFactories) {
075
076 for (AssetRendererFactory assetRendererFactory :
077 assetRendererFactories) {
078
079 unregister(assetRendererFactory);
080 }
081 }
082
083 public void setAssetRendererFactoryRegistry(
084 AssetRendererFactoryRegistry assetRendererFactoryRegistry) {
085
086 _assetRendererFactoryRegistry = assetRendererFactoryRegistry;
087 }
088
089 private static AssetRendererFactoryRegistry _assetRendererFactoryRegistry;
090
091 }