Class AbstractResource
java.lang.Object
com.inductiveautomation.ignition.common.resourcecollection.AbstractResource
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
ImmutableResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final com.google.common.collect.ImmutableMap<String,com.inductiveautomation.ignition.common.gson.JsonElement> protected final Stringprotected final Stringprotected final booleanprotected final booleanprotected final ResourcePathprotected final booleanprotected final booleanprotected final intFields inherited from interface com.inductiveautomation.ignition.common.resourcecollection.Resource
DEFAULT_BACKUP_JSON_KEY, DEFAULT_DATA_KEY, DEFAULT_JSON_KEY, PLATFORM_MODULE_ID, UNARY_RESOURCE_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractResource(String collectionName, ResourcePath resourcePath, int applicationScope, String documentation, int version, boolean folder, boolean unary, boolean restricted, boolean overridable, Map<String, com.inductiveautomation.ignition.common.gson.JsonElement> attributes) -
Method Summary
Modifier and TypeMethodDescriptionintGet the application scope of this resource.Optional<com.inductiveautomation.ignition.common.gson.JsonElement>getAttribute(String key) com.google.common.collect.ImmutableMap<String,com.inductiveautomation.ignition.common.gson.JsonElement> Get an immutable view of the attributes map.Get the name of theResourceCollectionthis resource belongs to.intGet the version of this resource.booleanisFolder()booleanbooleanbooleanisUnary()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.common.resourcecollection.Resource
copy, copy, copyWithAttribute, getContentDigest, getData, getData, getDataDigest, getDataKeys, getDataReader, getDataStream, getDefiningCollectionName, getDefiningCollectionNames, getFolderPath, getResourceName, getResourceSignature, getResourceType, isModuleFolder, isResourceTypeFolder, isSingletonResource, toBuilder
-
Field Details
-
collectionName
-
resourcePath
-
folder
protected final boolean folder -
unary
protected final boolean unary -
documentation
-
attributes
protected final com.google.common.collect.ImmutableMap<String,com.inductiveautomation.ignition.common.gson.JsonElement> attributes -
applicationScope
protected final int applicationScope -
version
protected final int version -
restricted
protected final boolean restricted -
overridable
protected final boolean overridable
-
-
Constructor Details
-
AbstractResource
protected AbstractResource(String collectionName, ResourcePath resourcePath, int applicationScope, @Nullable String documentation, int version, boolean folder, boolean unary, boolean restricted, boolean overridable, Map<String, com.inductiveautomation.ignition.common.gson.JsonElement> attributes)
-
-
Method Details
-
getCollectionName
Description copied from interface:ResourceGet the name of theResourceCollectionthis resource belongs to. Note that if this resource was inherited, this collection name will be the name of the collection that was loaded up, not necessarily the collection that actually holds the definition of this resource.- Specified by:
getCollectionNamein interfaceResource
-
getResourcePath
- Specified by:
getResourcePathin interfaceResource
-
getApplicationScope
public int getApplicationScope()Description copied from interface:ResourceGet the application scope of this resource.- Specified by:
getApplicationScopein interfaceResource- Returns:
- the application scope of this resource.
- See Also:
-
getDocumentation
- Specified by:
getDocumentationin interfaceResource
-
getVersion
public int getVersion()Description copied from interface:ResourceGet 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 interfaceResource- Returns:
- the version of this resource.
-
isFolder
public boolean isFolder() -
isUnary
public boolean isUnary() -
isRestricted
public boolean isRestricted()- Specified by:
isRestrictedin interfaceResource- Returns:
trueif this resource is restricted to users of a certain role. Formerly known as "protected".
-
isOverridable
public boolean isOverridable()- Specified by:
isOverridablein interfaceResource- Returns:
trueif this resource can be overridden by child projects.
-
getAttributes
@Nonnull public com.google.common.collect.ImmutableMap<String,com.inductiveautomation.ignition.common.gson.JsonElement> getAttributes()Description copied from interface:ResourceGet an immutable view of the attributes map.- Specified by:
getAttributesin interfaceResource- Returns:
- an immutable view of the attributes map.
-
getAttribute
- Specified by:
getAttributein interfaceResource
-
getResourceId
- Specified by:
getResourceIdin interfaceResource
-
toString
-