Class Template

java.lang.Object
org.opensearch.cluster.AbstractDiffable<Template>
org.opensearch.cluster.metadata.Template
All Implemented Interfaces:
Diffable<Template>, org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentObject

@PublicApi(since="1.0.0") public class Template extends AbstractDiffable<Template> implements org.opensearch.core.xcontent.ToXContentObject
A template consists of optional settings, mappings, or alias configuration for an index, however, it is entirely independent from an index. It's a building block forming part of a regular index template and a ComponentTemplate.
Opensearch.api:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable

    org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.opensearch.core.xcontent.ConstructingObjectParser<Template,Void>
     

    Fields inherited from interface org.opensearch.core.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Template(Settings settings, CompressedXContent mappings, Map<String,AliasMetadata> aliases)
     
    Template(org.opensearch.core.common.io.stream.StreamInput in)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    int
     
     
     
     
    org.opensearch.core.xcontent.XContentBuilder
    toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.cluster.AbstractDiffable

    diff, readDiffFrom

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject

    isFragment
  • Field Details

    • PARSER

      public static final org.opensearch.core.xcontent.ConstructingObjectParser<Template,Void> PARSER
  • Constructor Details

  • Method Details

    • settings

      public Settings settings()
    • mappings

      public CompressedXContent mappings()
    • aliases

      public Map<String,AliasMetadata> aliases()
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.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.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException