Record Class OfflineResourceDefinition

java.lang.Object
java.lang.Record
com.inductiveautomation.perspective.common.api.OfflineResourceDefinition
Record Components:
name - - The name of the resource, excluding extension and version hash. For example, "standard-edition-logged-out"
reqPath - - The full path of this resource used in the http request made by the native device. For example, "/res/perspective/images/some-image.png" if the resource can be found on the Gateway. For external resources, include the protocol, host name, and port. For example, a map tile image ("15.png") may be fetched at "a.tile.openstreetmap.org/6/5/15.png".
storagePath - - The project relative directory path in which to store this resource. For example, "offline-map-tiles-service/6/5/15.png".
versionHash - - Resource version hash, if applicable.
ext - - The extension of the resource, if any. Excluding filename versionHash.
isRequired - - Indicates if this resource is required for the offline project to function. False by default.

public record OfflineResourceDefinition(String name, String reqPath, String storagePath, String ext, String versionHash, Boolean isRequired) extends Record
Defines an offline resource
  • Constructor Details

    • OfflineResourceDefinition

      public OfflineResourceDefinition(String name, String reqPath, String ext, String versionHash, Boolean isRequired)
    • OfflineResourceDefinition

      public OfflineResourceDefinition(String name, String reqPath, String storagePath, String ext, String versionHash, Boolean isRequired)
      Creates an instance of a OfflineResourceDefinition record class.
      Parameters:
      name - the value for the name record component
      reqPath - the value for the reqPath record component
      storagePath - the value for the storagePath record component
      ext - the value for the ext record component
      versionHash - the value for the versionHash record component
      isRequired - the value for the isRequired record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • reqPath

      public String reqPath()
      Returns the value of the reqPath record component.
      Returns:
      the value of the reqPath record component
    • storagePath

      public String storagePath()
      Returns the value of the storagePath record component.
      Returns:
      the value of the storagePath record component
    • ext

      public String ext()
      Returns the value of the ext record component.
      Returns:
      the value of the ext record component
    • versionHash

      public String versionHash()
      Returns the value of the versionHash record component.
      Returns:
      the value of the versionHash record component
    • isRequired

      public Boolean isRequired()
      Returns the value of the isRequired record component.
      Returns:
      the value of the isRequired record component