Class ConfigDataResourceNotFoundException

All Implemented Interfaces:
Serializable, OriginProvider

public class ConfigDataResourceNotFoundException extends ConfigDataNotFoundException
ConfigDataNotFoundException thrown when a ConfigDataResource cannot be found.
Since:
2.4.0
Author:
Phillip Webb
See Also:
  • Constructor Details

  • Method Details

    • getResource

      public ConfigDataResource getResource()
      Return the resource that could not be found.
      Returns:
      the resource
    • getLocation

      public ConfigDataLocation getLocation()
      Return the original location that was resolved to determine the resource.
      Returns:
      the location or null if no location is available
    • getOrigin

      public Origin getOrigin()
      Description copied from interface: OriginProvider
      Return the source origin or null if the origin is not known.
      Returns:
      the origin or null
    • getReferenceDescription

      public String getReferenceDescription()
      Description copied from class: ConfigDataNotFoundException
      Return a description of actual referenced item that could not be found.
      Specified by:
      getReferenceDescription in class ConfigDataNotFoundException
      Returns:
      a description of the referenced items
    • throwIfDoesNotExist

      public static void throwIfDoesNotExist(ConfigDataResource resource, Path pathToCheck)
      Throw a ConfigDataNotFoundException if the specified Path does not exist.
      Parameters:
      resource - the config data resource
      pathToCheck - the path to check
    • throwIfDoesNotExist

      public static void throwIfDoesNotExist(ConfigDataResource resource, File fileToCheck)
      Throw a ConfigDataNotFoundException if the specified File does not exist.
      Parameters:
      resource - the config data resource
      fileToCheck - the file to check
    • throwIfDoesNotExist

      public static void throwIfDoesNotExist(ConfigDataResource resource, Resource resourceToCheck)
      Throw a ConfigDataNotFoundException if the specified Resource does not exist.
      Parameters:
      resource - the config data resource
      resourceToCheck - the resource to check