Interface VersionedCatalog

All Superinterfaces:
Catalog

public interface VersionedCatalog extends Catalog
An extended catalog keeping track of items as defined by catalog based migrations and their version.
Since:
1.7.0
Author:
Michael J. Simons
  • Method Details

    • getCatalogPriorTo

      default Catalog getCatalogPriorTo(MigrationVersion version)
      Creates a view on this catalog prior to the definition of version.
      Parameters:
      version - The version up to but not including to retrieve items for
      Returns:
      A subset of this catalog
    • getCatalogAt

      default Catalog getCatalogAt(MigrationVersion version)
      Creates a view on this catalog at the definition of version.
      Parameters:
      version - The version up to and including to retrieve the items
      Returns:
      A subset of this catalog
    • getItemsPriorTo

      Collection<CatalogItem<?>> getItemsPriorTo(MigrationVersion version)
      A list of all items prior to a given version.
      Parameters:
      version - The version up to but not including to retrieve items for
      Returns:
      a list of all items prior to the introduction of version.
    • getItemPriorTo

      Optional<CatalogItem<?>> getItemPriorTo(Name name, MigrationVersion version)
      A single item prior to a given version. The result will be empty if the item has not yet been defined.
      Parameters:
      name - The id of the item to retrieve
      version - The version up to but not including to retrieve the constraint for
      Returns:
      an optional item as defined prior to the introduction of version
    • getItems

      Collection<CatalogItem<?>> getItems(MigrationVersion version)
      A list of all items up to and including a given version.
      Parameters:
      version - The version up to retrieve constraints for
      Returns:
      a list of all items up to the introduction of version.
    • getItem

      Optional<CatalogItem<?>> getItem(Name name, MigrationVersion version)
      A single item for a given version. The result will be empty if the item has not yet been defined.
      Parameters:
      name - The id of the item to retrieve
      version - The version in which to retrieve the constraint for
      Returns:
      an optional item as defined with to the introduction of version