VersionMetadata annotation
Use the VersionMetadata annotation to create a versioned node. If you omit this annotation, the node defaults to version 1.
This annotation specifies two required attributes: the name and version.
You can also specify the optional upgrader class name.
For example, the following is the @Node.VersionMetadata annotation for the Username Collector node version 2:
@Node.VersionMetadata(name = "UsernameCollectorNode", version = 2)
Name
The name attribute specifies the name (if defined) or class name of the original version 1 node.
This creates the link between all versions of the same node to group them together.
Version
The version attribute sets the version of this node.
The version specified must be:
-
Greater than the node’s current version.
-
A positive integer.
Upgrader
The optional upgrader class name specifies the class that defines how the node’s configuration is updated from one version to another.
If the upgrader class name is omitted, the node’s configuration stays the same during an upgrade.
For example, the following is the @Node.VersionMetadata annotation for a Custom node with an upgrader class specified:
@Node.VersionMetadata(name = "CustomAuthNode",
version = 2,
upgrader = CustomAuthNodeV2.CustomAuthNodeV2Upgrader.class)
Where the CustomAuthNodeV2.CustomAuthNodeV2Upgrader.class provides code to transform the node’s configuration from version 1 to version 2.
Learn more in the Upgrader class.
|
If you specify an |