Class ScriptMetaData

    • Constructor Detail

      • ScriptMetaData

        public ScriptMetaData​(StreamInput in)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • fromXContent

        public static ScriptMetaData fromXContent​(XContentParser parser)
                                           throws java.io.IOException
        This will parse XContent into ScriptMetaData. The following format will be parsed: { "<id>" : "<{@link StoredScriptSource#fromXContent(XContentParser, boolean)}>", "<id>" : "<{@link StoredScriptSource#fromXContent(XContentParser, boolean)}>", ... } When loading from a source prior to 6.0, if multiple scripts using the old namespace id format of [lang#id] are found to have the same id but different languages an error will occur.
        Throws:
        java.io.IOException
      • toXContent

        public XContentBuilder toXContent​(XContentBuilder builder,
                                          ToXContent.Params params)
                                   throws java.io.IOException
        This will write XContent from ScriptMetaData. The following format will be written: { "<id>" : "<{@link StoredScriptSource#toXContent(XContentBuilder, Params)}>", "<id>" : "<{@link StoredScriptSource#toXContent(XContentBuilder, Params)}>", ... }
        Specified by:
        toXContent in interface ToXContent
        Throws:
        java.io.IOException
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object