Class ManagedSynonymGraphFilterFactory.SynonymManager
- java.lang.Object
-
- org.apache.solr.rest.ManagedResource
-
- org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory.SynonymManager
-
- All Implemented Interfaces:
ManagedResource.ChildResourceSupport
- Enclosing class:
- ManagedSynonymGraphFilterFactory
public static class ManagedSynonymGraphFilterFactory.SynonymManager extends ManagedResource implements ManagedResource.ChildResourceSupport
ManagedResource implementation for synonyms, which are so specialized that it makes sense to implement this class as an inner class as it has little application outside the SynonymFilterFactory use cases.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.rest.ManagedResource
ManagedResource.ChildResourceSupport
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory.CasePreservedSynonymMappings>
synonymMappings
-
Fields inherited from class org.apache.solr.rest.ManagedResource
INIT_ARGS_JSON_FIELD, INITIALIZED_ON_JSON_FIELD, initializedOn, lastUpdateSinceInitialization, MANAGED_JSON_LIST_FIELD, MANAGED_JSON_MAP_FIELD, managedInitArgs, solrResourceLoader, storage, UPDATED_SINCE_INIT_JSON_FIELD
-
-
Constructor Summary
Constructors Constructor Description SynonymManager(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
applyCaseSetting(boolean ignoreCase, String str)
protected boolean
applyListUpdates(List<String> jsonList, boolean ignoreCase)
protected boolean
applyMapUpdates(Map<String,Object> jsonMap, boolean ignoreCase)
protected Object
applyUpdatesToManagedData(Object updates)
Called during PUT/POST processing to apply updates to the managed data passed from the client.void
doDeleteChild(BaseSolrResource endpoint, String childId)
Called to delete a named part (the given childId) of the resource at the given endpointvoid
doGet(BaseSolrResource endpoint, String childId)
Called to retrieve a named part (the given childId) of the resource at the given endpointboolean
getIgnoreCase()
boolean
getIgnoreCase(org.apache.solr.common.util.NamedList<?> initArgs)
protected Map<String,Set<String>>
getStoredView()
Returns a Map of how we store and load data managed by this resource, which is different than how it is managed at runtime in order to support the ignoreCase setting.protected void
onManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> managedInitArgs, Object managedData)
Method called after data has been loaded from storage to give the concrete implementation a chance to post-process the data.-
Methods inherited from class org.apache.solr.rest.ManagedResource
buildMapToStore, convertNamedListToMap, createStorage, doPost, doPut, getInitializedOn, getResourceId, getResourceLoader, getServerResourceClass, getUpdatedSinceInitialization, hasChangesSinceInitialization, loadManagedDataAndNotify, notifyObserversDuringInit, onResourceDeleted, processStoredData, reloadFromStorage, storeManagedData, updateInitArgs
-
-
-
-
Constructor Detail
-
SynonymManager
public SynonymManager(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO) throws org.apache.solr.common.SolrException
- Throws:
org.apache.solr.common.SolrException
-
-
Method Detail
-
onManagedDataLoadedFromStorage
protected void onManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> managedInitArgs, Object managedData) throws org.apache.solr.common.SolrException
Description copied from class:ManagedResource
Method called after data has been loaded from storage to give the concrete implementation a chance to post-process the data.- Specified by:
onManagedDataLoadedFromStorage
in classManagedResource
- Throws:
org.apache.solr.common.SolrException
-
applyUpdatesToManagedData
protected Object applyUpdatesToManagedData(Object updates)
Description copied from class:ManagedResource
Called during PUT/POST processing to apply updates to the managed data passed from the client.- Specified by:
applyUpdatesToManagedData
in classManagedResource
-
getStoredView
protected Map<String,Set<String>> getStoredView()
Returns a Map of how we store and load data managed by this resource, which is different than how it is managed at runtime in order to support the ignoreCase setting.
-
getIgnoreCase
public boolean getIgnoreCase()
-
getIgnoreCase
public boolean getIgnoreCase(org.apache.solr.common.util.NamedList<?> initArgs)
-
doGet
public void doGet(BaseSolrResource endpoint, String childId)
Description copied from class:ManagedResource
Called to retrieve a named part (the given childId) of the resource at the given endpoint- Specified by:
doGet
in classManagedResource
-
doDeleteChild
public void doDeleteChild(BaseSolrResource endpoint, String childId)
Description copied from class:ManagedResource
Called to delete a named part (the given childId) of the resource at the given endpoint- Specified by:
doDeleteChild
in classManagedResource
-
-