Class ImmutableProjectResource
- java.lang.Object
-
- com.inductiveautomation.ignition.common.project.resource.ImmutableProjectResource
-
- All Implemented Interfaces:
ProjectResource,java.io.Serializable
public class ImmutableProjectResource extends java.lang.Object implements ProjectResource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableProjectResource.GsonAdapter
-
Field Summary
-
Fields inherited from interface com.inductiveautomation.ignition.common.project.resource.ProjectResource
DEFAULT_DATA_KEY, LEGACY_FOLDER_RESOURCE_TYPE, PLATFORM_MODULE_ID
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetApplicationScope()Get the application scope of this resource.com.google.common.collect.ImmutableMap<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(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()java.lang.StringgetProjectName()Get the name of theProjectthis resource belongs to.ProjectResourceIdgetResourceId()ResourcePathgetResourcePath()ResourceSignaturegetResourceSignature()Get theResourceSignaturefor this resource.intgetVersion()Get the version of this resource.inthashCode()booleanisFolder()booleanisLocked()booleanisOverridable()booleanisRestricted()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.project.resource.ProjectResource
copy, copy, getAttribute, getData, getFolderPath, getResourceName, getResourceType, isModuleFolder, isResourceTypeFolder, isSingletonResource, toBuilder
-
-
-
-
Method Detail
-
getProjectName
public java.lang.String getProjectName()
Description copied from interface:ProjectResourceGet the name of theProjectthis resource belongs to.- Specified by:
getProjectNamein interfaceProjectResource- Returns:
- the name of the
Projectthis resource belongs to.
-
getResourcePath
public ResourcePath getResourcePath()
- Specified by:
getResourcePathin interfaceProjectResource
-
getApplicationScope
public int getApplicationScope()
Description copied from interface:ProjectResourceGet the application scope of this resource.- Specified by:
getApplicationScopein interfaceProjectResource- Returns:
- the application scope of this resource.
- See Also:
ApplicationScope
-
getDocumentation
public java.lang.String getDocumentation()
- Specified by:
getDocumentationin interfaceProjectResource
-
getVersion
public int getVersion()
Description copied from interface:ProjectResourceGet 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:
getVersionin interfaceProjectResource- Returns:
- the version of this resource.
-
isFolder
public boolean isFolder()
- Specified by:
isFolderin interfaceProjectResource- Returns:
trueif this resource is a folder.
-
isLocked
public boolean isLocked()
- Specified by:
isLockedin interfaceProjectResource- Returns:
trueif this resource is OEM locked.
-
isRestricted
public boolean isRestricted()
- Specified by:
isRestrictedin interfaceProjectResource- Returns:
trueif this resource is restricted to users of a certain role. Formerly known as "protected".
-
isOverridable
public boolean isOverridable()
- Specified by:
isOverridablein interfaceProjectResource- Returns:
trueif this resource can be overridden by child projects.
-
getData
public byte[] getData(java.lang.String key)
- Specified by:
getDatain interfaceProjectResource
-
getDataKeys
@Nonnull public com.google.common.collect.ImmutableSet<java.lang.String> getDataKeys()
Description copied from interface:ProjectResourceGet an immutable view of the data key set.- Specified by:
getDataKeysin interfaceProjectResource- Returns:
- an immutable view of the data key set.
-
getAttributes
@Nonnull public com.google.common.collect.ImmutableMap<java.lang.String,com.inductiveautomation.ignition.common.gson.JsonElement> getAttributes()
Description copied from interface:ProjectResourceGet an immutable view of the attributes map.- Specified by:
getAttributesin interfaceProjectResource- Returns:
- an immutable view of the attributes map.
-
getContentDigest
public byte[] getContentDigest()
Description copied from interface:ProjectResourceGet 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:
getContentDigestin 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:ProjectResourceGet theResourceSignaturefor this resource.- Specified by:
getResourceSignaturein interfaceProjectResource- Returns:
- the
ResourceSignaturefor this resource.
-
getResourceId
public ProjectResourceId getResourceId()
- Specified by:
getResourceIdin interfaceProjectResource
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-