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
Fields Modifier and Type Field Description protected SchemaHelper
_schemaHelper
The schema helper.protected SourceResolver
_sourceResolver
The source resolver.
-
Constructor Summary
Constructors Constructor Description StaticSchemaDefinitionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
Collection<SchemaDefinition>
getDefinitions()
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 Detail
-
_sourceResolver
protected SourceResolver _sourceResolver
The source resolver.
-
_schemaHelper
protected SchemaHelper _schemaHelper
The schema helper.
-
-
Constructor Detail
-
StaticSchemaDefinitionProvider
public StaticSchemaDefinitionProvider()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getDefinitions
public Collection<SchemaDefinition> 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.
-
-