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 aOfflineResourceDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.ext()Returns the value of theextrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theisRequiredrecord component.name()Returns the value of thenamerecord component.reqPath()Returns the value of thereqPathrecord component.Returns the value of thestoragePathrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theversionHashrecord component.
-
Constructor Details
-
OfflineResourceDefinition
-
OfflineResourceDefinition
public OfflineResourceDefinition(String name, String reqPath, String storagePath, String ext, String versionHash, Boolean isRequired) Creates an instance of aOfflineResourceDefinitionrecord class.- Parameters:
name- the value for thenamerecord componentreqPath- the value for thereqPathrecord componentstoragePath- the value for thestoragePathrecord componentext- the value for theextrecord componentversionHash- the value for theversionHashrecord componentisRequired- the value for theisRequiredrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
reqPath
Returns the value of thereqPathrecord component.- Returns:
- the value of the
reqPathrecord component
-
storagePath
Returns the value of thestoragePathrecord component.- Returns:
- the value of the
storagePathrecord component
-
ext
Returns the value of theextrecord component.- Returns:
- the value of the
extrecord component
-
versionHash
Returns the value of theversionHashrecord component.- Returns:
- the value of the
versionHashrecord component
-
isRequired
Returns the value of theisRequiredrecord component.- Returns:
- the value of the
isRequiredrecord component
-