@Override protected ControllerDTO getDto(ControllerEntity entity) { return entity.getController(); }
private ControllerDTO fetchController() throws IOException { try { final HttpGet get = createGetControllerRequest(); return execute(get, ControllerEntity.class).getController(); } catch (final HttpGetFailedException e) { if (RESPONSE_CODE_NOT_FOUND == e.getResponseCode()) { logger.debug("getController received NOT_FOUND, trying to access the old NiFi version resource url..."); final HttpGet get = createGet("/controller"); return execute(get, ControllerEntity.class).getController(); } throw e; } }