Class FieldFunctionIdentifierRegistry

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.fields.functions.FieldFunctionIdentifierRegistry

public class FieldFunctionIdentifierRegistry extends Object
Singleton registry that auto-discovers all FieldFunctionType implementations on the classpath and maps their identifier names to FieldFunctionTypeIdentifier objects.

This allows non-Java contexts (e.g., JSON-deserialized filter criteria from a frontend) to look up a FieldFunctionTypeIdentifier by its string name. For Java code, prefer referencing the IDENTIFIER constant on the implementation class directly rather than going through this registry.

Out-of-the-box, this registry will find all implementations of FieldFunctionType that are in the same package as FieldFunctionType itself. An application can add custom functions and manually register them via register(FieldFunctionTypeIdentifier)

  • Method Details

    • getInstance

      public static FieldFunctionIdentifierRegistry getInstance()
      Singleton accessor
    • register

      public void register(FieldFunctionTypeIdentifier identifier)
      Registers the given identifier. If a different identifier is already registered under the same name, logs a warning and replaces it.
    • unregister

      public void unregister(String name)
      Removes the identifier registered under the given name, if any.
    • getFieldFunctionTypeIdentifier

      public FieldFunctionTypeIdentifier getFieldFunctionTypeIdentifier(String name)
      Returns the registered FieldFunctionTypeIdentifier for the given name, or null if not found.