Class Configuration


  • public class Configuration
    extends Object
    Represents the contents of an OpenDS configuration file.
    • Constructor Detail

      • Configuration

        public Configuration​(Installation install,
                             File file)
        Create a Configuration from a file.
        Parameters:
        install - of which this configuration is part
        file - 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 IOException
        Provides 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 IOException
        Provides 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 IOException
        Tells whether this server is configured as a replication server or not.
        Returns:
        true if the server is configured as a Replication Server and false otherwise.
        Throws:
        IOException - if there were problems reading the information from the configuration file.
      • getReplicationPort

        public int getReplicationPort()
                               throws IOException
        Provides 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 IOException
        Indicates 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:
        true if the config.ldif file has been modified, or false if 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.