Class ImmutableResource
java.lang.Object
com.inductiveautomation.ignition.common.resourcecollection.AbstractResource
com.inductiveautomation.ignition.common.resourcecollection.ImmutableResource
- All Implemented Interfaces:
Resource
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.common.resourcecollection.AbstractResource
applicationScope, attributes, collectionName, documentation, folder, overridable, resourcePath, restricted, unary, version
Fields inherited from interface com.inductiveautomation.ignition.common.resourcecollection.Resource
DEFAULT_BACKUP_JSON_KEY, DEFAULT_DATA_KEY, DEFAULT_JSON_KEY, PLATFORM_MODULE_ID, UNARY_RESOURCE_NAME
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the SHA-256 digest of the content of this resource.Retrieve the data for the given key (filename) as anImmutableBytes
.getDataDigest
(String key) The "digest" is a unique fingerprint for the data file.com.google.common.collect.ImmutableSet<String>
Get an immutable view of the data key set.getDataReader
(String key) Retrieve the data for the given key (filename) as a reader.getDataStream
(String key) Retrieve the data for the given key (filename) as an input stream.Get theResourceSignature
for this resource.int
hashCode()
Methods inherited from class com.inductiveautomation.ignition.common.resourcecollection.AbstractResource
getApplicationScope, getAttribute, getAttributes, getCollectionName, getDocumentation, getResourceId, getResourcePath, getVersion, isFolder, isOverridable, isRestricted, isUnary, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.resourcecollection.Resource
copy, copy, copyWithAttribute, getData, getDefiningCollectionName, getDefiningCollectionNames, getFolderPath, getResourceName, getResourceType, isModuleFolder, isResourceTypeFolder, isSingletonResource, toBuilder
-
Method Details
-
getData
Description copied from interface:Resource
Retrieve the data for the given key (filename) as anImmutableBytes
. Consider usingResource.getDataStream(String)
instead. -
getDataStream
Description copied from interface:Resource
Retrieve the data for the given key (filename) as an input stream. Depending on the Resource implementation, this may be more memory efficient thanResource.getData(String)
. -
getDataReader
Description copied from interface:Resource
Retrieve the data for the given key (filename) as a reader. Reader will be opened with UTF-8 encoding. This may be more memory efficient than usingResource.getData(String)
, especially for parsing large JSON files, for example. -
getDataDigest
Description copied from interface:Resource
The "digest" is a unique fingerprint for the data file. Calculated as a sha-256 hash and then encoded to a string as hex. Reference implementation looks like:getData(key).map(bytes -> DigestBuilder.sha256().update(bytes).buildHexString());
-
getDataKeys
Description copied from interface:Resource
Get an immutable view of the data key set.- Returns:
- an immutable view of the data key set.
-
getContentDigest
Description copied from interface:Resource
Get the SHA-256 digest of the content of this resource. This does not include the project name or any part of the path to this resource, but rather, it's a representation of the contents of the folder on disk.Any changes to any of the resource contents of that folder shall result in a change to the content digest.
- Returns:
- the SHA-256 digest of the content of this resource.
- See Also:
-
getResourceSignature
Description copied from interface:Resource
Get theResourceSignature
for this resource.- Returns:
- the
ResourceSignature
for this resource.
-
equals
-
hashCode
public int hashCode()
-