Package org.elasticsearch.index.mapper
Class MapperTestCase.ParameterChecker
java.lang.Object
org.elasticsearch.index.mapper.MapperTestCase.ParameterChecker
- Enclosing class:
- MapperTestCase
public class MapperTestCase.ParameterChecker
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ParameterChecker()
-
Method Summary
Modifier and Type Method Description void
registerConflictCheck(java.lang.String param, org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update)
Register a check that a parameter update will cause a conflict, using the minimal mapping as a basevoid
registerConflictCheck(java.lang.String param, org.elasticsearch.common.xcontent.XContentBuilder init, org.elasticsearch.common.xcontent.XContentBuilder update)
Register a check that a parameter update will cause a conflictvoid
registerUpdateCheck(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update, java.util.function.Consumer<org.elasticsearch.index.mapper.FieldMapper> check)
Register a check that a parameter can be updated, using the minimal mapping as a basevoid
registerUpdateCheck(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> init, org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update, java.util.function.Consumer<org.elasticsearch.index.mapper.FieldMapper> check)
Register a check that a parameter can be updatedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ParameterChecker
public ParameterChecker()
-
-
Method Details
-
registerUpdateCheck
public void registerUpdateCheck(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update, java.util.function.Consumer<org.elasticsearch.index.mapper.FieldMapper> check) throws java.io.IOExceptionRegister a check that a parameter can be updated, using the minimal mapping as a base- Parameters:
update
- a field builder applied on top of the minimal mappingcheck
- a check that the updated parameter has been applied to the FieldMapper- Throws:
java.io.IOException
-
registerUpdateCheck
public void registerUpdateCheck(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> init, org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update, java.util.function.Consumer<org.elasticsearch.index.mapper.FieldMapper> check) throws java.io.IOExceptionRegister a check that a parameter can be updated- Parameters:
init
- the initial mappingupdate
- the updated mappingcheck
- a check that the updated parameter has been applied to the FieldMapper- Throws:
java.io.IOException
-
registerConflictCheck
public void registerConflictCheck(java.lang.String param, org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,java.io.IOException> update) throws java.io.IOExceptionRegister a check that a parameter update will cause a conflict, using the minimal mapping as a base- Parameters:
param
- the parameter name, expected to appear in the error messageupdate
- a field builder applied on top of the minimal mapping- Throws:
java.io.IOException
-
registerConflictCheck
public void registerConflictCheck(java.lang.String param, org.elasticsearch.common.xcontent.XContentBuilder init, org.elasticsearch.common.xcontent.XContentBuilder update)Register a check that a parameter update will cause a conflict- Parameters:
param
- the parameter name, expected to appear in the error messageinit
- the initial mappingupdate
- the updated mapping
-