Add a value comparator

Procedure

  1. In Studio, edit the ValueComparator typelist.
  2. Add a new typekey entering a code, name, and description.
  3. Instantiate a wrapper for your new typekey.

    In the default configuration, the wrappers are instantiated in the UWIssueValueComparatorWrapper class located in the gw.job.uw package. Add code to instantiate a wrapper for your new typekey. Examples in the default configuration can be seen at the top of the file:

    // The wrappers for the various OOTB ValueComparators
    static final var _ge : UWIssueValueComparatorWrapper as readonly NumericGEWrapper
           = new NumericGEValueComparatorWrapper("Numeric_GE")

    If you prefer not to instantiate the wrapper in UWIssueValueComparatorWrapper, you can instantiate the wrapper in the location of your choice. However, the wrapper must be instantiated in a class that loads before PolicyCenter calls UWIssueValueComparatorWrapper.wrap. For example, you can instantiate your wrappers in a startable plugin which runs after loading the database, but before serving any web pages. For more information, see Startable plugins.

    Important: Failure to guarantee that PolicyCenter instantiates the wrapper before loading UWIssueValueComparatorWrapper may result in non-deterministic null pointer exceptions if UWIssueValueComparatorWrapper returns null for an extended typekey.
  4. Instantiate a new extension to UWIssueValueComparatorWrapper for your typekey in the gw.job.uw.comparators package. You can use existing comparators as an example.