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
Modifier and TypeFieldDescriptionprotected SchemaHelper
The schema helper.protected SourceResolver
The source resolver. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(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.void
service
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getDefinitions
Description copied from interface:SchemaDefinitionProvider
Return the schema definitions to add to the schema.- Specified by:
getDefinitions
in 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.
-