Class DatabaseConfigVO


  • public class DatabaseConfigVO
    extends Object
    Get database configuration parameters. The parameter values are retrieved by the configured implementation of the DBConnection interface.

    This class cannot be used to alter configuration; it is just used to export and can be used for display purposes

    Author:
    kevinvandevelde at atmire.com
    • Constructor Detail

      • DatabaseConfigVO

        public DatabaseConfigVO()
    • Method Detail

      • getDatabaseUrl

        public String getDatabaseUrl()
        Get the JDBC URL which identifies the DBMS instance and database. This is set in the DSpace configuration.
        Returns:
        URL pointing to the configured database.
      • setDatabaseUrl

        public void setDatabaseUrl​(String databaseUrl)
        DO NOT USE unless you are writing a DBConnection implementation. This method does not set the URL that will be used to connect to the database.
        Parameters:
        databaseUrl - JDBC URL being used by the DBConnection for creating connections.
      • getDatabaseDriver

        public String getDatabaseDriver()
        Get the name of the DBMS driver, which should indicate what DBMS is in use.
        Returns:
        the driver's notion of its "name".
      • setDatabaseDriver

        public void setDatabaseDriver​(String databaseDriver)
        DO NOT USE unless you are writing an implementation of DBConnection. This method does not select the DBMS driver.
        Parameters:
        databaseDriver - the driver's name.
      • getUserName

        public String getUserName()
        Get the name of the database role used to authenticate connections to the DBMS.
        Returns:
        DBMS user name, from DSpace configuration.
      • setUserName

        public void setUserName​(String userName)
        DO NOT USE unless you are writing an implementation of DBConnection. This method does not alter the user name.
        Parameters:
        userName - the configured DBMS username.
      • getSchema

        public String getSchema()
        Get the name of the database schema.
        Returns:
        name of the schema.
      • setSchema

        public void setSchema​(String schema)
        DO NOT USE unless you are writing an implementation of DBConnection. This method does not set the schema that will be used.
        Parameters:
        schema - name of the database schema, from configuration.
      • getMaxConnections

        public int getMaxConnections()
        Get the maximum number of concurrent DBMS connections that will be opened (if possible).
        Returns:
        configured maximum DBMS connection count.
      • setMaxConnections

        public void setMaxConnections​(int maxConnections)
        DO NOT USE unless you are writing an implementation of DBConnection. This method does not set the connection maximum.
        Parameters:
        maxConnections - configured maximum number of concurrent DBMS connections.