ContractUpgradeService
Keywords: net.corda.core.node.services.ContractUpgradeService interface
Date: 2023-09-18

net.corda.core.node.services

## Interface ContractUpgradeService

-     @DoNotImplement
      public ContractUpgradeService

  The `interface ContractUpgradeService` is responsible for securely upgrading contract state objects according to a specified and mutually agreed (amongst participants) contract version. See also `class ContractUpgradeFlow` to understand the workflow associated with contract upgrades.

  See Also:
    `interface ContractUpgradeService`, `class ContractUpgradeFlow`

- - ### Constructor Detail

    - #### ContractUpgradeService

          public ContractUpgradeService()

  - ### Method Detail

    - #### getAuthorisedContractUpgrade

          @Nullable
          java.lang.String getAuthorisedContractUpgrade(@NotNull
                                                                  StateRef ref)

      Get contracts we would be willing to upgrade the suggested contract to.

    - #### storeAuthorisedContractUpgrade

          void storeAuthorisedContractUpgrade(@NotNull
                                              StateRef ref,
                                              @NotNull
                                              java.lang.Class<? extends net.corda.core.contracts.UpgradedContract<?,?>> upgradedContractClass)

      Store authorised state ref and associated UpgradeContract class

    - #### removeAuthorisedContractUpgrade

          void removeAuthorisedContractUpgrade(@NotNull
                                               StateRef ref)

      Remove a previously authorised state ref