Package org.opends.quicksetup
Class Configuration
- java.lang.Object
-
- org.opends.quicksetup.Configuration
-
public class Configuration extends Object
Represents the contents of an OpenDS configuration file.
-
-
Constructor Summary
Constructors Constructor Description Configuration(Installation install, File file)Create a Configuration from a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAdminConnectorPort()Provides the administration port as is specified in the config.ldif file.Set<String>getBaseDNs()Returns the list of base dns as they appear in the configuration file.StringgetContents()Provides the contents of the config.ldif file in a String.Set<String>getDatabasePaths()Returns the list of paths where the databases are installed as they appear in the configuration file.Set<String>getDirectoryManagerDns()Returns the list of directory manager dns as they appear in the configuration file.Set<String>getLogPaths()Returns the list of paths where the logs files are located as they appear in the configuration file.StringgetLowerCaseContents()Provides the contents of the config.ldif file in a lower case String.Set<String>getOutsideDbs()Returns a Set of relative paths containing the db paths outside the installation.Set<String>getOutsideLogs()Returns a Set of relative paths containing the log paths outside the installation.intgetPort()Provides the LDAP port as is specified in the config.ldif file.intgetReplicationPort()Provides the Replication port as is specified in the config.ldif file.booleanhasBeenModified()Indicates whether the config.ldif file has been modified (compared to what we had in the zip file).booleanisReplicationServer()Tells whether this server is configured as a replication server or not.
-
-
-
Constructor Detail
-
Configuration
public Configuration(Installation install, File file)
Create a Configuration from a file.- Parameters:
install- of which this configuration is partfile- config.ldif file
-
-
Method Detail
-
getDirectoryManagerDns
public Set<String> getDirectoryManagerDns() throws IOException
Returns the list of directory manager dns as they appear in the configuration file.- Returns:
- the list of directory manager dns as they appear in the configuration file.
- Throws:
IOException- if there were problems reading the information from the configuration file.
-
getPort
public int getPort() throws IOExceptionProvides the LDAP port as is specified in the config.ldif file.- Returns:
- the LDAP port specified in the config.ldif file.
- Throws:
IOException- if there were problems reading the information from the configuration file.
-
getAdminConnectorPort
public int getAdminConnectorPort() throws IOExceptionProvides the administration port as is specified in the config.ldif file.- Returns:
- the administration port specified in the config.ldif file.
- Throws:
IOException- if there were problems reading the information from the configuration file.
-
isReplicationServer
public boolean isReplicationServer() throws IOExceptionTells whether this server is configured as a replication server or not.- Returns:
trueif the server is configured as a Replication Server andfalseotherwise.- Throws:
IOException- if there were problems reading the information from the configuration file.
-
getReplicationPort
public int getReplicationPort() throws IOExceptionProvides the Replication port as is specified in the config.ldif file. Returns -1 if this server is not a Replication Server.- Returns:
- the Replication port specified in the config.ldif file.
- Throws:
IOException- if there were problems reading the information from the configuration file.
-
getLogPaths
public Set<String> getLogPaths() throws IOException
Returns the list of paths where the logs files are located as they appear in the configuration file.- Returns:
- the list of paths where the logs files are located as they appear in the configuration file.
- Throws:
IOException- if there were problems reading the information from the configuration file.
-
hasBeenModified
public boolean hasBeenModified() throws IOExceptionIndicates whether the config.ldif file has been modified (compared to what we had in the zip file). This is used to know if we have configured the current binaries or not.- Returns:
trueif the config.ldif file has been modified, orfalseif not.- Throws:
IOException- if there were problems reading the information from the configuration file.
-
getOutsideLogs
public Set<String> getOutsideLogs() throws IOException
Returns a Set of relative paths containing the log paths outside the installation.- Returns:
- a Set of relative paths containing the log paths outside the installation.
- Throws:
IOException- if there is trouble reading the config file
-
getOutsideDbs
public Set<String> getOutsideDbs() throws IOException
Returns a Set of relative paths containing the db paths outside the installation.- Returns:
- a Set of relative paths containing the db paths outside the installation.
- Throws:
IOException- if there is trouble reading the config file
-
getContents
public String getContents() throws IOException
Provides the contents of the config.ldif file in a String.- Returns:
- a String representing the contents of the config.ldif file.
- Throws:
IOException- if there was a problem reading the file
-
getLowerCaseContents
public String getLowerCaseContents() throws IOException
Provides the contents of the config.ldif file in a lower case String.- Returns:
- a lower case String representing the contents of the config.ldif file.
- Throws:
IOException- if there was a problem reading the file
-
getDatabasePaths
public Set<String> getDatabasePaths() throws IOException
Returns the list of paths where the databases are installed as they appear in the configuration file.- Returns:
- the list of paths where the databases are installed as they appear in the configuration file.
- Throws:
IOException- if there is a problem reading the config file.
-
getBaseDNs
public Set<String> getBaseDNs() throws IOException
Returns the list of base dns as they appear in the configuration file.- Returns:
- the list of base dns as they appear in the configuration file.
- Throws:
IOException- if there is a problem reading the config file.
-
-