Class 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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFilePath()
      Returns a path to a file containing the data.
      java.lang.String getUrl()
      Returns the URL of the data.
      boolean hasFilePath()
      Returns whether this contains a file path.
      boolean hasUrl()
      Returns whether this contains a URL.
      void setVirtualPath​(java.lang.String virtualPath)
      Sets the virtual path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WWebRootDataInfo

        public WWebRootDataInfo​(java.lang.String virtualPath)
        Creates a WWebRootDataInfo.

        Creates a WWebRootDataInfo with the given virtualPath.

    • Method Detail

      • setVirtualPath

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

        public java.lang.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:
        WAbstractDataInfo.hasFilePath()
      • getUrl

        public java.lang.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:
        WAbstractDataInfo.hasUrl()
      • 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:
        getUrl()