public class Validate extends Object implements Validatable, InputOutput<Iterable<? extends Element>,Iterable<? extends Element>>, MultiInput<Element>
Validate
operation takes in Element
s validates them using the
store schema and returns the valid Element
s.
If skipInvalidElements is set to false, the handler should stop the operation if invalid elements are found.
The Graph will automatically add this operation prior to all Validatable
operations when
executing.Validate.Builder
Modifier and Type | Class and Description |
---|---|
static class |
Validate.Builder |
Operation.BaseBuilder<OP extends Operation,B extends Operation.BaseBuilder<OP,?>>
Constructor and Description |
---|
Validate() |
Modifier and Type | Method and Description |
---|---|
Iterable<? extends Element> |
getInput() |
Map<String,String> |
getOptions() |
com.fasterxml.jackson.core.type.TypeReference<Iterable<? extends Element>> |
getOutputTypeReference() |
boolean |
isSkipInvalidElements() |
boolean |
isValidate() |
void |
setInput(Iterable<? extends Element> input) |
void |
setOptions(Map<String,String> options) |
void |
setSkipInvalidElements(boolean skipInvalidElements) |
void |
setValidate(boolean validate) |
Validate |
shallowClone()
Operation implementations should ensure a ShallowClone method is implemented.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
castToOutputType, getOutputClass
createInputArray, setInput
_getNullOrOptions, addOption, asOperationChain, getOption, getOption, validate, validateRequiredFieldPresent
public boolean isSkipInvalidElements()
isSkipInvalidElements
in interface Validatable
public boolean isValidate()
isValidate
in interface Validatable
public void setSkipInvalidElements(boolean skipInvalidElements)
setSkipInvalidElements
in interface Validatable
skipInvalidElements
- true if invalid elements should be skipped. Otherwise false if the operation should fail.public void setValidate(boolean validate)
setValidate
in interface Validatable
validate
- true if the operation should be validated. Otherwise false.public com.fasterxml.jackson.core.type.TypeReference<Iterable<? extends Element>> getOutputTypeReference()
getOutputTypeReference
in interface Output<Iterable<? extends Element>>
public Validate shallowClone()
Operation
shallowClone
in interface Operation
public Map<String,String> getOptions()
getOptions
in interface Operation
public void setOptions(Map<String,String> options)
setOptions
in interface Operation
options
- the operation options. This may contain store specific options such as authorisation strings or and
other properties required for the operation to be executed. Note these options will probably not be interpreted
in the same way by every store implementation.Copyright © 2022. All rights reserved.