Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

hmcts/bulk-scan-ccd-event-handler-lib

Repository files navigation

Bulk Scan CCD event handler

Build Status Codacy Badge codecov Download

This library will be used to handle CCD events related to creating a case from an bulk-scan exception record.

Usage

  1. Create an instance of case transformer by implementing ExceptionRecordToCaseTransformer interface.

  2. Create an instance of a handler:

    ExceptionRecordEventHandler handler = 
        ExceptionRecordEventHandlerFactory.getHandler(
            transformer,
            ccdUrl,
            s2sTokenSupplier
        );

    where s2sTokenSupplier is an function returning s2s token for your service.

  3. Call the handler by passing CaseCreationRequest to it:

    CaseCreationResult result = handler.handle(careCreationRequest);

The handler will create a case in CCD for you and return the ID of the new case.

You can check a sample implementation in this repository.

Developing

Prerequisites

Unit tests

To run all unit tests execute the following command:

./gradlew test

Code quality checks

We use checkstyle and PMD.
To run all checks execute the following command:

./lint.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description or website provided.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5