@Test public void testDateNull() { result = parseDate.execute(null, "EEE, MMM d, ''yy", "en", "US", "yyyy-MM-dd", "fr", "FR"); assertEquals(FAILURE, result.get(RETURN_CODE)); assertFalse(result.get(RETURN_RESULT).isEmpty()); }
@Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date, @Param(value = DATE_FORMAT) String dateFormat, @Param(value = DATE_LOCALE_LANG) String dateLocaleLang, @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry, @Param(value = OUT_FORMAT) String outFormat, @Param(value = OUT_LOCALE_LANG) String outLocaleLang, @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry) { try { return OutputUtilities.getSuccessResultsMap( DateTimeService.parseDate(date, dateFormat, dateLocaleLang, dateLocaleCountry, outFormat, outLocaleLang, outLocaleCountry)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }
ParseDate { @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date, @Param(value = DATE_FORMAT) String dateFormat, @Param(value = DATE_LOCALE_LANG) String dateLocaleLang, @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry, @Param(value = OUT_FORMAT) String outFormat, @Param(value = OUT_LOCALE_LANG) String outLocaleLang, @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry) { try { return OutputUtilities.getSuccessResultsMap( DateTimeService.parseDate(date, dateFormat, dateLocaleLang, dateLocaleCountry, outFormat, outLocaleLang, outLocaleCountry)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } } }
ParseDate { @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date, @Param(value = DATE_FORMAT) String dateFormat, @Param(value = DATE_LOCALE_LANG) String dateLocaleLang, @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry, @Param(value = OUT_FORMAT) String outFormat, @Param(value = OUT_LOCALE_LANG) String outLocaleLang, @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry) { try { return OutputUtilities.getSuccessResultsMap( DateTimeService.parseDate(date, dateFormat, dateLocaleLang, dateLocaleCountry, outFormat, outLocaleLang, outLocaleCountry)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  }
ParseDate { @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date, @Param(value = DATE_FORMAT) String dateFormat, @Param(value = DATE_LOCALE_LANG) String dateLocaleLang, @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry, @Param(value = OUT_FORMAT) String outFormat, @Param(value = OUT_LOCALE_LANG) String outLocaleLang, @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry) { try { return OutputUtilities.getSuccessResultsMap( DateTimeService.parseDate(date, dateFormat, dateLocaleLang, dateLocaleCountry, outFormat, outLocaleLang, outLocaleCountry)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date,
                                       @Param(value = DATE_FORMAT) String dateFormat,
                                       @Param(value = DATE_LOCALE_LANG) String dateLocaleLang,
                                       @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry,
                                       @Param(value = OUT_FORMAT) String outFormat,
                                       @Param(value = OUT_LOCALE_LANG) String outLocaleLang,
                                       @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry); }
ParseDate { @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date, @Param(value = DATE_FORMAT) String dateFormat, @Param(value = DATE_LOCALE_LANG) String dateLocaleLang, @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry, @Param(value = OUT_FORMAT) String outFormat, @Param(value = OUT_LOCALE_LANG) String outLocaleLang, @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry) { try { return OutputUtilities.getSuccessResultsMap( DateTimeService.parseDate(date, dateFormat, dateLocaleLang, dateLocaleCountry, outFormat, outLocaleLang, outLocaleCountry)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  @Action(name = "Parse Date", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) Map<String, String> execute(@Param(value = LOCALE_DATE, required = true) String date,
                                       @Param(value = DATE_FORMAT) String dateFormat,
                                       @Param(value = DATE_LOCALE_LANG) String dateLocaleLang,
                                       @Param(value = DATE_LOCALE_COUNTRY) String dateLocaleCountry,
                                       @Param(value = OUT_FORMAT) String outFormat,
                                       @Param(value = OUT_LOCALE_LANG) String outLocaleLang,
                                       @Param(value = OUT_LOCALE_COUNTRY) String outLocaleCountry);  }