Class ValidateHandler
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.handler.ValidateHandler
-
- All Implemented Interfaces:
OperationHandler<Validate>
,OperationWithSchemaHandler<Validate,Iterable<? extends Element>>
,OutputOperationHandler<Validate,Iterable<? extends Element>>
public class ValidateHandler extends Object implements OutputOperationHandler<Validate,Iterable<? extends Element>>, OperationWithSchemaHandler<Validate,Iterable<? extends Element>>
AnValidateHandler
handles forValidate
operations. Takes anIterable
ofElement
s and returns anIterable
containing only validElement
s, specifically an instance ofValidatedElements
. TheSchema
is used to validate the elements. The isSkipInvalidElements flag onValidate
is used to determine what to do with invalidElement
s.
-
-
Constructor Summary
Constructors Constructor Description ValidateHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<? extends Element>
doOperation(Validate operation, Context context, Store store)
Execute the givenOutput
operation.Iterable<? extends Element>
doOperation(Validate operation, Schema schema)
-
-
-
Method Detail
-
doOperation
public Iterable<? extends Element> doOperation(Validate operation, Context context, Store store) throws OperationException
Description copied from interface:OutputOperationHandler
Execute the givenOutput
operation.- Specified by:
doOperation
in interfaceOperationHandler<Validate>
- Specified by:
doOperation
in interfaceOutputOperationHandler<Validate,Iterable<? extends Element>>
- Parameters:
operation
- theOutput
operation to be executedcontext
- the operation chain context, containing the user who executed the operationstore
- theStore
the operation should be run on- Returns:
- the output for the operation.
- Throws:
OperationException
- thrown if the operation fails
-
doOperation
public Iterable<? extends Element> doOperation(Validate operation, Schema schema)
- Specified by:
doOperation
in interfaceOperationWithSchemaHandler<Validate,Iterable<? extends Element>>
-
-