Class DatabaseConfiguration


  • public class DatabaseConfiguration
    extends Object
    Enables to configure the access to a database.

    This configuration is notably used to restrict the projects in which content shall be read.

    An instance of DatabaseConfiguration shall be given as an option to the model reader using Options.OPTION_DATABASE_CONFIGURATION.

    See Also:
    Options.OPTION_DATABASE_CONFIGURATION, getProjects()
    • Constructor Detail

      • DatabaseConfiguration

        public DatabaseConfiguration()
    • Method Detail

      • getProjects

        public final List<String> getProjects()
        Returns the list of projects from which content shall be read.

        If the an empty list is returned, content from all projects is read. If the list is not empty, only content from returned projects is read.

        It is strongly recommended to restrict the scope of projects in which content shall be read. The returned list is modifiable, so that project names can be added or removed.

        Returns:
        a modifiable list of projects from which content shall be read.
      • getFieldFilters

        public final List<FieldFilter> getFieldFilters()
        Returns the list of filters that determines what fields are to include for each type.
        Returns:
        a modifiable list of filters.