public class ConfigDataResourceNotFoundException extends ConfigDataNotFoundException
ConfigDataNotFoundException
thrown when a ConfigDataResource
cannot be
found.Constructor and Description |
---|
ConfigDataResourceNotFoundException(ConfigDataResource resource)
Create a new
ConfigDataResourceNotFoundException instance. |
ConfigDataResourceNotFoundException(ConfigDataResource resource,
java.lang.Throwable cause)
Create a new
ConfigDataResourceNotFoundException instance. |
Modifier and Type | Method and Description |
---|---|
ConfigDataLocation |
getLocation()
Return the original location that was resolved to determine the resource.
|
Origin |
getOrigin()
Return the source origin or
null if the origin is not known. |
java.lang.String |
getReferenceDescription()
Return a description of actual referenced item that could not be found.
|
ConfigDataResource |
getResource()
Return the resource that could not be found.
|
static void |
throwIfDoesNotExist(ConfigDataResource resource,
java.io.File fileToCheck)
Throw a
ConfigDataNotFoundException if the specified File does not
exist. |
static void |
throwIfDoesNotExist(ConfigDataResource resource,
java.nio.file.Path pathToCheck)
Throw a
ConfigDataNotFoundException if the specified Path does not
exist. |
static void |
throwIfDoesNotExist(ConfigDataResource resource,
org.springframework.core.io.Resource resourceToCheck)
Throw a
ConfigDataNotFoundException if the specified Resource does
not exist. |
public ConfigDataResourceNotFoundException(ConfigDataResource resource)
ConfigDataResourceNotFoundException
instance.resource
- the resource that could not be foundpublic ConfigDataResourceNotFoundException(ConfigDataResource resource, java.lang.Throwable cause)
ConfigDataResourceNotFoundException
instance.resource
- the resource that could not be foundcause
- the exception causepublic ConfigDataResource getResource()
public ConfigDataLocation getLocation()
null
if no location is availblepublic Origin getOrigin()
OriginProvider
null
if the origin is not known.null
public java.lang.String getReferenceDescription()
ConfigDataNotFoundException
getReferenceDescription
in class ConfigDataNotFoundException
public static void throwIfDoesNotExist(ConfigDataResource resource, java.nio.file.Path pathToCheck)
ConfigDataNotFoundException
if the specified Path
does not
exist.resource
- the config data resourcepathToCheck
- the path to checkpublic static void throwIfDoesNotExist(ConfigDataResource resource, java.io.File fileToCheck)
ConfigDataNotFoundException
if the specified File
does not
exist.resource
- the config data resourcefileToCheck
- the file to checkpublic static void throwIfDoesNotExist(ConfigDataResource resource, org.springframework.core.io.Resource resourceToCheck)
ConfigDataNotFoundException
if the specified Resource
does
not exist.resource
- the config data resourceresourceToCheck
- the resource to check