Package org.forgerock.opendj.config
Record Class ServerPaths
java.lang.Object
java.lang.Record
org.forgerock.opendj.config.ServerPaths
- Record Components:
installPath
- the installation pathinstancePath
- the instance pathconfigFile
- the path to the configuration file
Stores and manages server paths: the instance path, installation path, and configuration file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for the server paths.static final record
Paths to the install and instance directories. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Config directory name.static final String
The configuration LDIF file name.static final Path
RelativePath
to the OpenDJ instance of the config/config.ldif directory.static final String
The install root where binaries are.static final String
The instance path where the server is running.static final String
The name of the system property that can be used to specify the path to the configuration file that should be used to initialize the config handler. -
Constructor Summary
ConstructorsConstructorDescriptionServerPaths
(Path installPath, Path instancePath, Path configFile) Canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Path
computeInstancePathFromConfigFile
(Path configFile) Returns the instance path computed from the configuration file.Returns the value of theconfigFile
record component.final boolean
Indicates whether some other object is "equal to" this one.static ServerPaths
Returns the default server paths.static Path
getInstancePathFromInstanceLocFile
(Path installPath) Returns the instance path stored in the instance.loc file.getSupportedInstanceLocFileLocation
(Path archivePath) Returns the list of supported instance.loc file locations.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinstallPath
record component.Returns the value of theinstancePath
record component.static void
Sets the system properties for the install and instance directories.Returns the system properties for the install and instance directories.static ServerPaths
Creates a new server paths.static ServerPaths.Builder
Creates a new server paths builder.static void
setSpecificSystemProperties
(String installRoot, String instanceRoot) Sets the system properties for the install and instance directories.static void
setSpecificSystemProperties
(Path installRoot, Path instanceRoot) Sets the system properties for the install and instance directories.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CONFIG_DIR_NAME
Config directory name.- See Also:
-
CONFIG_FILE_NAME
The configuration LDIF file name.- See Also:
-
CONFIG_FILE_RELATIVE_PATH
RelativePath
to the OpenDJ instance of the config/config.ldif directory. -
INSTALL_ROOT_SYSTEM_PROPERTY
The install root where binaries are.- See Also:
-
INSTANCE_ROOT_SYSTEM_PROPERTY
The instance path where the server is running.- See Also:
-
PROPERTY_CONFIG_FILE
The name of the system property that can be used to specify the path to the configuration file that should be used to initialize the config handler.- See Also:
-
-
Constructor Details
-
ServerPaths
Canonical constructor.
-
-
Method Details
-
saveSystemProperties
Returns the system properties for the install and instance directories.- Returns:
- the system properties for the install and instance directories
-
restoreSystemProperties
Sets the system properties for the install and instance directories.- Parameters:
savedValues
- the installation and instance directories
-
setSpecificSystemProperties
Sets the system properties for the install and instance directories.- Parameters:
installRoot
- the installation directory rootinstanceRoot
- the instance directory root
-
setSpecificSystemProperties
Sets the system properties for the install and instance directories.- Parameters:
installRoot
- the installation directory rootinstanceRoot
- the instance directory root
-
serverPaths
Creates a new server paths.- Returns:
- the server paths
-
serverPathsBuilder
Creates a new server paths builder.- Returns:
- the server paths builder
-
getDefaultServerPaths
Returns the default server paths.- Returns:
- the default server paths
-
getSupportedInstanceLocFileLocation
Returns the list of supported instance.loc file locations.- Parameters:
archivePath
- the path to the exploded archive- Returns:
- the list of supported instance.loc file locations
-
getInstancePathFromInstanceLocFile
Returns the instance path stored in the instance.loc file.- Parameters:
installPath
- the installation path- Returns:
- the instance path stored in the instance.loc file
-
computeInstancePathFromConfigFile
Returns the instance path computed from the configuration file.- Parameters:
configFile
- the configuration file- Returns:
- the instance path computed from the configuration file
-
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)
. -
installPath
Returns the value of theinstallPath
record component.- Returns:
- the value of the
installPath
record component
-
instancePath
Returns the value of theinstancePath
record component.- Returns:
- the value of the
instancePath
record component
-
configFile
Returns the value of theconfigFile
record component.- Returns:
- the value of the
configFile
record component
-