PingAM

Remove node versions

Over time, as you deploy new versions of your nodes, you’ll want to deprecate and remove old unsupported versions.

To do this, remove the unsupported node versions from the Plugin class. This stops those versions of the node from being installed and registered, effectively removing them from your deployment.

The following example plugin class shows version 1.0.0 of the MyCustomNode commented out in two places:

public class MyCustomNodePlugin extends AbstractNodeAmPlugin {

  private static final String CURRENT_VERSION = "2.0.0";

  @Override
  protected Map<String, Iterable<? extends Class<? extends Node>>>     1
  getNodesByVersion() {
        return Map.of(/*"1.0.0", List.of(MyCustomNode.class),*/
                "2.0.0", List.of(MyCustomNodeV2.class));
  }

  @Override
  public void upgrade(String fromVersion) throws PluginException {     2
      //pluginTools.upgradeAuthNode(MyCustomNode.class);
      pluginTools.upgradeAuthNode(MyCustomNodeV2.class);
      super.upgrade(fromVersion);
    }

  @Override
  public String getPluginVersion() {
    return MyCustomNodePlugin.CURRENT_VERSION;
  }
}

1 Comment out or remove the specific node version from the getNodesByVersion() function.

2 Comment out or remove the node class corresponding to the version you want to remove from the upgrade(String fromVersion) method.

These changes stop version 1 of the MyCustomNode from being installed and registered in AM.