Class TableFormAdjusterSpecV1
java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec<AbstractJsonEndpointSpec.JsonInput,AbstractJsonEndpointSpec.JsonOutput,AbstractJsonEndpointSpec.JsonExecutor>
com.kingsrook.qqq.middleware.javalin.specs.extensions.AbstractJsonEndpointSpec
com.kingsrook.qqq.middleware.javalin.specs.v1.TableFormAdjusterSpecV1
POST /table/{tableName}/formAdjuster/{identifier}/{event}: run a table
form's adjuster (the table's on-load adjuster, identifier `table:{name}`,
or a field's on-load / on-change adjuster, by its formAdjusterIdentifier).
Adjusters are registered by the Material Dashboard module
(FormAdjusterRegistry), which also adds the process that runs them
(FORM_ADJUSTER_PROCESS_NAME). This spec runs that process in the caller's
session (the legacy /material-dashboard-backend/form-adjuster route runs it
unauthenticated, as the system user) after checking that the caller may
insert or edit records in the table. Without the module there are no
adjusters and the operation answers 404.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.kingsrook.qqq.middleware.javalin.specs.extensions.AbstractJsonEndpointSpec
AbstractJsonEndpointSpec.JsonExecutor, AbstractJsonEndpointSpec.JsonInput, AbstractJsonEndpointSpec.JsonOutput, AbstractJsonEndpointSpec.JsonOutputInterface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringthe process the Material Dashboard module registers to run adjustersFields inherited from class com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec
qInstance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SchemaThe schema of the JSON request body, or null (the default) for none.protected StringThe component schema name of the 200 response body.protected ObjectDo the operation's work (the QContext has the session for a secured spec) and return the response body (serialized to JSON).Methods inherited from class com.kingsrook.qqq.middleware.javalin.specs.extensions.AbstractJsonEndpointSpec
buildInput, defineBasicSuccessResponse, defineRequestBody, handleOutputMethods inherited from class com.kingsrook.qqq.middleware.javalin.specs.AbstractEndpointSpec
checkCredentialScopeOperation, customizeMethod, defineAdditionalBasicResponses, defineCompleteOperation, defineMethod, defineResponses, defineRoute, getOperationId, getRequestBodyAsJsonObject, getRequestParam, getRequestParamInteger, getRequestParamMap, handleException, isSecured, newExecutor, newOutput, serveRequest, setQInstance
-
Field Details
-
FORM_ADJUSTER_PROCESS_NAME
the process the Material Dashboard module registers to run adjusters- See Also:
-
EVENT_ON_LOAD
- See Also:
-
EVENT_ON_CHANGE
- See Also:
-
-
Constructor Details
-
TableFormAdjusterSpecV1
public TableFormAdjusterSpecV1()
-
-
Method Details
-
defineBasicOperation
-
defineRequestParameters
-
defineRequestBodySchema
Description copied from class:AbstractJsonEndpointSpecThe schema of the JSON request body, or null (the default) for none.- Overrides:
defineRequestBodySchemain classAbstractJsonEndpointSpec
-
getResponseSchemaName
Description copied from class:AbstractJsonEndpointSpecThe component schema name of the 200 response body.- Specified by:
getResponseSchemaNamein classAbstractJsonEndpointSpec
-
defineComponentSchemas
-
handle
Description copied from class:AbstractJsonEndpointSpecDo the operation's work (the QContext has the session for a secured spec) and return the response body (serialized to JSON).- Specified by:
handlein classAbstractJsonEndpointSpec- Throws:
Exception
-