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 Summary
ConstructorsConstructorDescriptionOfflineResourceDefinition
(String name, String reqPath, String ext, String versionHash, Boolean isRequired) OfflineResourceDefinition
(String name, String reqPath, String storagePath, String ext, String versionHash, Boolean isRequired) Creates an instance of aOfflineResourceDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.ext()
Returns the value of theext
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theisRequired
record component.name()
Returns the value of thename
record component.reqPath()
Returns the value of thereqPath
record component.Returns the value of thestoragePath
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theversionHash
record component.
-
Constructor Details
-
OfflineResourceDefinition
-
OfflineResourceDefinition
public OfflineResourceDefinition(String name, String reqPath, String storagePath, String ext, String versionHash, Boolean isRequired) Creates an instance of aOfflineResourceDefinition
record class.- Parameters:
name
- the value for thename
record componentreqPath
- the value for thereqPath
record componentstoragePath
- the value for thestoragePath
record componentext
- the value for theext
record componentversionHash
- the value for theversionHash
record componentisRequired
- the value for theisRequired
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
reqPath
Returns the value of thereqPath
record component.- Returns:
- the value of the
reqPath
record component
-
storagePath
Returns the value of thestoragePath
record component.- Returns:
- the value of the
storagePath
record component
-
ext
Returns the value of theext
record component.- Returns:
- the value of the
ext
record component
-
versionHash
Returns the value of theversionHash
record component.- Returns:
- the value of the
versionHash
record component
-
isRequired
Returns the value of theisRequired
record component.- Returns:
- the value of the
isRequired
record component
-