public NodePathFormatter getNodePathFormatter() { return delegate.getNodePathFormatter(); }
@Override public NodePathFormatter getNodePathFormatter() { return wrapped.getNodePathFormatter(); }
@Override public NodePathFormatter getNodePathFormatter() { return wrapped.getNodePathFormatter(); }
public NodePathFormatter getNodePathFormatter() { return delegate.getNodePathFormatter(); }
@Override protected void doHandle(CommandContext ctx) { OperationRequestAddress prefix = ctx.getCurrentNodePath(); ctx.printLine(ctx.getNodePathFormatter().format(prefix)); } }
@Override protected void doHandle(CommandContext ctx) { OperationRequestAddress prefix = ctx.getCurrentNodePath(); ctx.printLine(ctx.getNodePathFormatter().format(prefix)); } }
private ModelNode getAddressNode(CommandContext ctx, OperationRequestAddress address, ModelNode op) throws CommandFormatException{ ModelNode addressNode = op.get(Util.ADDRESS); if (address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator = address.iterator(); while (iterator.hasNext()) { OperationRequestAddress.Node node = iterator.next(); if (node.getName() != null) { if (node.getName().equals("*")) { throw new CommandFormatException("* is not supported in node path argument"); } addressNode.add(node.getType(), node.getName()); } else if (iterator.hasNext()) { throw new OperationFormatException( "Expected a node name for type '" + node.getType() + "' in path '" + ctx.getNodePathFormatter().format( address) + "'"); } } } return op; } }
private ModelNode getAddressNode(CommandContext ctx, OperationRequestAddress address, ModelNode op) throws CommandFormatException{ ModelNode addressNode = op.get(Util.ADDRESS); if (address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator = address.iterator(); while (iterator.hasNext()) { OperationRequestAddress.Node node = iterator.next(); if (node.getName() != null) { if (node.getName().equals("*")) { throw new CommandFormatException("* is not supported in node path argument"); } addressNode.add(node.getType(), node.getName()); } else if (iterator.hasNext()) { throw new OperationFormatException( "Expected a node name for type '" + node.getType() + "' in path '" + ctx.getNodePathFormatter().format( address) + "'"); } } } return op; } }
throw new CommandFormatException("Type '" + typeName + "' not found among child types of '" + ctx.getNodePathFormatter().format(typeAddress) + "'");
throw new CommandFormatException("Type '" + typeName + "' not found among child types of '" + ctx.getNodePathFormatter().format(typeAddress) + "'");
@Override protected void doHandle(CommandContext ctx) throws CommandLineException { final String nodePath = this.nodePath.getValue(ctx.getParsedCommandLine()); OperationRequestAddress prefix = ctx.getCurrentNodePath(); if(nodePath == null) { ctx.printLine(ctx.getNodePathFormatter().format(prefix)); return; } final OperationRequestAddress tmp = new DefaultOperationRequestAddress(prefix); // We need to remove any option String np = LsHandler.getNodePath(ctx.getArgumentsString()); ctx.getCommandLineParser().parse(np, new DefaultCallbackHandler(tmp)); if(!noValidation.isPresent(ctx.getParsedCommandLine())) { assertValid(ctx, tmp); } if(tmp.isEmpty()) { prefix.reset(); } else { prefix.reset(); for(OperationRequestAddress.Node node : tmp) { if(node.getName() != null) { prefix.toNode(node.getType(), node.getName()); } else { prefix.toNodeType(node.getType()); } } } }
@Override protected void doHandle(CommandContext ctx) throws CommandLineException { final String nodePath = this.nodePath.getValue(ctx.getParsedCommandLine()); OperationRequestAddress prefix = ctx.getCurrentNodePath(); if(nodePath == null) { ctx.printLine(ctx.getNodePathFormatter().format(prefix)); return; } final OperationRequestAddress tmp = new DefaultOperationRequestAddress(prefix); // We need to remove any option String np = LsHandler.getNodePath(ctx.getArgumentsString()); ctx.getCommandLineParser().parse(np, new DefaultCallbackHandler(tmp)); if(!noValidation.isPresent(ctx.getParsedCommandLine())) { assertValid(ctx, tmp); } if(tmp.isEmpty()) { prefix.reset(); } else { prefix.reset(); for(OperationRequestAddress.Node node : tmp) { if(node.getName() != null) { prefix.toNode(node.getType(), node.getName()); } else { prefix.toNodeType(node.getType()); } } } }