Item item = registry.getItemByPattern(itemName);
if(args.length>1) {
String stateName = args[1];
State state = TypeParser.parseState(item.getAcceptedDataTypes(), stateName);
if(state!=null) {
publisher.postUpdate(item.getName(), state);
console.println("Update has been sent successfully.");
} else {
console.println("Error: State '" + stateName +
"' is not valid for item '" + itemName + "'");
console.print("Valid data types are: ( ");