Search in sources :

Example 1 with DeleteNamedOperation

use of uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation in project Gaffer by gchq.

the class NamedOperationExample method deleteNamedOperation.

public void deleteNamedOperation() {
    // ---------------------------------------------------------
    final DeleteNamedOperation operation = new DeleteNamedOperation.Builder().name("2-hop").build();
    // ---------------------------------------------------------
    runExampleNoResult(operation);
}
Also used : DeleteNamedOperation(uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation)

Example 2 with DeleteNamedOperation

use of uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation in project gaffer-doc by gchq.

the class NamedOperationExample method deleteNamedOperation.

public void deleteNamedOperation() {
    // ---------------------------------------------------------
    final DeleteNamedOperation operation = new DeleteNamedOperation.Builder().name("2-hop").build();
    // ---------------------------------------------------------
    runExampleNoResult(operation, null);
}
Also used : DeleteNamedOperation(uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation)

Example 3 with DeleteNamedOperation

use of uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation in project Gaffer by gchq.

the class NamedOperationCacheIT method shouldBeAbleToDeleteNamedOperationFromCache.

private void shouldBeAbleToDeleteNamedOperationFromCache() throws OperationException {
    // given
    final Store store = mock(Store.class);
    given(store.getProperties()).willReturn(properties);
    new AddNamedOperationHandler().doOperation(add, context, store);
    DeleteNamedOperation del = new DeleteNamedOperation.Builder().name("op").build();
    GetAllNamedOperations get = new GetAllNamedOperations();
    // when
    deleteNamedOperationHandler.doOperation(del, context, store);
    List<NamedOperationDetail> results = Lists.newArrayList(getAllNamedOperationsHandler1.doOperation(get, context, store));
    // then
    assertThat(results).isEmpty();
}
Also used : GetAllNamedOperations(uk.gov.gchq.gaffer.named.operation.GetAllNamedOperations) Store(uk.gov.gchq.gaffer.store.Store) NamedOperationDetail(uk.gov.gchq.gaffer.named.operation.NamedOperationDetail) AddNamedOperationHandler(uk.gov.gchq.gaffer.store.operation.handler.named.AddNamedOperationHandler) DeleteNamedOperation(uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation)

Aggregations

DeleteNamedOperation (uk.gov.gchq.gaffer.named.operation.DeleteNamedOperation)3 GetAllNamedOperations (uk.gov.gchq.gaffer.named.operation.GetAllNamedOperations)1 NamedOperationDetail (uk.gov.gchq.gaffer.named.operation.NamedOperationDetail)1 Store (uk.gov.gchq.gaffer.store.Store)1 AddNamedOperationHandler (uk.gov.gchq.gaffer.store.operation.handler.named.AddNamedOperationHandler)1