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,
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. |
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,
File fileToCheck)
Throw a
ConfigDataNotFoundException if the specified File does not
exist. |
static void |
throwIfDoesNotExist(ConfigDataResource resource,
Path pathToCheck)
Throw a
ConfigDataNotFoundException if the specified Path does not
exist. |
static void |
throwIfDoesNotExist(ConfigDataResource resource,
Resource resourceToCheck)
Throw a
ConfigDataNotFoundException if the specified Resource does
not exist. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConfigDataResourceNotFoundException(ConfigDataResource resource)
ConfigDataResourceNotFoundException
instance.resource
- the resource that could not be foundpublic ConfigDataResourceNotFoundException(ConfigDataResource resource, 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 availablepublic Origin getOrigin()
OriginProvider
null
if the origin is not known.null
public String getReferenceDescription()
ConfigDataNotFoundException
getReferenceDescription
in class ConfigDataNotFoundException
public static void throwIfDoesNotExist(ConfigDataResource resource, Path pathToCheck)
ConfigDataNotFoundException
if the specified Path
does not
exist.resource
- the config data resourcepathToCheck
- the path to checkpublic static void throwIfDoesNotExist(ConfigDataResource resource, File fileToCheck)
ConfigDataNotFoundException
if the specified File
does not
exist.resource
- the config data resourcefileToCheck
- the file to checkpublic static void throwIfDoesNotExist(ConfigDataResource resource, Resource resourceToCheck)
ConfigDataNotFoundException
if the specified Resource
does
not exist.resource
- the config data resourceresourceToCheck
- the resource to check