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

API proposal

Rafal Kondratowicz edited this page Sep 28, 2018 · 1 revision

Service using the library would need to provide an instance of

interface ExceptionRecordToCaseMapper {
    CcdCase map(ExceptionRecord exceptionRec);
}

where the types are as below:

public class CcdCase {
    Long id;
    String jurisdiction;
    String caseTypeId;
    Map<String, Object> data;
}
public class ExceptionRecord { 
    Long id;
    Map<String, Object> data;
    // TBD
}

Note: Assumption here is that only 'submitted' event is handled.

Service will also need to provide IDAM and S2S tokens to the library so that it can create cases in CCD. This can be done be declaring a bean of type

class EventHandlerConfig {
    ...
    public EventHandlerConfig(
        Supplier<String> idamTokenSupplier, 
        Supplier<String> s2sTokenSupplier
    ) {
        ...
    }
}
Clone this wiki locally