Package org.forgerock.opendj.setup.model
Class Installation
- java.lang.Object
-
- org.forgerock.opendj.setup.model.Installation
-
public final class Installation extends Object
Class to be used by client tools to retrieve install and instance paths.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACCEPTED_LICENSE_FILE_NAME
The accepted license file name.static String
ADMIN_BACKEND_DIR_NAME
The admin backend directory name.static String
ADMIN_BACKEND_FILE_NAME
The admin data LDIF backend file name.static String
CONFIG_DIR_NAME
Config directory name.static String
CONFIG_FILE_NAME
The configuration LDIF file name.static Path
CONFIG_FILE_RELATIVE_PATH
RelativePath
to the OpenDJ instance of the config/config.ldif directory.static String
DATABASE_DIR_NAME
Server instance database folder.static String
EXTENSIONS_DIR_NAME
Extensions directory name.static String
INSTALL_ROOT_SYSTEM_PROPERTY
The system property used to specify opendj archive root path.static String
LEGAL_NOTICES_DIR_NAME
The Legal folder which contains license file.static String
LIB_DIR_NAME
The lib directory name.static String
LICENSE_FILE_NAME
The license file name.static String
LOGS_DIR_NAME
Logs directory name.static String
MAC_JAVA_APP_STUB_NAME_FILE_NAME
The universal Java application stub file name.static Path
PROFILES_VERSION_FILE_RELATIVE_PATH
The profiles version file relative path.static String
SCHEMA_DIR_NAME
The schema directory name.static String
SETUP_PROFILES_DIR_NAME
The directory containing setup profiles.static String
SETUP_TOOL_NAME
Platform independent name of the setup tool.static String
START_DS_TOOL_NAME
Platform independent name of the start-ds tool.static String
STATUS_TOOL_NAME
Platform independent name of the status tool.static String
TEMPLATE_DIR_NAME
The template directory name.static String
UNIX_BINARIES_DIR_NAME
UNIX binaries (scripts) directory name.static String
UPGRADE_TOOL_NAME
Platform independent name of the upgrade tool.static String
VAR_DIR_NAME
The directory containing variable files.static String
WINDOWS_BINARIES_DIR_NAME
Windows binaries (batch files) directory name.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Path
getInstancePathFromInstallPath(Path installPath)
Returns thePath
of the instance of the server contained in the provided server installation path.static String
getToolName(String toolName)
Returns the provided tool name according to the running operating system.static Path
getToolPath(String toolName)
Returns the provided tool path according to the running operating system.static Path
getToolPath(Path archivePath, String toolName)
Returns the provided tool path according to the running operating system and the provided archive path.static Path
installPath()
Returns the server's installation path.static Path
instanceConfigFilePath()
Returns aPath
to the server instance config.ldif file.static Path
instancePath()
Returns the instance root directory (the path where the instance is installed).
-
-
-
Field Detail
-
WINDOWS_BINARIES_DIR_NAME
public static final String WINDOWS_BINARIES_DIR_NAME
Windows binaries (batch files) directory name.- See Also:
- Constant Field Values
-
UNIX_BINARIES_DIR_NAME
public static final String UNIX_BINARIES_DIR_NAME
UNIX binaries (scripts) directory name.- See Also:
- Constant Field Values
-
CONFIG_DIR_NAME
public static final String CONFIG_DIR_NAME
Config directory name.- See Also:
- Constant Field Values
-
DATABASE_DIR_NAME
public static final String DATABASE_DIR_NAME
Server instance database folder.- See Also:
- Constant Field Values
-
EXTENSIONS_DIR_NAME
public static final String EXTENSIONS_DIR_NAME
Extensions directory name.- See Also:
- Constant Field Values
-
LEGAL_NOTICES_DIR_NAME
public static final String LEGAL_NOTICES_DIR_NAME
The Legal folder which contains license file.- See Also:
- Constant Field Values
-
LIB_DIR_NAME
public static final String LIB_DIR_NAME
The lib directory name.- See Also:
- Constant Field Values
-
LOGS_DIR_NAME
public static final String LOGS_DIR_NAME
Logs directory name.- See Also:
- Constant Field Values
-
SCHEMA_DIR_NAME
public static final String SCHEMA_DIR_NAME
The schema directory name.- See Also:
- Constant Field Values
-
TEMPLATE_DIR_NAME
public static final String TEMPLATE_DIR_NAME
The template directory name.- See Also:
- Constant Field Values
-
VAR_DIR_NAME
public static final String VAR_DIR_NAME
The directory containing variable files.- See Also:
- Constant Field Values
-
ADMIN_BACKEND_DIR_NAME
public static final String ADMIN_BACKEND_DIR_NAME
The admin backend directory name.- See Also:
- Constant Field Values
-
PROFILES_VERSION_FILE_RELATIVE_PATH
public static final Path PROFILES_VERSION_FILE_RELATIVE_PATH
The profiles version file relative path.
-
CONFIG_FILE_NAME
public static final String CONFIG_FILE_NAME
The configuration LDIF file name.- See Also:
- Constant Field Values
-
ADMIN_BACKEND_FILE_NAME
public static final String ADMIN_BACKEND_FILE_NAME
The admin data LDIF backend file name.- See Also:
- Constant Field Values
-
LICENSE_FILE_NAME
public static final String LICENSE_FILE_NAME
The license file name.- See Also:
- Constant Field Values
-
ACCEPTED_LICENSE_FILE_NAME
public static final String ACCEPTED_LICENSE_FILE_NAME
The accepted license file name.- See Also:
- Constant Field Values
-
MAC_JAVA_APP_STUB_NAME_FILE_NAME
public static final String MAC_JAVA_APP_STUB_NAME_FILE_NAME
The universal Java application stub file name.- See Also:
- Constant Field Values
-
SETUP_TOOL_NAME
public static final String SETUP_TOOL_NAME
Platform independent name of the setup tool.- See Also:
- Constant Field Values
-
SETUP_PROFILES_DIR_NAME
public static final String SETUP_PROFILES_DIR_NAME
The directory containing setup profiles.- See Also:
- Constant Field Values
-
START_DS_TOOL_NAME
public static final String START_DS_TOOL_NAME
Platform independent name of the start-ds tool.- See Also:
- Constant Field Values
-
STATUS_TOOL_NAME
public static final String STATUS_TOOL_NAME
Platform independent name of the status tool.- See Also:
- Constant Field Values
-
UPGRADE_TOOL_NAME
public static final String UPGRADE_TOOL_NAME
Platform independent name of the upgrade tool.- See Also:
- Constant Field Values
-
INSTALL_ROOT_SYSTEM_PROPERTY
public static final String INSTALL_ROOT_SYSTEM_PROPERTY
The system property used to specify opendj archive root path.- See Also:
- Constant Field Values
-
-
Method Detail
-
installPath
public static Path installPath()
Returns the server's installation path.- Returns:
- The server's installation path.
-
instancePath
public static Path instancePath()
Returns the instance root directory (the path where the instance is installed).- Returns:
- the instance root directory (the path where the instance is installed).
-
instanceConfigFilePath
public static Path instanceConfigFilePath()
Returns aPath
to the server instance config.ldif file.- Returns:
- a
Path
to the server instance config.ldif file.
-
getInstancePathFromInstallPath
public static Path getInstancePathFromInstallPath(Path installPath)
Returns thePath
of the instance of the server contained in the provided server installation path.If the server is not setup, or does not run in split install/instance mode, then this method returns
null
.- Parameters:
installPath
- The installation path- Returns:
- The path of the server instance ran by the provided server installation path or
null
, if there is no server has been setup from this installation path or if the server has not been setup in split install/instance mode.
-
getToolPath
public static Path getToolPath(String toolName)
Returns the provided tool path according to the running operating system.- Parameters:
toolName
- The name of the tool to run (without any extension)- Returns:
- The absolute path to the tool script
-
getToolPath
public static Path getToolPath(Path archivePath, String toolName)
Returns the provided tool path according to the running operating system and the provided archive path.- Parameters:
archivePath
- The OpenDJ exploded archive root pathtoolName
- The name of the tool to run (without any extension)- Returns:
- The absolute path to the tool script
-
-