use of uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedAddGraphHandler in project Gaffer by gchq.
the class AddGenericHandlerTest method shouldNotHandleAnything.
@Test
public void shouldNotHandleAnything() throws Exception {
given(store.isSupported(any())).willReturn(true);
FederatedAddGraphHandler federatedAddGraphHandler = new FederatedAddGraphHandler();
federatedAddGraphHandler.addGenericHandler(store, graph);
verify(store, never()).addOperationHandler(any(), any(FederatedOperationIterableHandler.class));
}
use of uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedAddGraphHandler in project Gaffer by gchq.
the class AddGenericHandlerTest method shouldHandleGetAllElements.
@Test
public void shouldHandleGetAllElements() throws Exception {
given(store.isSupported(any())).willReturn(true);
given(store.isSupported(GetAllElements.class)).willReturn(false);
FederatedAddGraphHandler federatedAddGraphHandler = new FederatedAddGraphHandler();
federatedAddGraphHandler.addGenericHandler(store, graph);
verify(store, times(1)).addOperationHandler(eq(GetAllElements.class), any(FederatedOperationIterableHandler.class));
}
use of uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedAddGraphHandler in project Gaffer by gchq.
the class FederatedStore method addAdditionalOperationHandlers.
@Override
protected void addAdditionalOperationHandlers() {
// Override the Operations that don't have an output
getSupportedOperations().stream().filter(op -> !Output.class.isAssignableFrom(op) && !AddElements.class.equals(op) && !AddNamedOperation.class.equals(op) && !AddNamedView.class.equals(op)).forEach(op -> addOperationHandler(op, new FederatedOperationHandler()));
addOperationHandler(GetSchema.class, new FederatedGetSchemaHandler());
addOperationHandler(Filter.class, new FederatedFilterHandler());
addOperationHandler(Aggregate.class, new FederatedAggregateHandler());
addOperationHandler(Transform.class, new FederatedTransformHandler());
addOperationHandler(Validate.class, new FederatedValidateHandler());
addOperationHandler(GetAllGraphIds.class, new FederatedGetAllGraphIDHandler());
addOperationHandler(AddGraph.class, new FederatedAddGraphHandler());
addOperationHandler(AddGraphWithHooks.class, new FederatedAddGraphWithHooksHandler());
addOperationHandler(RemoveGraph.class, new FederatedRemoveGraphHandler());
addOperationHandler(FederatedOperationChain.class, new FederatedOperationChainHandler());
addOperationHandler(GetTraits.class, new FederatedGetTraitsHandler());
addOperationHandler(GetAllGraphInfo.class, new FederatedGetAllGraphInfoHandler());
addOperationHandler(ChangeGraphAccess.class, new FederatedChangeGraphAccessHandler());
addOperationHandler(ChangeGraphId.class, new FederatedChangeGraphIdHandler());
}
Aggregations