A command can obtain confirmation. Currently, you can only configure operations statically - either every time they are executed or not at all.
With a command, you would like to
- Obtain a confirmation depending on the specific situation (model) or not.
- Adapt the confirmation message to the situation (model).
Improvement
For a command, there is a selection of the type of confirmation (standard, customized, dynamic) instead of a check mark "Confirm yes/no".
Code migration
Replacement of
- com.top_logic.tool.boundsec.CommandHandler.ConfirmConfig.getConfirm()
- com.top_logic.tool.boundsec.CommandHandler.ConfirmConfig.getConfirmMessage()
through
- com.top_logic.tool.boundsec.CommandHandler.ConfirmConfig.getConfirmation()
In concrete terms, this means that in CommandHandler configurations the properties confirm and confirmMessage must be replaced by the new property confirmation:
<handler id="..." class="my.package.MyCommandHandler" confirm="true" />
becomes
<handler id="..." class="my.package.MyCommandHandler" confirmation="com.top_logic.tool.boundsec.confirm.DefaultConfirmation" />
And
<handler id="..." class="my.package.MyCommandHandler" confirm="true" confirmMessage="my.resourceKey />
becomes
<handler id="..." class="my.package.MyCommandHandler" confirmMessage="my.resourceKey" > <confirmation class="com.top_logic.tool.boundsec.confirm.CustomConfirmation" confirmMessage="my.resourceKey" /> </handler>
In any handlers configured in the application configuration in the com.top_logic.tool.boundsec.CommandHandlerFactory section, this migration must be carried out manually. An upgrade tool can be used for layouts that have been exported to the development environment:
mvn exec:java@migrate-ticket28336