Interface Resource

All Known Implementing Classes:
ClassPathResource, FileSystemResource, ReaderResource, StringResource

public interface Resource
A textual resource (such as a .sql file) used by MigrateDB.
  • Method Details

    • getName

      String getName()
      Returns:
      The path of this resource, separated by forward slashes ("/" on all platforms. Never ends with a slash.
    • getLastNameComponent

      default String getLastNameComponent()
      Returns:
      Just the last component of the name of this resource, the "file name".
    • describeLocation

      String describeLocation()
      Returns:
      A hint that describes the physical location of this resource (like a full path to a file on disk)
    • read

      Reader read(Charset charset)
      Returns:
      The contents of the resource.
    • lastNameComponentOf

      static String lastNameComponentOf(String name)