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, versionFields 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 TypeMethodDescriptionbooleanGet 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 theResourceSignaturefor this resource.inthashCode()Methods inherited from class com.inductiveautomation.ignition.common.resourcecollection.AbstractResource
getApplicationScope, getAttribute, getAttributes, getCollectionName, getDocumentation, getResourceId, getResourcePath, getVersion, isFolder, isOverridable, isRestricted, isUnary, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:ResourceRetrieve the data for the given key (filename) as anImmutableBytes. Consider usingResource.getDataStream(String)instead. -
getDataStream
Description copied from interface:ResourceRetrieve 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:ResourceRetrieve 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:ResourceThe "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:ResourceGet an immutable view of the data key set.- Returns:
- an immutable view of the data key set.
-
getContentDigest
Description copied from interface:ResourceGet 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:ResourceGet theResourceSignaturefor this resource.- Returns:
- the
ResourceSignaturefor this resource.
-
equals
-
hashCode
public int hashCode()
-