Class StorageProviderFactory.StorageConfig

java.lang.Object
dev.crafty.core.storage.StorageProviderFactory.StorageConfig
Enclosing class:
StorageProviderFactory

public static class StorageProviderFactory.StorageConfig extends Object
Configuration for storage providers.
  • Constructor Details

    • StorageConfig

      public StorageConfig()
  • Method Details

    • forYaml

      public static StorageProviderFactory.StorageConfig forYaml(String directory)
      Creates a new StorageConfig for YAML storage.
      Parameters:
      directory - The directory to store files in
      Returns:
      The storage config
    • forMongoDb

      public static StorageProviderFactory.StorageConfig forMongoDb(String connectionUrl, String databaseName)
    • forPostgres

      public static StorageProviderFactory.StorageConfig forPostgres(String tableName, String connectionUrl, String username, String password)
      Creates a new StorageConfig for PostgreSQL storage.
      Parameters:
      tableName - The name of the table to store objects in
      connectionUrl - The JDBC connection URL
      username - The database username
      password - The database password
      Returns:
      The storage config
    • forMySql

      public static StorageProviderFactory.StorageConfig forMySql(String tableName, String connectionUrl, String username, String password)
      Creates a new StorageConfig for MySQL storage.
      Parameters:
      tableName - The name of the table to store objects in
      connectionUrl - The JDBC connection URL
      username - The database username
      password - The database password
      Returns:
      The storage config