Class DefaultRegistry

  • All Implemented Interfaces:
    org.smooks.api.Registry

    public class DefaultRegistry
    extends Object
    implements org.smooks.api.Registry
    • Constructor Detail

      • DefaultRegistry

        public DefaultRegistry​(ClassLoader classLoader,
                               org.smooks.api.resource.config.loader.ResourceConfigLoader resourceConfigLoader,
                               org.smooks.api.profile.ProfileStore profileStore)
    • Method Detail

      • registerObject

        public void registerObject​(Object value)
        Specified by:
        registerObject in interface org.smooks.api.Registry
      • registerObject

        public void registerObject​(Object key,
                                   Object value)
        Specified by:
        registerObject in interface org.smooks.api.Registry
      • deRegisterObject

        public void deRegisterObject​(Object key)
        Specified by:
        deRegisterObject in interface org.smooks.api.Registry
      • lookup

        public <R> R lookup​(Function<Map<Object,​Object>,​R> function)
        Specified by:
        lookup in interface org.smooks.api.Registry
      • lookup

        public <T> T lookup​(Object key)
        Specified by:
        lookup in interface org.smooks.api.Registry
      • lookup

        public <T> T lookup​(org.smooks.api.TypedKey<T> key)
        Specified by:
        lookup in interface org.smooks.api.Registry
      • registerResources

        public org.smooks.api.resource.config.ResourceConfigSeq registerResources​(String baseURI,
                                                                                  InputStream inputStream)
        Register the set of resources specified in the supplied XML configuration stream.
        Specified by:
        registerResources in interface org.smooks.api.Registry
        Parameters:
        baseURI - The base URI to be associated with the configuration stream.
        inputStream - XML resource configuration stream.
        Returns:
        The ResourceConfigList created from the added resource configuration.
        See Also:
        ResourceConfig
      • addProfileSets

        protected void addProfileSets​(List<org.smooks.api.profile.ProfileSet> profileSets)
      • registerResourceConfig

        public void registerResourceConfig​(org.smooks.api.resource.config.ResourceConfig resourceConfig)
        Register a ResourceConfig on this context store.

        The config gets added to the default resource list.

        Specified by:
        registerResourceConfig in interface org.smooks.api.Registry
        Parameters:
        resourceConfig - The Content Delivery Resource definition to be registered.
      • registerResourceConfigSeq

        public void registerResourceConfigSeq​(org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq)
        Add a ResourceConfigSeq to this registry.
        Specified by:
        registerResourceConfigSeq in interface org.smooks.api.Registry
        Parameters:
        resourceConfigSeq - All the ResourceConfigList instances added on this registry.
      • close

        public void close()
        Specified by:
        close in interface org.smooks.api.Registry
      • getClassLoader

        public ClassLoader getClassLoader()
        Specified by:
        getClassLoader in interface org.smooks.api.Registry