Class ComponentTemplate

java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<ComponentTemplate>
org.elasticsearch.cluster.metadata.ComponentTemplate
All Implemented Interfaces:
Diffable<ComponentTemplate>, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class ComponentTemplate extends AbstractDiffable<ComponentTemplate> implements org.elasticsearch.common.xcontent.ToXContentObject
A component template is a re-usable Template as well as metadata about the template. Each component template is expected to be valid on its own. For example, if a component template contains a field "foo", it's expected to contain all the necessary settings/mappings/etc for the "foo" field. These component templates make up the individual pieces composing an index template.
  • Field Details

    • PARSER

      public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<ComponentTemplate,Void> PARSER
  • Constructor Details

  • Method Details

    • parse

      public static ComponentTemplate parse(org.elasticsearch.common.xcontent.XContentParser parser)
    • template

      public Template template()
    • version

      @Nullable public Long version()
    • metadata

      @Nullable public Map<String,Object> metadata()
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException