Class FieldFunctionIdentifierRegistry
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.fields.functions.FieldFunctionIdentifierRegistry
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 Summary
Modifier and TypeMethodDescriptionReturns the registered FieldFunctionTypeIdentifier for the given name, or null if not found.Singleton accessorvoidregister(FieldFunctionTypeIdentifier identifier) Registers the given identifier.voidunregister(String name) Removes the identifier registered under the given name, if any.
-
Method Details
-
getInstance
Singleton accessor -
register
Registers the given identifier. If a different identifier is already registered under the same name, logs a warning and replaces it. -
unregister
Removes the identifier registered under the given name, if any. -
getFieldFunctionTypeIdentifier
Returns the registered FieldFunctionTypeIdentifier for the given name, or null if not found.
-