Class ResourceBuilder
java.lang.Object
com.inductiveautomation.ignition.common.resourcecollection.ResourceBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Remove all data files that this builder contains.Copy the values fromresource
into thisResourceBuilder
.putAttribute
(String key, boolean value) putAttribute
(String key, int value) putAttribute
(String key, long value) putAttribute
(String key, com.inductiveautomation.ignition.common.gson.JsonElement value) putAttribute
(String key, String value) putData
(byte[] data) putData
(ImmutableBytes data) Puts a string into the data map.putData
(String name, ImmutableBytes data) Puts a string into the data map.removeAttribute
(String key) removeData
(String name) setApplicationScope
(int scope) setApplicationScope
(String scope) setAttributes
(Map<String, com.inductiveautomation.ignition.common.gson.JsonElement> attributes) setData
(Map<String, ImmutableBytes> data) Sets (overwrites) the entire data map.setDataBytes
(Map<String, byte[]> data) Sets (overwrites) the entire data map.setDocumentation
(String documentation) setFolder
(boolean folder) setOverridable
(boolean overridable) setResourceCollectionName
(String collectionName) setResourcePath
(ResourcePath resourcePath) setRestricted
(boolean restricted) setUnary
(boolean unary) Marking a resource as unary affects how it is encoded on-disk.setVersion
(int version)
-
Method Details
-
copyFrom
Copy the values fromresource
into thisResourceBuilder
.- Parameters:
resource
- theResource
to copy from.- Returns:
- this
ResourceBuilder
.
-
setResourceId
-
setResourceCollectionName
-
setResourcePath
-
setDocumentation
-
setDataBytes
Sets (overwrites) the entire data map. Byte values will be copied intoImmutableBytes
-
setData
Sets (overwrites) the entire data map. -
putData
-
putData
Puts a string into the data map. The string will be converted to bytes using UTF-8. -
putData
-
putData
-
putData
Puts a string into the data map. The string will be converted to bytes using UTF-8. -
putData
-
removeData
-
clearData
Remove all data files that this builder contains. -
setAttributes
public ResourceBuilder setAttributes(@Nonnull Map<String, com.inductiveautomation.ignition.common.gson.JsonElement> attributes) -
putAttribute
-
putAttribute
-
putAttribute
-
putAttribute
-
putAttribute
public ResourceBuilder putAttribute(String key, com.inductiveautomation.ignition.common.gson.JsonElement value) -
removeAttribute
-
clearAttributes
-
setApplicationScope
-
setApplicationScope
-
setRestricted
-
setOverridable
-
setVersion
-
setFolder
-
setUnary
Marking a resource as unary affects how it is encoded on-disk. Folders may contain only one unary resource, whose name must be "_unary". The files for this resource will be stored directly in the folder, saving a level of directory nesting. -
build
-