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 AbstractResource
applicationScope, attributes, collectionName, documentation, folder, overridable, resourcePath, restricted, unary, versionFields inherited from interface 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.@NonNull Optional<ImmutableBytes> Retrieve the data for the given key (filename) as anImmutableBytes.getDataDigest(String key) The "digest" is a unique fingerprint for the data file.@NonNull 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 AbstractResource
getApplicationScope, getAttribute, getAttributes, getCollectionName, getDocumentation, getResourceId, getResourcePath, getVersion, isFolder, isOverridable, isRestricted, isUnary, toStringMethods inherited from interface 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
-
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
-