Retrieve Constant Value by Name

Get constant value using the name (string) of the constant!

Enables two functions:

  • getconstantvaluebyname(constantName)
  • getconstantvaluebynameandversion(constantName, versionInt)

Both return the value of the constant for the latest version or the version indicated (any type) for the given constant name.

Anonymous
Parents
  • I've run a test in our environments for a minor update on this plug-in to see if I could get the response down a bit.
    Could you please update to use the following changes:

    ContentFilter constantTypeFilter = new ContentFilter(ContentConstants.TYPE_RULE, ContentConstants.SUBTYPE_RULE_CONSTANT)
    Long[] ids = contentSvc.queryIdsByRoot(rulesRootId, "name:" + constantName.trim(), constantTypeFilter)

  • did you encounter a problem with the search the plugin use?
    I understand the aditional filter add a bit of fine-tuning to the plugin, but did it improve the performance?

    We will take a look and do our test and release a new version with the improvement as soon as possible.

    Thanks for the contribution!

  • No problems. There's no issue with the plugin. Our use case for this simply requires the quickest response possible. In our tests responses times spred up by about 100ms from 250ms to 150ms

Comment Children
No Data