Interface ProjectResource
- 
- All Superinterfaces:
- java.io.Serializable
 - All Known Implementing Classes:
- EffectiveProjectResource,- ImmutableProjectResource
 
 public interface ProjectResource extends java.io.Serializable
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringDEFAULT_DATA_KEYstatic java.lang.StringLEGACY_FOLDER_RESOURCE_TYPEDeprecated.static java.lang.StringPLATFORM_MODULE_IDThe id used for moduleId when the resource type belongs to the Ignition platform.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static byte[]calculateContentDigest(ProjectResource resource)Calculate the SHA-256 content digest forresource.default ProjectResourcecopy()Create a copy of thisProjectResource.default ProjectResourcecopy(java.util.function.Consumer<ProjectResourceBuilder> consumer)Create a copy of thisProjectResource, allowing for modifications to take place prior via the consumedProjectResourceBuilder.intgetApplicationScope()Get the application scope of this resource.default java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonElement>getAttribute(java.lang.String key)java.util.Map<java.lang.String,com.inductiveautomation.ignition.common.gson.JsonElement>getAttributes()Get an immutable view of the attributes map.byte[]getContentDigest()Get the SHA-256 digest of the content of this resource.default byte[]getData()byte[]getData(java.lang.String key)com.google.common.collect.ImmutableSet<java.lang.String>getDataKeys()Get an immutable view of the data key set.java.lang.StringgetDocumentation()default java.lang.StringgetFolderPath()java.lang.StringgetProjectName()Get the name of theProjectthis resource belongs to.default ProjectResourceIdgetResourceId()default java.lang.StringgetResourceName()ResourcePathgetResourcePath()ResourceSignaturegetResourceSignature()Get theResourceSignaturefor this resource.default ResourceTypegetResourceType()intgetVersion()Get the version of this resource.booleanisFolder()booleanisLocked()default booleanisModuleFolder()booleanisOverridable()default booleanisResourceTypeFolder()booleanisRestricted()default booleanisSingletonResource()static ProjectResourceBuildernewBuilder()Create a newProjectResourceBuilder.default ProjectResourceBuildertoBuilder()Create a newProjectResourceBuilderpre-set with all the values from thisProjectResource.
 
- 
- 
- 
Field Detail- 
PLATFORM_MODULE_IDstatic final java.lang.String PLATFORM_MODULE_ID The id used for moduleId when the resource type belongs to the Ignition platform.- See Also:
- Constant Field Values
 
 - 
DEFAULT_DATA_KEYstatic final java.lang.String DEFAULT_DATA_KEY - See Also:
- Constant Field Values
 
 - 
LEGACY_FOLDER_RESOURCE_TYPE@Deprecated static final java.lang.String LEGACY_FOLDER_RESOURCE_TYPE Deprecated.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getProjectNamejava.lang.String getProjectName() Get the name of theProjectthis resource belongs to.- Returns:
- the name of the Projectthis resource belongs to.
 
 - 
getResourcePathResourcePath getResourcePath() 
 - 
getResourceNamedefault java.lang.String getResourceName() 
 - 
getFolderPathdefault java.lang.String getFolderPath() 
 - 
getResourceTypedefault ResourceType getResourceType() 
 - 
getDocumentation@Nullable java.lang.String getDocumentation() 
 - 
getData@Nullable default byte[] getData() 
 - 
getData@Nullable byte[] getData(java.lang.String key) 
 - 
getDataKeys@Nonnull com.google.common.collect.ImmutableSet<java.lang.String> getDataKeys() Get an immutable view of the data key set.- Returns:
- an immutable view of the data key set.
 
 - 
getAttributes@Nonnull java.util.Map<java.lang.String,com.inductiveautomation.ignition.common.gson.JsonElement> getAttributes() Get an immutable view of the attributes map.- Returns:
- an immutable view of the attributes map.
 
 - 
getAttributedefault java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonElement> getAttribute(java.lang.String key) 
 - 
getApplicationScopeint getApplicationScope() Get the application scope of this resource.- Returns:
- the application scope of this resource.
- See Also:
- ApplicationScope
 
 - 
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:
- getResourceSignature(),- ResourceSignature
 
 - 
getResourceSignatureResourceSignature getResourceSignature() Get theResourceSignaturefor this resource.- Returns:
- the ResourceSignaturefor this resource.
 
 - 
getResourceIddefault ProjectResourceId getResourceId() 
 - 
copydefault ProjectResource copy() Create a copy of thisProjectResource.- Returns:
- a copy of this ProjectResource.
 
 - 
copydefault ProjectResource copy(java.util.function.Consumer<ProjectResourceBuilder> consumer) Create a copy of thisProjectResource, allowing for modifications to take place prior via the consumedProjectResourceBuilder.- Parameters:
- consumer- the- ProjectResourceBuilderconsumer.
- Returns:
- a copy of this ProjectResource.
 
 - 
toBuilderdefault ProjectResourceBuilder toBuilder() Create a newProjectResourceBuilderpre-set with all the values from thisProjectResource.- Returns:
- a new ProjectResourceBuilderpre-set with all the values from thisProjectResource.
 
 - 
calculateContentDigeststatic byte[] calculateContentDigest(ProjectResource resource) Calculate the SHA-256 content digest forresource.- Parameters:
- resource- the- ProjectResource.
- Returns:
- the SHA-256 content digest.
- See Also:
- getContentDigest()
 
 - 
newBuilderstatic ProjectResourceBuilder newBuilder() Create a newProjectResourceBuilder.- Returns:
- a new ProjectResourceBuilder.
 
 
- 
 
-