All Downloads are FREE. Search and download functionalities are using the official Maven repository.

au.net.causal.maven.plugins.boxdb.db.BoxDatabaseFactory Maven / Gradle / Ivy

There is a newer version: 3.3
Show newest version
package au.net.causal.maven.plugins.boxdb.db;

import java.util.Collections;
import java.util.List;

/**
 * Factory for boxed databases.  Implementations should have zero-argument constructors and be registered
 * in a /META-INF/services/au.net.causal.maven.plugins.boxdb.db.BoxDatabaseFactory file.
 */
public interface BoxDatabaseFactory
{
    /**
     * Creates a box database.
     *
     * @param boxConfiguration configuration for the database itself.
     * @param projectConfiguration generic project and global configuration.
     * @param context context for interacting with Maven and other parts of the system.
     *
     * @return the created database.
     *
     * @throws BoxDatabaseException if an error occurs.
     */
    public BoxDatabase create(BoxConfiguration boxConfiguration, ProjectConfiguration projectConfiguration, BoxContext context)
    throws BoxDatabaseException;

    /**
     * The database type name.  Users select this factory by specifying this name as database type in the
     * box configuration or through a property on the command line.
     */
    public String name();

    /**
     * Returns a list of database versions available from this provider.  The list returned is in order from oldest
     * version to newest.
     * 

* * This might not list all available versions, but only the canonical versions. For example, the database * version 5.4.28 might be available through an alias of 5.4 and 5, but * only 5.4.28 may be listed. However it is provider-specific behaviour whether or not these * non-canonical versions are omitted. In the end, this list is meant to be an aid for a user to choose a version, * and may not be complete or even populated at all. *

* * The default implementation returns an empty list. * * @param projectConfiguration generic project and global configuration. * @param context context for interacting with Maven and other parts of the system. * * @return a list of database versions. * * @throws BoxDatabaseException if an error occurs. * * @since 3.0 */ public default List availableVersions(ProjectConfiguration projectConfiguration, BoxContext context) throws BoxDatabaseException { return Collections.emptyList(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy