Package org.apache.solr.common.util
Class CommandOperation
java.lang.Object
org.apache.solr.common.util.CommandOperation
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic List<CommandOperation> clone(List<CommandOperation> ops) booleangetBoolean(String key, boolean def) getCopy()Get a required field.Get collection of values for a key.getValuesExcluding(String... keys) Get all the values from the metadata for the command without the specified keysbooleanhasError()static List<CommandOperation> parse(InputStream in, Set<String> singletonCommands) Parse the command operations into command objects from javabin payload * @param singletonCommands commands that cannot be repeatedstatic List<CommandOperation> static List<CommandOperation> Parse the command operations into command objects from a json payloadstatic List<CommandOperation> readCommands(Iterable<ContentStream> streams, NamedList resp) static List<CommandOperation> readCommands(Iterable<ContentStream> streams, NamedList resp, Set<String> singletonCommands) Read commands from request streamsvoidtoString()void
-
Field Details
-
name
-
ERR_MSGS
- See Also:
-
ROOT_OBJ
- See Also:
-
-
Constructor Details
-
CommandOperation
-
-
Method Details
-
getCommandData
-
getStr
-
getBoolean
-
setCommandData
-
getDataMap
-
getVal
-
getStrs
-
unknownOperation
public void unknownOperation() -
getStrs
Get collection of values for a key. If only one val is present a single value collection is returned -
getStr
Get a required field. If missing it adds to the errors -
hasError
public boolean hasError() -
addError
-
getValuesExcluding
Get all the values from the metadata for the command without the specified keys -
getErrors
-
captureErrors
-
parse
- Throws:
IOException
-
parse
public static List<CommandOperation> parse(InputStream in, Set<String> singletonCommands) throws IOException Parse the command operations into command objects from javabin payload * @param singletonCommands commands that cannot be repeated- Throws:
IOException
-
parse
public static List<CommandOperation> parse(Reader rdr, Set<String> singletonCommands) throws IOException Parse the command operations into command objects from a json payload- Parameters:
rdr- The payloadsingletonCommands- commands that cannot be repeated- Returns:
- parsed list of commands
- Throws:
IOException
-
getCopy
-
getMap
-
toString
-
readCommands
public static List<CommandOperation> readCommands(Iterable<ContentStream> streams, NamedList resp) throws IOException - Throws:
IOException
-
readCommands
public static List<CommandOperation> readCommands(Iterable<ContentStream> streams, NamedList resp, Set<String> singletonCommands) throws IOException Read commands from request streams- Parameters:
streams- the streamsresp- solr query responsesingletonCommands- , commands that cannot be repeated- Returns:
- parsed list of commands
- Throws:
IOException- if there is an error while parsing the stream
-
clone
-
getInt
-
getInt
-