Package org.apache.solr.util
Class ModuleUtils
java.lang.Object
org.apache.solr.util.ModuleUtils
Parses the list of modules the user has requested in solr.xml, property solr.modules or
environment SOLR_MODULES. Then resolves the lib folder for each, so they can be added to class
path.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathgetModuleLibPath(Path solrInstallDirPath, String moduleName) Returns a path to a module's lib folderstatic PathgetModulesPath(Path solrInstallDirPath) Returns path for modules directory, given the solr install dir pathstatic booleanisValidName(String moduleName) Returns true if module name is validlistAvailableModules(Path solrInstallDirPath) Returns nam of all existing modulesstatic booleanmoduleExists(Path solrInstallDirPath, String moduleName) Returns true if a module name is valid and exists in the systemstatic Collection<String> resolveModulesFromStringOrSyspropOrEnv(String modulesFromString) Parses comma separated string of module names, in practice found in solr.xml.
-
Constructor Details
-
ModuleUtils
public ModuleUtils()
-
-
Method Details
-
getModuleLibPath
Returns a path to a module's lib folder- Parameters:
moduleName- name of module- Returns:
- the path to the module's lib folder
-
moduleExists
Returns true if a module name is valid and exists in the system -
listAvailableModules
Returns nam of all existing modules -
resolveModulesFromStringOrSyspropOrEnv
Parses comma separated string of module names, in practice found in solr.xml. If input string is empty (nothing configured) or null (e.g. tag not present in solr.xml), we continue to resolve from system property-Dsolr.modulesand if still empty, fall back to environment variableSOLR_MODULES.- Parameters:
modulesFromString- raw string of comma-separated module names- Returns:
- a set of module
-
isValidName
Returns true if module name is valid -
getModulesPath
Returns path for modules directory, given the solr install dir path
-