Search Results for

    Show / Hide Table of Contents

    Java Migration Blueprint

    This blueprint should be used exclusively to upgrade your existing Java add-on to an app while maintaining the compatibility with the old add-on installs.

    The migration blueprint can be found here.

    There are a couple of main points to consider when doing the upgrade:

    Descriptor Changes

    Descriptor Version

    First and foremost you'll need to change the descriptorVersion field to 1.4 in the descriptor JSON. This is the version that tells Trados Enterprise that your add-on has became an app and needs to be handled accordingly.

    Note

    In addition to descriptorVersion, the version field also needs to be updated to signal Trados Enterprise that there's a new descriptor available, as per usual.

    App Lifecycle Endpoint

    The old addonLifecycle standard endpoint needs to be replaced with the appLifecycle endpoint but at the same time the old route must be kept along the new route for backwards compatibility.

    New Lifecycle Events

    Some lifecycle events have been renamed while others have been added.

    INSTALLED

    The ACTIVATED event is now called INSTALLED. To ensure backwards compatibility with the old form, the migration blueprint knows to handle both.

    UNINSTALLED

    Similarly to the ACTIVATED event, the DEACTIVATED event is now called UNINSTALLED. Once again, the migration blueprint supports both.

    UPDATED

    To explain the purpose of the UPDATED event we have to reflect on the REGISTERED changes.

    Previously, Trados Enterprise was providing different pairs of credentials for each tenant that was installing the add-on. An app is now provided with a single pair of credentials just once, at registration.

    Since, your app has already been registered as an add-on, the REGISTERED event will no longer be sent so Trados Enterprise will provide the credentials in the same manner but via the new UPDATED event.

    The UPDATED event is sent by Trados Enterprise when the descriptorVersion: 1.4 is detected. When this event is invoked, the app(former add-on) needs to save the received pair of credentials(clientId/clientSecret) per registration and discard the old credentials saved per tenant installs.

    Trados Cloud Platform API Authentication

    If your add-on was integrating with Trados Cloud Platform API, the credentials used to authenticate came from the tenant installation(accountSettings collection).

    With the new approach the credentials should now be retrieved from the app registration(appRegistration collection). To access the registration credentials you can call the com.rws.lt.lc.blueprint.persistence.findFirst method.

    For eg:

    AppRegistration entity = appRegistrationRepository.findFirst();
    ClientCredentials clientCredentials = entity.getClientCredentials();
    

    For more details see the Trados Cloud Platform API guide.

    Summary

    To help you quickly implement the migration changes we gathered below a list of files that you need to look into:

    • descriptor.json
    • LifecycleController.java
    • UpdatedEvent.java
    • AppLifecycleEvent.java
    • AccountSettingsService.java
    • AccountSettingsAtomicRepository.java
    • AccountSettingsAtomicRepositoryImpl.java
    • AccountSettingsRepository.java
    • Improve this Doc
    In this article
    Back to top Generated by DocFX