Package eu.webtoolkit.jwt
Class WWebRootDataInfo
java.lang.Object
eu.webtoolkit.jwt.WAbstractDataInfo
eu.webtoolkit.jwt.WWebRootDataInfo
A class that stores informations about a file in the WebRoot
This class stores the URL and the file path of a file inside of the WebRoot.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a path to a file containing the data.getUrl()Returns the URL of the data.booleanReturns whether this contains a file path.booleanhasUrl()Returns whether this contains a URL.voidsetVirtualPath(String virtualPath) Sets the virtual path.Methods inherited from class eu.webtoolkit.jwt.WAbstractDataInfo
getDataUri, getName, hasDataUri
-
Constructor Details
-
WWebRootDataInfo
Creates aWWebRootDataInfo.Creates a
WWebRootDataInfowith the givenvirtualPath.
-
-
Method Details
-
setVirtualPath
Sets the virtual path. -
getFilePath
Description copied from class:WAbstractDataInfoReturns a path to a file containing the data.This returns a path to a file containing the data. This should point to a path that exists on the system.
By default this will throw an exception.
Warning: If you reimplement this function, you must also reimplement
hasFilePath()- Overrides:
getFilePathin classWAbstractDataInfo- See Also:
-
getUrl
Description copied from class:WAbstractDataInfoReturns the URL of the data.This returns the URL of the data. This can be both an absolute URL or a URL relative to the application's base URL.
By default this will throw an exception.
Warning: If you reimplement this function, you must also reimplement
hasUrl()- Overrides:
getUrlin classWAbstractDataInfo- See Also:
-
hasFilePath
public boolean hasFilePath()Returns whether this contains a file path.This returns whether
getFilePath()returns a non-empty string.- Overrides:
hasFilePathin classWAbstractDataInfo- See Also:
-
hasUrl
public boolean hasUrl()Returns whether this contains a URL.This returns whether
getUrl()returns a non-empty string.- Overrides:
hasUrlin classWAbstractDataInfo- See Also:
-