Interface ProjectResource
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- EffectiveProjectResource,- ImmutableProjectResource
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic byte[]calculateContentDigest(ProjectResource resource) Calculate the SHA-256 content digest forresource.default ProjectResourcecopy()Create a copy of thisProjectResource.default ProjectResourcecopy(Consumer<ProjectResourceBuilder> consumer) Create a copy of thisProjectResource, allowing for modifications to take place prior via the consumedProjectResourceBuilder.intGet the application scope of this resource.default Optional<com.inductiveautomation.ignition.common.gson.JsonElement>getAttribute(String key) Get an immutable view of the attributes map.byte[]Get the SHA-256 digest of the content of this resource.default byte[]getData()byte[]com.google.common.collect.ImmutableSet<String>Get an immutable view of the data key set.default StringGet the name of theProjectthis resource belongs to.default ProjectResourceIddefault StringGet theResourceSignaturefor this resource.default ResourceTypeintGet the version of this resource.booleanisFolder()booleanisLocked()default booleanbooleandefault booleanbooleandefault booleanstatic ProjectResourceBuilderCreate a newProjectResourceBuilder.default ProjectResourceBuilderCreate a newProjectResourceBuilderpre-set with all the values from thisProjectResource.
- 
Field Details- 
PLATFORM_MODULE_IDThe id used for moduleId when the resource type belongs to the Ignition platform.- See Also:
 
- 
DEFAULT_DATA_KEY- See Also:
 
- 
LEGACY_FOLDER_RESOURCE_TYPEDeprecated.- See Also:
 
 
- 
- 
Method Details- 
getProjectNameString getProjectName()Get the name of theProjectthis resource belongs to.- Returns:
- the name of the Projectthis resource belongs to.
 
- 
getResourcePathResourcePath getResourcePath()
- 
getResourceName
- 
getFolderPath
- 
getResourceType
- 
getDocumentation
- 
getData@Nullable default byte[] getData()
- 
getData
- 
getDataKeysGet an immutable view of the data key set.- Returns:
- an immutable view of the data key set.
 
- 
getAttributesGet an immutable view of the attributes map.- Returns:
- an immutable view of the attributes map.
 
- 
getAttribute
- 
getApplicationScopeint getApplicationScope()Get the application scope of this resource.- Returns:
- the application scope of this resource.
- See Also:
 
- 
getVersionint getVersion()Get the version of this resource.The version number is not intended to track mutations to the resource like the legacy edit count, but rather, its interpretation and use is for the entities this resource type belongs to and so it can be used to reason about the contents of the resource, e.g. to distinguish between serialization formats. - Returns:
- the version of this resource.
 
- 
isFolderboolean isFolder()- Returns:
- trueif this resource is a folder.
 
- 
isModuleFolderdefault boolean isModuleFolder()
- 
isResourceTypeFolderdefault boolean isResourceTypeFolder()
- 
isSingletonResourcedefault boolean isSingletonResource()
- 
isLockedboolean isLocked()- Returns:
- trueif this resource is OEM locked.
 
- 
isRestrictedboolean isRestricted()- Returns:
- trueif this resource is restricted to users of a certain role. Formerly known as "protected".
 
- 
isOverridableboolean isOverridable()- Returns:
- trueif this resource can be overridden by child projects.
 
- 
getContentDigestbyte[] getContentDigest()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:
 
- 
getResourceSignatureResourceSignature getResourceSignature()Get theResourceSignaturefor this resource.- Returns:
- the ResourceSignaturefor this resource.
 
- 
getResourceId
- 
copyCreate a copy of thisProjectResource.- Returns:
- a copy of this ProjectResource.
 
- 
copyCreate a copy of thisProjectResource, allowing for modifications to take place prior via the consumedProjectResourceBuilder.- Parameters:
- consumer- the- ProjectResourceBuilderconsumer.
- Returns:
- a copy of this ProjectResource.
 
- 
toBuilderCreate a newProjectResourceBuilderpre-set with all the values from thisProjectResource.- Returns:
- a new ProjectResourceBuilderpre-set with all the values from thisProjectResource.
 
- 
calculateContentDigestCalculate the SHA-256 content digest forresource.- Parameters:
- resource- the- ProjectResource.
- Returns:
- the SHA-256 content digest.
- See Also:
 
- 
newBuilderCreate a newProjectResourceBuilder.- Returns:
- a new ProjectResourceBuilder.
 
 
-