Writeable
, ToXContent
, ToXContentObject
public class PluginInfo extends java.lang.Object implements Writeable, ToXContentObject
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ES_PLUGIN_POLICY |
|
static java.lang.String |
ES_PLUGIN_PROPERTIES |
EMPTY_PARAMS
Constructor | Description |
---|---|
PluginInfo(java.lang.String name,
java.lang.String description,
java.lang.String version,
java.lang.String classname,
java.util.List<java.lang.String> extendedPlugins,
boolean hasNativeController,
boolean requiresKeystore) |
Construct plugin info.
|
PluginInfo(StreamInput in) |
Construct plugin info from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object o) |
|
static java.util.List<java.nio.file.Path> |
extractAllPlugins(java.nio.file.Path rootPath) |
Extracts all
PluginInfo from the provided rootPath expanding meta plugins if needed. |
java.lang.String |
getClassname() |
The entry point to the plugin.
|
java.lang.String |
getDescription() |
The description of the plugin.
|
java.util.List<java.lang.String> |
getExtendedPlugins() |
Other plugins this plugin extends through SPI.
|
java.lang.String |
getName() |
The name of the plugin.
|
java.lang.String |
getVersion() |
The version of Elasticsearch the plugin was built for.
|
int |
hashCode() |
|
boolean |
hasNativeController() |
Whether or not the plugin has a native controller.
|
static PluginInfo |
readFromProperties(java.nio.file.Path path) |
Reads and validates the plugin descriptor file.
|
boolean |
requiresKeystore() |
Whether or not the plugin requires the elasticsearch keystore to exist.
|
java.lang.String |
toString() |
|
java.lang.String |
toString(java.lang.String prefix) |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public static final java.lang.String ES_PLUGIN_PROPERTIES
public static final java.lang.String ES_PLUGIN_POLICY
public PluginInfo(java.lang.String name, java.lang.String description, java.lang.String version, java.lang.String classname, java.util.List<java.lang.String> extendedPlugins, boolean hasNativeController, boolean requiresKeystore)
name
- the name of the plugindescription
- a description of the pluginversion
- the version of Elasticsearch the plugin is built forclassname
- the entry point to the pluginextendedPlugins
- other plugins this plugin extends through SPIhasNativeController
- whether or not the plugin has a native controllerrequiresKeystore
- whether or not the plugin requires the elasticsearch keystore to be createdpublic PluginInfo(StreamInput in) throws java.io.IOException
in
- the streamjava.io.IOException
- if an I/O exception occurred reading the plugin info from the streampublic void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public static java.util.List<java.nio.file.Path> extractAllPlugins(java.nio.file.Path rootPath) throws java.io.IOException
PluginInfo
from the provided rootPath
expanding meta plugins if needed.rootPath
- the path where the plugins are installedrootPath
java.io.IOException
- if an I/O exception occurred reading the plugin descriptorspublic static PluginInfo readFromProperties(java.nio.file.Path path) throws java.io.IOException
path
- the path to the root directory for the pluginjava.io.IOException
- if an I/O exception occurred reading the plugin descriptorpublic java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getClassname()
public java.util.List<java.lang.String> getExtendedPlugins()
public java.lang.String getVersion()
public boolean hasNativeController()
true
if the plugin has a native controllerpublic boolean requiresKeystore()
true
if the plugin requires a keystore, false
otherwisepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String prefix)