Class ParameterizableYamlXContentParser

java.lang.Object
org.elasticsearch.test.rest.yaml.ParameterizableYamlXContentParser
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.xcontent.XContentParser

public class ParameterizableYamlXContentParser extends Object implements org.elasticsearch.xcontent.XContentParser
a wrapper around YamlXContentParser that allows for parameter replacement in the yaml file
  • Constructor Details

    • ParameterizableYamlXContentParser

      public ParameterizableYamlXContentParser(org.elasticsearch.xcontent.XContentParser delegate, Map<String,?> params)
  • Method Details

    • contentType

      public org.elasticsearch.xcontent.XContentType contentType()
      Specified by:
      contentType in interface org.elasticsearch.xcontent.XContentParser
    • allowDuplicateKeys

      public void allowDuplicateKeys(boolean allowDuplicateKeys)
      Specified by:
      allowDuplicateKeys in interface org.elasticsearch.xcontent.XContentParser
    • nextToken

      public org.elasticsearch.xcontent.XContentParser.Token nextToken() throws IOException
      Specified by:
      nextToken in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • nextFieldName

      @Nullable public String nextFieldName() throws IOException
      Specified by:
      nextFieldName in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • skipChildren

      public void skipChildren() throws IOException
      Specified by:
      skipChildren in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • currentToken

      public org.elasticsearch.xcontent.XContentParser.Token currentToken()
      Specified by:
      currentToken in interface org.elasticsearch.xcontent.XContentParser
    • currentName

      public String currentName() throws IOException
      Specified by:
      currentName in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • map

      public Map<String,Object> map() throws IOException
      Specified by:
      map in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • mapOrdered

      public Map<String,Object> mapOrdered() throws IOException
      Specified by:
      mapOrdered in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • mapStrings

      public Map<String,String> mapStrings() throws IOException
      Specified by:
      mapStrings in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • map

      public <T> Map<String,T> map(Supplier<Map<String,T>> mapFactory, CheckedFunction<org.elasticsearch.xcontent.XContentParser,T,IOException> mapValueParser) throws IOException
      Specified by:
      map in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • list

      public List<Object> list() throws IOException
      Specified by:
      list in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • listOrderedMap

      public List<Object> listOrderedMap() throws IOException
      Specified by:
      listOrderedMap in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • text

      public String text() throws IOException
      Specified by:
      text in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • textOrNull

      public String textOrNull() throws IOException
      Specified by:
      textOrNull in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • charBufferOrNull

      public CharBuffer charBufferOrNull() throws IOException
      Specified by:
      charBufferOrNull in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • charBuffer

      public CharBuffer charBuffer() throws IOException
      Specified by:
      charBuffer in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • objectText

      public Object objectText() throws IOException
      Specified by:
      objectText in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • objectBytes

      public Object objectBytes() throws IOException
      Specified by:
      objectBytes in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • hasTextCharacters

      public boolean hasTextCharacters()
      Specified by:
      hasTextCharacters in interface org.elasticsearch.xcontent.XContentParser
    • textCharacters

      public char[] textCharacters() throws IOException
      Specified by:
      textCharacters in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • textLength

      public int textLength() throws IOException
      Specified by:
      textLength in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • textOffset

      public int textOffset() throws IOException
      Specified by:
      textOffset in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • numberValue

      public Number numberValue() throws IOException
      Specified by:
      numberValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • numberType

      public org.elasticsearch.xcontent.XContentParser.NumberType numberType() throws IOException
      Specified by:
      numberType in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • shortValue

      public short shortValue(boolean coerce) throws IOException
      Specified by:
      shortValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • intValue

      public int intValue(boolean coerce) throws IOException
      Specified by:
      intValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • longValue

      public long longValue(boolean coerce) throws IOException
      Specified by:
      longValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • floatValue

      public float floatValue(boolean coerce) throws IOException
      Specified by:
      floatValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • doubleValue

      public double doubleValue(boolean coerce) throws IOException
      Specified by:
      doubleValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • shortValue

      public short shortValue() throws IOException
      Specified by:
      shortValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • intValue

      public int intValue() throws IOException
      Specified by:
      intValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • longValue

      public long longValue() throws IOException
      Specified by:
      longValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • floatValue

      public float floatValue() throws IOException
      Specified by:
      floatValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • doubleValue

      public double doubleValue() throws IOException
      Specified by:
      doubleValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • isBooleanValue

      public boolean isBooleanValue() throws IOException
      Specified by:
      isBooleanValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • booleanValue

      public boolean booleanValue() throws IOException
      Specified by:
      booleanValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • binaryValue

      public byte[] binaryValue() throws IOException
      Specified by:
      binaryValue in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • getTokenLocation

      public org.elasticsearch.xcontent.XContentLocation getTokenLocation()
      Specified by:
      getTokenLocation in interface org.elasticsearch.xcontent.XContentParser
    • namedObject

      public <T> T namedObject(Class<T> categoryClass, String name, Object context) throws IOException
      Specified by:
      namedObject in interface org.elasticsearch.xcontent.XContentParser
      Throws:
      IOException
    • getXContentRegistry

      public org.elasticsearch.xcontent.NamedXContentRegistry getXContentRegistry()
      Specified by:
      getXContentRegistry in interface org.elasticsearch.xcontent.XContentParser
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface org.elasticsearch.xcontent.XContentParser
    • getRestApiVersion

      public RestApiVersion getRestApiVersion()
      Specified by:
      getRestApiVersion in interface org.elasticsearch.xcontent.XContentParser
    • getDeprecationHandler

      public org.elasticsearch.xcontent.DeprecationHandler getDeprecationHandler()
      Specified by:
      getDeprecationHandler in interface org.elasticsearch.xcontent.XContentParser
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException