class KogitoResourceContentService {

    public void loadFile(final String fileUri,
                         final RemoteCallback<String> callback,
                         final ErrorCallback<Object> errorCallback) {
        resourceContentService.get(fileUri).then((IThenable.ThenOnFulfilledCallbackFn<String, Void>) fileContent -> {
            callback.callback(fileContent);
            return promises.resolve();
        })
                .catch_(error -> {
                    errorCallback.error("Error " + error, new Throwable("Failed to load file " + fileUri));
                    return null;
                })
        ;
    }

    private  KogitoResourceContentService();
    @Inject public  KogitoResourceContentService(final ResourceContentService resourceContentService,
                                        final Promises promises);

}