Base class for the Add-On commands.
More...
#include <APIdefs_Registration.h>
|
| virtual GS::String | GetName () const =0 |
| | Returns the unique name of the command. This name cannot be an empty string or contain '.' characters.
|
| |
| virtual GS::String | GetNamespace () const =0 |
| | Returns the namespace of the command. This name cannot be an empty string or contain '.' characters.
|
| |
| virtual GS::Optional< GS::UniString > | GetSchemaDefinitions () const =0 |
| | Returns the schema definitions. Must be a valid JSON string. Types defined in the schema definitions can be used in the input/output schemas.
|
| |
| virtual GS::Optional< GS::UniString > | GetInputParametersSchema () const =0 |
| | This schema will be used to validate the incoming request parameters. Must be a valid JSON string.
|
| |
| virtual GS::Optional< GS::UniString > | GetResponseSchema () const =0 |
| | This schema will be used to validate the incoming request response. Must be a valid JSON string.
|
| |
| virtual API_AddOnCommandExecutionPolicy | GetExecutionPolicy () const =0 |
| | Returns the execution policy.
|
| |
| virtual bool | IsProcessWindowVisible () const =0 |
| | Controls the visibility of the process window during the command's execution.
|
| |
| virtual GS::ObjectState | Execute (const GS::ObjectState ¶meters, GS::ProcessControl &processControl) const =0 |
| | Write the Add-On command logic inside this function.
|
| |
| virtual void | OnResponseValidationFailed (const GS::ObjectState &response) const =0 |
| | This function is called when an error occurred inside the Add-On command logic and the output schema validation failed.
|
| |
Base class for the Add-On commands.
- Since
- Archicad 26
◆ Execute()
| virtual GS::ObjectState API_AddOnCommand::Execute |
( |
const GS::ObjectState & | parameters, |
|
|
GS::ProcessControl & | processControl ) const |
|
pure virtual |
Write the Add-On command logic inside this function.
- Parameters
-
| parameters | The parameters. |
| processControl | The process window. |
- Returns
- Tells if the process window is currently visible.
◆ GetExecutionPolicy()
Returns the execution policy.
- Returns
- The execution policy.
◆ GetInputParametersSchema()
| virtual GS::Optional< GS::UniString > API_AddOnCommand::GetInputParametersSchema |
( |
| ) |
const |
|
pure virtual |
This schema will be used to validate the incoming request parameters. Must be a valid JSON string.
- Returns
- The validation schema.
◆ GetName()
| virtual GS::String API_AddOnCommand::GetName |
( |
| ) |
const |
|
pure virtual |
Returns the unique name of the command. This name cannot be an empty string or contain '.' characters.
- Returns
- The name of the command.
◆ GetNamespace()
| virtual GS::String API_AddOnCommand::GetNamespace |
( |
| ) |
const |
|
pure virtual |
Returns the namespace of the command. This name cannot be an empty string or contain '.' characters.
- Returns
- The namespace of the command.
◆ GetResponseSchema()
| virtual GS::Optional< GS::UniString > API_AddOnCommand::GetResponseSchema |
( |
| ) |
const |
|
pure virtual |
This schema will be used to validate the incoming request response. Must be a valid JSON string.
- Returns
- The response schema for the command.
◆ GetSchemaDefinitions()
| virtual GS::Optional< GS::UniString > API_AddOnCommand::GetSchemaDefinitions |
( |
| ) |
const |
|
pure virtual |
Returns the schema definitions. Must be a valid JSON string. Types defined in the schema definitions can be used in the input/output schemas.
- Returns
- The add-on command's schema definition.
◆ IsProcessWindowVisible()
| virtual bool API_AddOnCommand::IsProcessWindowVisible |
( |
| ) |
const |
|
pure virtual |
Controls the visibility of the process window during the command's execution.
- Returns
- Tells if the process window is currently visible.
◆ OnResponseValidationFailed()
| virtual void API_AddOnCommand::OnResponseValidationFailed |
( |
const GS::ObjectState & | response | ) |
const |
|
pure virtual |
This function is called when an error occurred inside the Add-On command logic and the output schema validation failed.
- Parameters
-