Class EffectiveProjectResource
- java.lang.Object
-
- com.inductiveautomation.ignition.common.project.EffectiveProjectResource
-
- All Implemented Interfaces:
ProjectResource
,java.io.Serializable
public class EffectiveProjectResource extends java.lang.Object implements ProjectResource
Delegate project resource implementation that overrides the projectName, so that all project resources, inherited or otherwise, share the same resource id.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.inductiveautomation.ignition.common.project.resource.ProjectResource
DEFAULT_DATA_KEY, LEGACY_FOLDER_RESOURCE_TYPE, PLATFORM_MODULE_ID
-
-
Constructor Summary
Constructors Constructor Description EffectiveProjectResource(java.lang.String projectName, ProjectResource delegateResource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApplicationScope()
Get the application scope of this resource.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.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.String
getDocumentation()
java.lang.String
getProjectName()
Get the name of theProject
this resource belongs to.ProjectResourceId
getResourceId()
java.lang.String
getResourceName()
ResourcePath
getResourcePath()
ResourceSignature
getResourceSignature()
Get theResourceSignature
for this resource.ResourceType
getResourceType()
int
getVersion()
Get the version of this resource.boolean
isFolder()
boolean
isLocked()
boolean
isOverridable()
boolean
isRestricted()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.project.resource.ProjectResource
copy, copy, getAttribute, getFolderPath, isModuleFolder, isResourceTypeFolder, isSingletonResource, toBuilder
-
-
-
-
Constructor Detail
-
EffectiveProjectResource
public EffectiveProjectResource(java.lang.String projectName, ProjectResource delegateResource)
-
-
Method Detail
-
getProjectName
public java.lang.String getProjectName()
Description copied from interface:ProjectResource
Get the name of theProject
this resource belongs to.- Specified by:
getProjectName
in interfaceProjectResource
- Returns:
- the name of the
Project
this resource belongs to.
-
getResourceId
public ProjectResourceId getResourceId()
- Specified by:
getResourceId
in interfaceProjectResource
-
getContentDigest
public byte[] getContentDigest()
Description copied from interface:ProjectResource
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.
- Specified by:
getContentDigest
in interfaceProjectResource
- Returns:
- the SHA-256 digest of the content of this resource.
- See Also:
ProjectResource.getResourceSignature()
,ResourceSignature
-
getResourceSignature
public ResourceSignature getResourceSignature()
Description copied from interface:ProjectResource
Get theResourceSignature
for this resource.- Specified by:
getResourceSignature
in interfaceProjectResource
- Returns:
- the
ResourceSignature
for this resource.
-
getResourceName
public java.lang.String getResourceName()
- Specified by:
getResourceName
in interfaceProjectResource
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceType
in interfaceProjectResource
-
getResourcePath
public ResourcePath getResourcePath()
- Specified by:
getResourcePath
in interfaceProjectResource
-
getDocumentation
@Nullable public java.lang.String getDocumentation()
- Specified by:
getDocumentation
in interfaceProjectResource
-
getApplicationScope
public int getApplicationScope()
Description copied from interface:ProjectResource
Get the application scope of this resource.- Specified by:
getApplicationScope
in interfaceProjectResource
- Returns:
- the application scope of this resource.
- See Also:
ApplicationScope
-
getVersion
public int getVersion()
Description copied from interface:ProjectResource
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.
- Specified by:
getVersion
in interfaceProjectResource
- Returns:
- the version of this resource.
-
isFolder
public boolean isFolder()
- Specified by:
isFolder
in interfaceProjectResource
- Returns:
true
if this resource is a folder.
-
isLocked
public boolean isLocked()
- Specified by:
isLocked
in interfaceProjectResource
- Returns:
true
if this resource is OEM locked.
-
isRestricted
public boolean isRestricted()
- Specified by:
isRestricted
in interfaceProjectResource
- Returns:
true
if this resource is restricted to users of a certain role. Formerly known as "protected".
-
isOverridable
public boolean isOverridable()
- Specified by:
isOverridable
in interfaceProjectResource
- Returns:
true
if this resource can be overridden by child projects.
-
getData
@Nullable public byte[] getData()
- Specified by:
getData
in interfaceProjectResource
-
getData
@Nullable public byte[] getData(java.lang.String key)
- Specified by:
getData
in interfaceProjectResource
-
getDataKeys
@Nonnull public com.google.common.collect.ImmutableSet<java.lang.String> getDataKeys()
Description copied from interface:ProjectResource
Get an immutable view of the data key set.- Specified by:
getDataKeys
in interfaceProjectResource
- Returns:
- an immutable view of the data key set.
-
getAttributes
@Nonnull public java.util.Map<java.lang.String,com.inductiveautomation.ignition.common.gson.JsonElement> getAttributes()
Description copied from interface:ProjectResource
Get an immutable view of the attributes map.- Specified by:
getAttributes
in interfaceProjectResource
- Returns:
- an immutable view of the attributes map.
-
-