use of uk.gov.gchq.gaffer.operation.impl.export.GetExport in project Gaffer by gchq.
the class GetSetExportTest method shouldSerialiseAndDeserialiseOperation.
@Test
@Override
public void shouldSerialiseAndDeserialiseOperation() throws SerialisationException {
// Given
final GetExport operation = new GetSetExport.Builder().key("key").jobId("jobId").start(0).end(5).build();
// When
byte[] json = serialiser.serialise(operation, true);
final GetSetExport deserialisedOp = serialiser.deserialise(json, GetSetExport.class);
// Then
assertEquals("key", deserialisedOp.getKey());
assertEquals("jobId", deserialisedOp.getJobId());
assertEquals(0, deserialisedOp.getStart());
assertEquals(5, (int) deserialisedOp.getEnd());
}
use of uk.gov.gchq.gaffer.operation.impl.export.GetExport in project Gaffer by gchq.
the class GetExportsHandler method doOperation.
@Override
public Map<String, CloseableIterable<?>> doOperation(final GetExports getExports, final Context context, final Store store) throws OperationException {
final Map<String, CloseableIterable<?>> exports = new LinkedHashMap<>();
for (final GetExport getExport : getExports.getGetExports()) {
final CloseableIterable<?> export = store._execute(new OperationChain<>(getExport), context);
exports.put(getExport.getClass().getName() + ": " + getExport.getKey(), export);
}
return exports;
}
Aggregations