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 ConfigSetServiceconfigSetServiceprotected CoreContainercoreContainerprotected Optional<DistributedCollectionConfigSetCommandRunner>distributedCollectionConfigSetCommandRunner
-
Constructor Summary
Constructors Constructor Description ConfigSetAPIBase(CoreContainer coreContainer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateBaseNode(ConfigSetService configSetService, boolean overwritesExisting, boolean requestIsTrusted, String configName)protected voidensureConfigSetUploadEnabled()protected InputStreamensureNonEmptyInputStream(SolrQueryRequest req)static booleanisTrusted(Principal userPrincipal, AuthenticationPlugin authPlugin)protected voidrunConfigSetCommand(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
public static boolean isTrusted(Principal userPrincipal, AuthenticationPlugin authPlugin)
-
createBaseNode
protected void createBaseNode(ConfigSetService configSetService, boolean overwritesExisting, boolean requestIsTrusted, String configName) throws IOException
- Throws:
IOException
-
-