Class WWebRootDataInfo

java.lang.Object
eu.webtoolkit.jwt.WAbstractDataInfo
eu.webtoolkit.jwt.WWebRootDataInfo

public class WWebRootDataInfo extends WAbstractDataInfo
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 Details

  • Method Details

    • setVirtualPath

      public void setVirtualPath(String virtualPath)
      Sets the virtual path.
    • getFilePath

      public String getFilePath()
      Description copied from class: WAbstractDataInfo
      Returns 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:
      getFilePath in class WAbstractDataInfo
      See Also:
    • getUrl

      public String getUrl()
      Description copied from class: WAbstractDataInfo
      Returns 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:
      getUrl in class WAbstractDataInfo
      See Also:
    • hasFilePath

      public boolean hasFilePath()
      Returns whether this contains a file path.

      This returns whether getFilePath() returns a non-empty string.

      Overrides:
      hasFilePath in class WAbstractDataInfo
      See Also:
    • hasUrl

      public boolean hasUrl()
      Returns whether this contains a URL.

      This returns whether getUrl() returns a non-empty string.

      Overrides:
      hasUrl in class WAbstractDataInfo
      See Also: