Class ConfigSetAPIBase
- java.lang.Object
-
- org.apache.solr.handler.configsets.ConfigSetAPIBase
-
- Direct Known Subclasses:
CreateConfigSetAPI
,DeleteConfigSetAPI
,UploadConfigSetAPI
,UploadConfigSetFileAPI
public class ConfigSetAPIBase extends Object
Parent class for all APIs that manipulate configsetsContains utilities for tasks common in configset manipulation, including running configset "commands" and checking configset "trusted-ness".
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigSetService
configSetService
protected CoreContainer
coreContainer
protected Optional<DistributedCollectionConfigSetCommandRunner>
distributedCollectionConfigSetCommandRunner
-
Constructor Summary
Constructors Constructor Description ConfigSetAPIBase(CoreContainer coreContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createBaseNode(ConfigSetService configSetService, boolean overwritesExisting, boolean requestIsTrusted, String configName)
protected void
ensureConfigSetUploadEnabled()
protected InputStream
ensureNonEmptyInputStream(SolrQueryRequest req)
protected boolean
isCurrentlyTrusted(String configName)
protected boolean
isTrusted(Principal userPrincipal, AuthenticationPlugin authPlugin)
protected void
runConfigSetCommand(SolrQueryResponse rsp, org.apache.solr.common.params.ConfigSetParams.ConfigSetAction action, Map<String,Object> messageToSend)
-
-
-
Field Detail
-
coreContainer
protected final CoreContainer coreContainer
-
distributedCollectionConfigSetCommandRunner
protected final Optional<DistributedCollectionConfigSetCommandRunner> distributedCollectionConfigSetCommandRunner
-
configSetService
protected final ConfigSetService configSetService
-
-
Constructor Detail
-
ConfigSetAPIBase
public ConfigSetAPIBase(CoreContainer coreContainer)
-
-
Method Detail
-
runConfigSetCommand
protected void runConfigSetCommand(SolrQueryResponse rsp, org.apache.solr.common.params.ConfigSetParams.ConfigSetAction action, Map<String,Object> messageToSend) throws Exception
- Throws:
Exception
-
ensureConfigSetUploadEnabled
protected void ensureConfigSetUploadEnabled()
-
ensureNonEmptyInputStream
protected InputStream ensureNonEmptyInputStream(SolrQueryRequest req) throws IOException
- Throws:
IOException
-
isTrusted
protected boolean isTrusted(Principal userPrincipal, AuthenticationPlugin authPlugin)
-
isCurrentlyTrusted
protected boolean isCurrentlyTrusted(String configName) throws IOException
- Throws:
IOException
-
createBaseNode
protected void createBaseNode(ConfigSetService configSetService, boolean overwritesExisting, boolean requestIsTrusted, String configName) throws IOException
- Throws:
IOException
-
-