@Test public void exportEmptyResultSetWithoutHeader() throws IOException { processor.process(new MockAciResponseInputStream(IOUtils.toInputStream("<?xml version='1.0' encoding='UTF-8' ?>\n<autnresponse><response/></autnresponse>"))); verify(exportStrategy, never()).exportRecord(eq(outputStream), anyListOf(String.class)); }
@Override public Void process(final XMLStreamReader aciResponse) throws AciErrorException, ProcessorException { try { if (isErrorResponse(aciResponse)) { setErrorProcessor(new ErrorProcessor()); processErrorResponse(aciResponse); } while (aciResponse.hasNext()) { aciResponse.next(); if (aciResponse.isStartElement()) { if (HIT_NODE_NAME.equals(aciResponse.getLocalName())) { parseHit(aciResponse); } } } } catch (final XMLStreamException | IOException e) { throw new ProcessorException("Error parsing data", e); } return null; }
ExportQueryResponseProcessor extends AbstractStAXProcessor<Void> { @Override public Void process(final XMLStreamReader aciResponse) throws AciErrorException, ProcessorException { try { if (isErrorResponse(aciResponse)) { setErrorProcessor(new ErrorProcessor()); processErrorResponse(aciResponse); } while (aciResponse.hasNext()) { aciResponse.next(); if (aciResponse.isStartElement()) { if (HIT_NODE_NAME.equals(aciResponse.getLocalName())) { parseHit(aciResponse); } } } } catch (final XMLStreamException | IOException e) { throw new ProcessorException("Error parsing data", e); } return null; } }
ExportQueryResponseProcessor extends AbstractStAXProcessor<Void> { @Override public Void process(final XMLStreamReader aciResponse) throws AciErrorException, ProcessorException { try { if (isErrorResponse(aciResponse)) { setErrorProcessor(new ErrorProcessor()); processErrorResponse(aciResponse); } while (aciResponse.hasNext()) { aciResponse.next(); if (aciResponse.isStartElement()) { if (HIT_NODE_NAME.equals(aciResponse.getLocalName())) { parseHit(aciResponse); } } } } catch (final XMLStreamException | IOException e) { throw new ProcessorException("Error parsing data", e); } return null; } ExportQueryResponseProcessor(final PlatformDataExportStrategy exportStrategy, final OutputStream outputStream, final Collection<FieldInfo<?>> fieldInfoList, final Collection<String> selectedFieldIds); }
ExportQueryResponseProcessor extends AbstractStAXProcessor<Void> { @Override public Void process(final XMLStreamReader aciResponse) throws AciErrorException, ProcessorException { try { if (isErrorResponse(aciResponse)) { setErrorProcessor(new ErrorProcessor()); processErrorResponse(aciResponse); } while (aciResponse.hasNext()) { aciResponse.next(); if (aciResponse.isStartElement()) { if (HIT_NODE_NAME.equals(aciResponse.getLocalName())) { parseHit(aciResponse); } } } } catch (final XMLStreamException | IOException e) { throw new ProcessorException("Error parsing data", e); } return null; } ExportQueryResponseProcessor(final PlatformDataExportStrategy exportStrategy, final OutputStream outputStream, final Collection<FieldInfo<?>> fieldInfoList, final Collection<String> selectedFieldIds); @Override Void process(final XMLStreamReader aciResponse); }
ExportQueryResponseProcessor extends AbstractStAXProcessor<Void> { @Override public Void process(final XMLStreamReader aciResponse) throws AciErrorException, ProcessorException { try { if (isErrorResponse(aciResponse)) { setErrorProcessor(new ErrorProcessor()); processErrorResponse(aciResponse); } while (aciResponse.hasNext()) { aciResponse.next(); if (aciResponse.isStartElement()) { if (HIT_NODE_NAME.equals(aciResponse.getLocalName())) { parseHit(aciResponse); } } } } catch (final XMLStreamException | IOException e) { throw new ProcessorException("Error parsing data", e); } return null; } ExportQueryResponseProcessor(final PlatformDataExportStrategy exportStrategy, final OutputStream outputStream, final Collection<FieldInfo<?>> fieldInfoList, final Collection<String> selectedFieldIds); @Override Void process(final XMLStreamReader aciResponse);  }