Package org.jboss.as.cli.operation.impl
Class DefaultCallbackHandler
- java.lang.Object
-
- org.jboss.as.cli.operation.impl.ValidatingCallbackHandler
-
- org.jboss.as.cli.operation.impl.DefaultCallbackHandler
-
- All Implemented Interfaces:
CommandLineParser.CallbackHandler,ParsedCommandLine
public class DefaultCallbackHandler extends ValidatingCallbackHandler implements ParsedCommandLine
- Author:
- Alexey Loubyansky
-
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.operation.impl.ValidatingCallbackHandler
operationStr
-
-
Constructor Summary
Constructors Constructor Description DefaultCallbackHandler()DefaultCallbackHandler(boolean validate)DefaultCallbackHandler(OperationRequestAddress prefix)
-
Method Summary
-
Methods inherited from class org.jboss.as.cli.operation.impl.ValidatingCallbackHandler
assertValidNodeName, assertValidParameterName, assertValidType, start
-
-
-
-
Constructor Detail
-
DefaultCallbackHandler
public DefaultCallbackHandler()
-
DefaultCallbackHandler
public DefaultCallbackHandler(boolean validate)
-
DefaultCallbackHandler
public DefaultCallbackHandler(OperationRequestAddress prefix)
-
-
Method Detail
-
parse
@Deprecated public void parse(OperationRequestAddress initialAddress, String argsStr) throws CommandFormatException
Deprecated.- Throws:
CommandFormatException
-
parse
public void parse(OperationRequestAddress initialAddress, String argsStr, CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
parse
public void parse(OperationRequestAddress initialAddress, String argsStr, CommandContext ctx, boolean disableResolutionException) throws CommandFormatException
- Throws:
CommandFormatException
-
parse
@Deprecated public void parse(OperationRequestAddress initialAddress, String argsStr, boolean validation) throws CommandFormatException
Deprecated.- Throws:
CommandFormatException
-
parse
public void parse(OperationRequestAddress initialAddress, String argsStr, boolean validation, CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
parseOperation
@Deprecated public void parseOperation(OperationRequestAddress prefix, String argsStr) throws CommandFormatException
Deprecated.- Throws:
CommandFormatException
-
parseOperation
public void parseOperation(OperationRequestAddress prefix, String argsStr, CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
parseHeaders
public void parseHeaders(String argsStr, CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
reset
public void reset()
-
getOriginalLine
public String getOriginalLine()
- Specified by:
getOriginalLinein interfaceParsedCommandLine
-
getSubstitutedLine
public String getSubstitutedLine()
Description copied from interface:ParsedCommandLineThe original line with all the necessary substitution (of commands, variables, system properties, etc) performed.- Specified by:
getSubstitutedLinein interfaceParsedCommandLine- Returns:
- the original line with all the necessary substitution (of commands, variables, system properties, etc) performed
-
getSubstitutions
public StateParser.SubstitutedLine getSubstitutions()
- Specified by:
getSubstitutionsin interfaceParsedCommandLine
-
getOtherProperties
public List<String> getOtherProperties()
- Specified by:
getOtherPropertiesin interfaceParsedCommandLine
-
isRequestComplete
public boolean isRequestComplete()
- Specified by:
isRequestCompletein interfaceParsedCommandLine
-
endsOnPropertySeparator
public boolean endsOnPropertySeparator()
- Specified by:
endsOnPropertySeparatorin interfaceParsedCommandLine
-
endsOnPropertyValueSeparator
public boolean endsOnPropertyValueSeparator()
- Specified by:
endsOnPropertyValueSeparatorin interfaceParsedCommandLine
-
endsOnPropertyListStart
public boolean endsOnPropertyListStart()
- Specified by:
endsOnPropertyListStartin interfaceParsedCommandLine
-
endsOnPropertyListEnd
public boolean endsOnPropertyListEnd()
- Specified by:
endsOnPropertyListEndin interfaceParsedCommandLine
-
endsOnNotOperator
public boolean endsOnNotOperator()
- Specified by:
endsOnNotOperatorin interfaceParsedCommandLine
-
endsOnHeaderListStart
public boolean endsOnHeaderListStart()
- Specified by:
endsOnHeaderListStartin interfaceParsedCommandLine
-
endsOnAddressOperationNameSeparator
public boolean endsOnAddressOperationNameSeparator()
- Specified by:
endsOnAddressOperationNameSeparatorin interfaceParsedCommandLine
-
endsOnNodeSeparator
public boolean endsOnNodeSeparator()
- Specified by:
endsOnNodeSeparatorin interfaceParsedCommandLine
-
endsOnNodeTypeNameSeparator
public boolean endsOnNodeTypeNameSeparator()
- Specified by:
endsOnNodeTypeNameSeparatorin interfaceParsedCommandLine
-
endsOnSeparator
public boolean endsOnSeparator()
- Specified by:
endsOnSeparatorin interfaceParsedCommandLine
-
hasAddress
public boolean hasAddress()
- Specified by:
hasAddressin interfaceParsedCommandLine
-
getAddress
public OperationRequestAddress getAddress()
- Specified by:
getAddressin interfaceParsedCommandLine
-
hasOperationName
public boolean hasOperationName()
- Specified by:
hasOperationNamein interfaceParsedCommandLine
-
getOperationName
public String getOperationName()
- Specified by:
getOperationNamein interfaceParsedCommandLine
-
hasProperties
public boolean hasProperties()
- Specified by:
hasPropertiesin interfaceParsedCommandLine
-
hasProperty
public boolean hasProperty(String propertyName)
- Specified by:
hasPropertyin interfaceParsedCommandLine
-
validatedNodeType
public void validatedNodeType(int index, String nodeType) throws OperationFormatException- Specified by:
validatedNodeTypein classValidatingCallbackHandler- Throws:
OperationFormatException
-
nodeTypeNameSeparator
public void nodeTypeNameSeparator(int index)
- Specified by:
nodeTypeNameSeparatorin interfaceCommandLineParser.CallbackHandler
-
validatedNodeName
public void validatedNodeName(int index, String nodeName) throws OperationFormatException- Specified by:
validatedNodeNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
nodeSeparator
public void nodeSeparator(int index)
- Specified by:
nodeSeparatorin interfaceCommandLineParser.CallbackHandler
-
addressOperationSeparator
public void addressOperationSeparator(int index) throws CommandFormatException- Specified by:
addressOperationSeparatorin interfaceCommandLineParser.CallbackHandler- Throws:
CommandFormatException
-
operationName
public void operationName(int index, String operationName) throws OperationFormatException- Specified by:
operationNamein interfaceCommandLineParser.CallbackHandler- Overrides:
operationNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
validatedOperationName
public void validatedOperationName(int index, String operationName) throws OperationFormatException- Specified by:
validatedOperationNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
propertyListStart
public void propertyListStart(int index)
- Specified by:
propertyListStartin interfaceCommandLineParser.CallbackHandler
-
propertyName
public void propertyName(int index, String propertyName) throws OperationFormatException- Specified by:
propertyNamein interfaceCommandLineParser.CallbackHandler- Overrides:
propertyNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
isLastPropertyNegated
public boolean isLastPropertyNegated()
- Specified by:
isLastPropertyNegatedin interfaceParsedCommandLine
-
propertyNoValue
public void propertyNoValue(int index, String name) throws CommandFormatException- Specified by:
propertyNoValuein interfaceCommandLineParser.CallbackHandler- Throws:
CommandFormatException
-
validatedPropertyName
protected void validatedPropertyName(int index, String propertyName) throws OperationFormatException- Specified by:
validatedPropertyNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
propertyNameValueSeparator
public void propertyNameValueSeparator(int index)
- Specified by:
propertyNameValueSeparatorin interfaceCommandLineParser.CallbackHandler
-
property
public void property(String name, String value, int nameValueSeparatorIndex) throws OperationFormatException
- Specified by:
propertyin interfaceCommandLineParser.CallbackHandler- Overrides:
propertyin classValidatingCallbackHandler- Throws:
OperationFormatException
-
validatedProperty
protected void validatedProperty(String name, String value, int nameValueSeparatorIndex) throws OperationFormatException
- Specified by:
validatedPropertyin classValidatingCallbackHandler- Throws:
OperationFormatException
-
propertySeparator
public void propertySeparator(int index)
- Specified by:
propertySeparatorin interfaceCommandLineParser.CallbackHandler
-
notOperator
public void notOperator(int index)
- Specified by:
notOperatorin interfaceCommandLineParser.CallbackHandler
-
propertyListEnd
public void propertyListEnd(int index)
- Specified by:
propertyListEndin interfaceCommandLineParser.CallbackHandler
-
headerListStart
public void headerListStart(int index)
- Specified by:
headerListStartin interfaceCommandLineParser.CallbackHandler
-
headerListEnd
public void headerListEnd(int index)
- Specified by:
headerListEndin interfaceCommandLineParser.CallbackHandler
-
headerSeparator
public void headerSeparator(int index)
- Specified by:
headerSeparatorin interfaceCommandLineParser.CallbackHandler
-
headerNameValueSeparator
public void headerNameValueSeparator(int index)
- Specified by:
headerNameValueSeparatorin interfaceCommandLineParser.CallbackHandler
-
headerName
public ParsingStateCallbackHandler headerName(int index, String headerName) throws CommandFormatException
- Specified by:
headerNamein interfaceCommandLineParser.CallbackHandler- Throws:
CommandFormatException
-
header
public void header(String name, String value, int valueIndex) throws CommandFormatException
- Specified by:
headerin interfaceCommandLineParser.CallbackHandler- Throws:
CommandFormatException
-
header
public void header(ParsedOperationRequestHeader header)
-
hasHeaders
public boolean hasHeaders()
- Specified by:
hasHeadersin interfaceParsedCommandLine
-
hasHeader
public boolean hasHeader(String name)
- Specified by:
hasHeaderin interfaceParsedCommandLine
-
getLastHeaderName
public String getLastHeaderName()
- Specified by:
getLastHeaderNamein interfaceParsedCommandLine
-
getHeaders
public Collection<ParsedOperationRequestHeader> getHeaders()
- Specified by:
getHeadersin interfaceParsedCommandLine
-
getLastHeader
public ParsedOperationRequestHeader getLastHeader()
- Specified by:
getLastHeaderin interfaceParsedCommandLine
-
rootNode
public void rootNode(int index) throws OperationFormatException- Specified by:
rootNodein interfaceCommandLineParser.CallbackHandler- Throws:
OperationFormatException
-
parentNode
public void parentNode(int index)
- Specified by:
parentNodein interfaceCommandLineParser.CallbackHandler
-
nodeType
public void nodeType(int index)
- Specified by:
nodeTypein interfaceCommandLineParser.CallbackHandler
-
nodeName
public void nodeName(int index, String nodeName) throws OperationFormatException- Specified by:
nodeNamein interfaceCommandLineParser.CallbackHandler- Overrides:
nodeNamein classValidatingCallbackHandler- Throws:
OperationFormatException
-
nodeType
public void nodeType(int index, String nodeType) throws OperationFormatException- Specified by:
nodeTypein interfaceCommandLineParser.CallbackHandler- Overrides:
nodeTypein classValidatingCallbackHandler- Throws:
OperationFormatException
-
nodeTypeOrName
public void nodeTypeOrName(int index, String typeOrName) throws OperationFormatException- Specified by:
nodeTypeOrNamein interfaceCommandLineParser.CallbackHandler- Throws:
OperationFormatException
-
getPropertyNames
public Set<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceParsedCommandLine
-
getPropertyValue
public String getPropertyValue(String name)
- Specified by:
getPropertyValuein interfaceParsedCommandLine
-
getLastSeparatorIndex
public int getLastSeparatorIndex()
- Specified by:
getLastSeparatorIndexin interfaceParsedCommandLine
-
getLastChunkIndex
public int getLastChunkIndex()
- Specified by:
getLastChunkIndexin interfaceParsedCommandLine
-
getLastChunkOriginalIndex
public int getLastChunkOriginalIndex()
- Specified by:
getLastChunkOriginalIndexin interfaceParsedCommandLine
-
getLastSeparatorOriginalIndex
public int getLastSeparatorOriginalIndex()
- Specified by:
getLastSeparatorOriginalIndexin interfaceParsedCommandLine
-
getOriginalOffset
public int getOriginalOffset(int offset)
- Specified by:
getOriginalOffsetin interfaceParsedCommandLine
-
outputTarget
public void outputTarget(int index, String outputTarget)- Specified by:
outputTargetin interfaceCommandLineParser.CallbackHandler
-
getOutputTarget
public String getOutputTarget()
- Specified by:
getOutputTargetin interfaceParsedCommandLine
-
operator
public void operator(int index)
- Specified by:
operatorin interfaceCommandLineParser.CallbackHandler
-
hasOperator
public boolean hasOperator()
- Specified by:
hasOperatorin interfaceParsedCommandLine
-
getLastParsedPropertyName
public String getLastParsedPropertyName()
- Specified by:
getLastParsedPropertyNamein interfaceParsedCommandLine
-
getLastParsedPropertyValue
public String getLastParsedPropertyValue()
- Specified by:
getLastParsedPropertyValuein interfaceParsedCommandLine
-
toOperationRequest
public org.jboss.dmr.ModelNode toOperationRequest(CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
setFormat
public void setFormat(CommandLineFormat format)
- Specified by:
setFormatin interfaceCommandLineParser.CallbackHandler
-
getFormat
public CommandLineFormat getFormat()
- Specified by:
getFormatin interfaceParsedCommandLine
-
endsOnHeaderSeparator
public boolean endsOnHeaderSeparator()
- Specified by:
endsOnHeaderSeparatorin interfaceParsedCommandLine
-
-