@Override public void setValue(Console console) { String value = console.readLine("%s", getPrompt().getText()); // $NON-NLS-1$ if ((value != null) && !StringUtils.EMPTY.equals(value)) { getHolder().setValue(value); } }
@Override public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { String dateFormat = "yyyy-MM-dd"; dateFormat = PropertiesUtil.getPropertyValue(WalkthroughPropertiesKeyConstants.WALKTHROUGH_DATE_FORMAT); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); String content = jsonParser.getText(); Date date = null; if (content != null && !StringUtils.EMPTY.equals(content)) { try { date = simpleDateFormat.parse(content); } catch (ParseException e) { e.printStackTrace(); throw new RuntimeException(e); } } return date; }