Class StaticSchemaDefinitionProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.search.solr.schema.StaticSchemaDefinitionProvider
- All Implemented Interfaces:
SchemaDefinitionProvider,LogEnabled,Configurable,Serviceable
public class StaticSchemaDefinitionProvider
extends AbstractLogEnabled
implements SchemaDefinitionProvider, Configurable, Serviceable
Reads a given schema fragment file and provides the definitions defined in it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SchemaHelperThe schema helper.protected SourceResolverThe source resolver. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) Return the schema definitions to add to the schema.protected Collection<SchemaDefinition>getDefinitions(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schema) Get the definitions from the given schema representation.voidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_sourceResolver
The source resolver. -
_schemaHelper
The schema helper.
-
-
Constructor Details
-
StaticSchemaDefinitionProvider
public StaticSchemaDefinitionProvider()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
getDefinitions
Description copied from interface:SchemaDefinitionProviderReturn the schema definitions to add to the schema.- Specified by:
getDefinitionsin interfaceSchemaDefinitionProvider- Returns:
- a collection of schema definitions to add to the schema.
-
getDefinitions
protected Collection<SchemaDefinition> getDefinitions(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schema) Get the definitions from the given schema representation.- Parameters:
schema- The schema representation.- Returns:
- The collection of schema definitions defined in the schema.
-