Package org.apache.solr.schema
Class FieldTypePluginLoader
- java.lang.Object
-
- org.apache.solr.util.plugin.AbstractPluginLoader<FieldType>
-
- org.apache.solr.schema.FieldTypePluginLoader
-
public final class FieldTypePluginLoader extends AbstractPluginLoader<FieldType>
-
-
Constructor Summary
Constructors Constructor Description FieldTypePluginLoader(IndexSchema schema, Map<String,FieldType> fieldTypes, Collection<SchemaAware> schemaAware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldType
create(SolrClassLoader loader, String name, String className, ConfigNode node)
Create a plugin from an XML configuration.protected void
init(FieldType plugin, ConfigNode node)
Initialize the plugin.protected FieldType
register(String name, FieldType plugin)
Register a plugin with a given name.-
Methods inherited from class org.apache.solr.util.plugin.AbstractPluginLoader
getDefaultPackages, load, loadSingle
-
-
-
-
Constructor Detail
-
FieldTypePluginLoader
public FieldTypePluginLoader(IndexSchema schema, Map<String,FieldType> fieldTypes, Collection<SchemaAware> schemaAware)
- Parameters:
schema
- The schema that will be used to initialize the FieldTypesfieldTypes
- All FieldTypes that are instantiated by this Plugin Loader will be added to this MapschemaAware
- Any SchemaAware objects that are instantiated by this Plugin Loader will be added to this collection.
-
-
Method Detail
-
create
protected FieldType create(SolrClassLoader loader, String name, String className, ConfigNode node) throws Exception
Description copied from class:AbstractPluginLoader
Create a plugin from an XML configuration. Plugins are defined using:<plugin name="name1" class="solr.ClassName"> ... </plugin>
- Overrides:
create
in classAbstractPluginLoader<FieldType>
name
- - The registered name. In the above example: "name1"className
- - class name for requested plugin. In the above example: "solr.ClassName"node
- - the XML node defining this plugin- Throws:
Exception
-
init
protected void init(FieldType plugin, ConfigNode node) throws Exception
Description copied from class:AbstractPluginLoader
Initialize the plugin.- Specified by:
init
in classAbstractPluginLoader<FieldType>
- Parameters:
plugin
- - the plugin to initializenode
- - the XML node defining this plugin- Throws:
Exception
-
register
protected FieldType register(String name, FieldType plugin) throws Exception
Description copied from class:AbstractPluginLoader
Register a plugin with a given name.- Specified by:
register
in classAbstractPluginLoader<FieldType>
- Returns:
- The plugin previously registered to this name, or null
- Throws:
Exception
-
-