public void parseTextEntry(final String entryText) {
object = parse(entryText);
Localization localization = IsisContext.getLocalization();
final String reason = parameter.isValid(object, AdapterUtils.unwrap(object), localization);
if (reason != null) {
throw new InvalidEntryException(reason);
} else if (!parameter.isOptional() && object == null) {
throw new InvalidEntryException("Mandatory parameter cannot be empty");
}
invocation.setParameter(index, object);
}