Record Class PathLookupImpl
java.lang.Object
java.lang.Record
org.elasticsearch.entitlement.runtime.policy.PathLookupImpl
- All Implemented Interfaces:
PathLookup
public record PathLookupImpl(Path homeDir, Path configDir, Path[] dataDirs, Path sharedDataDir, Path[] sharedRepoDirs, Path libDir, Path modulesDir, Path pluginsDir, Path logsDir, Path tempDir, Path pidFile, Function<String,Stream<String>> settingResolver)
extends Record
implements PathLookup
Standard manager for resolving known paths.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.entitlement.runtime.policy.PathLookup
PathLookup.BaseDir -
Constructor Summary
ConstructorsConstructorDescriptionPathLookupImpl(Path homeDir, Path configDir, Path[] dataDirs, Path sharedDataDir, Path[] sharedRepoDirs, Path libDir, Path modulesDir, Path pluginsDir, Path logsDir, Path tempDir, Path pidFile, Function<String, Stream<String>> settingResolver) Creates an instance of aPathLookupImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigDirrecord component.Path[]dataDirs()Returns the value of thedataDirsrecord component.final booleanIndicates whether some other object is "equal to" this one.getBaseDirPaths(PathLookup.BaseDir baseDir) final inthashCode()Returns a hash code value for this object.homeDir()Returns the value of thehomeDirrecord component.libDir()Returns the value of thelibDirrecord component.logsDir()Returns the value of thelogsDirrecord component.Returns the value of themodulesDirrecord component.pidFile()Returns the value of thepidFilerecord component.Returns the value of thepluginsDirrecord component.resolveRelativePaths(PathLookup.BaseDir baseDir, Path relativePath) resolveSettingPaths(PathLookup.BaseDir baseDir, String settingName) Returns the value of thesettingResolverrecord component.Returns the value of thesharedDataDirrecord component.Path[]Returns the value of thesharedRepoDirsrecord component.tempDir()Returns the value of thetempDirrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PathLookupImpl
public PathLookupImpl(Path homeDir, Path configDir, Path[] dataDirs, Path sharedDataDir, Path[] sharedRepoDirs, Path libDir, Path modulesDir, Path pluginsDir, Path logsDir, Path tempDir, Path pidFile, Function<String, Stream<String>> settingResolver) Creates an instance of aPathLookupImplrecord class.- Parameters:
homeDir- the value for thehomeDirrecord componentconfigDir- the value for theconfigDirrecord componentdataDirs- the value for thedataDirsrecord componentsharedDataDir- the value for thesharedDataDirrecord componentsharedRepoDirs- the value for thesharedRepoDirsrecord componentlibDir- the value for thelibDirrecord componentmodulesDir- the value for themodulesDirrecord componentpluginsDir- the value for thepluginsDirrecord componentlogsDir- the value for thelogsDirrecord componenttempDir- the value for thetempDirrecord componentpidFile- the value for thepidFilerecord componentsettingResolver- the value for thesettingResolverrecord component
-
-
Method Details
-
getBaseDirPaths
- Specified by:
getBaseDirPathsin interfacePathLookup
-
resolveRelativePaths
- Specified by:
resolveRelativePathsin interfacePathLookup
-
resolveSettingPaths
- Specified by:
resolveSettingPathsin interfacePathLookup
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
homeDir
Returns the value of thehomeDirrecord component.- Returns:
- the value of the
homeDirrecord component
-
configDir
Returns the value of theconfigDirrecord component.- Returns:
- the value of the
configDirrecord component
-
dataDirs
Returns the value of thedataDirsrecord component.- Returns:
- the value of the
dataDirsrecord component
-
libDir
Returns the value of thelibDirrecord component.- Returns:
- the value of the
libDirrecord component
-
modulesDir
Returns the value of themodulesDirrecord component.- Returns:
- the value of the
modulesDirrecord component
-
pluginsDir
Returns the value of thepluginsDirrecord component.- Returns:
- the value of the
pluginsDirrecord component
-
logsDir
Returns the value of thelogsDirrecord component.- Returns:
- the value of the
logsDirrecord component
-
tempDir
Returns the value of thetempDirrecord component.- Returns:
- the value of the
tempDirrecord component
-
pidFile
Returns the value of thepidFilerecord component.- Specified by:
pidFilein interfacePathLookup- Returns:
- the value of the
pidFilerecord component
-
settingResolver
Returns the value of thesettingResolverrecord component.- Returns:
- the value of the
settingResolverrecord component
-