001
014
015 package com.liferay.portal.kernel.servlet.taglib;
016
017 import com.liferay.registry.collections.ServiceTrackerCollections;
018 import com.liferay.registry.collections.ServiceTrackerMap;
019
020
023 public class TagKeyFactoryRegistry {
024
025 public static TagKeyFactory getTagKeyFactory(String tagClassName) {
026 return _instance._tagKeyFactories.getService(tagClassName);
027 }
028
029 private TagKeyFactoryRegistry() {
030 _tagKeyFactories.open();
031 }
032
033 private static final TagKeyFactoryRegistry _instance =
034 new TagKeyFactoryRegistry();
035
036 private final ServiceTrackerMap<String, TagKeyFactory>
037 _tagKeyFactories = ServiceTrackerCollections.singleValueMap(
038 TagKeyFactory.class, "tagClassName");
039
040 }