Class MiddlewareSpecExtension

java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.extensions.MiddlewareSpecExtension
All Implemented Interfaces:
QMetaDataObject, Serializable

public class MiddlewareSpecExtension extends Object implements QMetaDataObject
A set of endpoint specs that a module or qbit adds to the versioned UI API (`/qqq/v1`), under one namespace. The specs are ordinary AbstractEndpointSpec classes; their paths must begin with the extension's path prefix (by default `/qbit/{name}`). See docs/UI-API-EXTENSIONS.md.
See Also:
  • Constructor Details

    • MiddlewareSpecExtension

      public MiddlewareSpecExtension()
  • Method Details

    • getEffectivePathPrefix

      public String getEffectivePathPrefix()
      The path prefix in effect: the explicit one, or `/qbit/{name}`. Always begins with a slash and never ends with one.
    • withSpec

      public MiddlewareSpecExtension withSpec(Class<? extends AbstractEndpointSpec<?,?,?>> specClass)
      Add a spec class. Adding the same class again is a no-op.
    • withSpec

      public MiddlewareSpecExtension withSpec(QCodeReference specReference)
      Add a spec by code reference. Adding the same class again is a no-op.
    • getName

      public String getName()
      Getter for name
    • setName

      public void setName(String name)
      Setter for name
    • withName

      public MiddlewareSpecExtension withName(String name)
      Fluent setter for name - the namespace, lowercase a-z, 0-9 and '-'.
    • getDescription

      public String getDescription()
      Getter for description
    • setDescription

      public void setDescription(String description)
      Setter for description
    • withDescription

      public MiddlewareSpecExtension withDescription(String description)
      Fluent setter for description
    • getSemanticVersion

      public String getSemanticVersion()
      Getter for semanticVersion
    • setSemanticVersion

      public void setSemanticVersion(String semanticVersion)
      Setter for semanticVersion
    • withSemanticVersion

      public MiddlewareSpecExtension withSemanticVersion(String semanticVersion)
      Fluent setter for semanticVersion - the extension's own MAJOR.MINOR.PATCH.
    • getPathPrefix

      public String getPathPrefix()
      Getter for pathPrefix (as set; see getEffectivePathPrefix)
    • setPathPrefix

      public void setPathPrefix(String pathPrefix)
      Setter for pathPrefix
    • withPathPrefix

      public MiddlewareSpecExtension withPathPrefix(String pathPrefix)
      Fluent setter for pathPrefix. Only the established module prefixes in MiddlewareSpecExtensionsMetaData.ESTABLISHED_PREFIXES are allowed; new extensions use the default `/qbit/{name}`.
    • getSpecs

      public List<QCodeReference> getSpecs()
      Getter for specs
    • setSpecs

      public void setSpecs(List<QCodeReference> specs)
      Setter for specs