Class MiddlewareSpecExtensionsMetaData
java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.extensions.MiddlewareSpecExtensionsMetaData
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,QSupplementalInstanceMetaData,TopLevelMetaDataInterface,Serializable
public class MiddlewareSpecExtensionsMetaData
extends Object
implements QSupplementalInstanceMetaData
The instance's registry of UI API extensions: endpoint specs that modules
and qbits add to the versioned UI API (`/qqq/v1`). Validated with the
QInstance; see docs/UI-API-EXTENSIONS.md.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionFirst path segments that belong to core and are never available to an extension.Path prefixes that shipped to clients before the extension point existed, and so keep their URLs rather than moving under `/qbit/{name}`.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for extensionsgetName()List<AbstractEndpointSpec<?, ?, ?>> The specs of every extension, instantiated, in registration order.static AbstractEndpointSpec<?, ?, ?> instantiateSpec(QCodeReference reference) Instantiate one spec reference.static StringnormalizePathTemplate(String path) Normalize a path template for comparison: path parameters become `{}` and duplicate / trailing slashes are removed.Get the instance's registry, or null when nothing registered an extension.ofOrWithNew(QInstance qInstance) Get the instance's registry, adding an empty one if it has none.voidsetExtensions(Map<String, MiddlewareSpecExtension> extensions) Setter for extensionsvoidvalidate(QInstance qInstance, QInstanceValidator validator) Validate every extension: name, semver, prefix and specs.withExtension(MiddlewareSpecExtension extension) Register an extension.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.metadata.QSupplementalInstanceMetaData
addSelfToInstance, enrich
-
Field Details
-
NAME
- See Also:
-
ESTABLISHED_PREFIXES
-
CORE_RESERVED_ROOTS
-
-
Constructor Details
-
MiddlewareSpecExtensionsMetaData
public MiddlewareSpecExtensionsMetaData()
-
-
Method Details
-
of
Get the instance's registry, or null when nothing registered an extension. -
ofOrWithNew
Get the instance's registry, adding an empty one if it has none. -
getName
- Specified by:
getNamein interfaceTopLevelMetaDataInterface
-
withExtension
Register an extension. Registering one with the same name again replaces it, so producers may register idempotently. -
getExtensions
Getter for extensions -
setExtensions
Setter for extensions -
instantiateSpec
public static AbstractEndpointSpec<?,?, instantiateSpec?> (QCodeReference reference) throws ReflectiveOperationException Instantiate one spec reference.- Throws:
ReflectiveOperationException
-
normalizePathTemplate
-
validate
Validate every extension: name, semver, prefix and specs.- Specified by:
validatein interfaceQSupplementalInstanceMetaData
-
instantiateAllSpecs
The specs of every extension, instantiated, in registration order.- Throws:
ReflectiveOperationException
-