Interface ModulesLoader

  • All Known Implementing Classes:
    DefaultModulesLoader

    public interface ModulesLoader
    Interface for objects that can load a set of modules via the REST API, which is intended to include not just what the REST API calls "assets" (regular modules), but also options, services, transforms, and namespaces. Note that in both of the methods in this interface, the DatabaseClient is used for loading REST extensions. This is to account for the fact that how search options are loaded (i.e. the URI they're written to) differs based on what REST server they're loaded from. But the implementation is not expected to use this DatabaseClient for loading non-REST modules - that is likely done via an instance of AssetFileLoader that uses the App-Services port by default for loading non-REST modules.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Set<org.springframework.core.io.Resource> loadModules​(com.marklogic.client.DatabaseClient client, ModulesFinder modulesFinder, java.lang.String... paths)
      Prefer this method when loading modules from multiple paths, as the non-REST modules from all paths should be loaded in a single batch.
      java.util.Set<org.springframework.core.io.Resource> loadModules​(java.lang.String directory, ModulesFinder modulesFinder, com.marklogic.client.DatabaseClient client)
      Load modules from the given directory
    • Method Detail

      • loadModules

        java.util.Set<org.springframework.core.io.Resource> loadModules​(java.lang.String directory,
                                                                        ModulesFinder modulesFinder,
                                                                        com.marklogic.client.DatabaseClient client)
        Load modules from the given directory
        Parameters:
        directory -
        modulesFinder -
        client - the DatabaseClient to use for loading REST extensions
        Returns:
        the set of resources containing all modules written
      • loadModules

        java.util.Set<org.springframework.core.io.Resource> loadModules​(com.marklogic.client.DatabaseClient client,
                                                                        ModulesFinder modulesFinder,
                                                                        java.lang.String... paths)
        Prefer this method when loading modules from multiple paths, as the non-REST modules from all paths should be loaded in a single batch.
        Parameters:
        client -
        modulesFinder -
        paths - the DatabaseClient to use for loading REST extensions
        Returns:
        the set of resources containing all modules written