HttpServletRequest request = ctx.getHttpServletRequest();
User user=null;
try {
user = uWebAPI.getLoggedInUser(request);
} catch (Exception exx) {
throw new WorkflowActionFailureException(exx.getMessage());
}
Contentlet con = processor.getContentlet();
List<InvalidLink> httpResponse=null;
try {
httpResponse = APILocator.getLinkCheckerAPI().findInvalidLinks(con);
} catch (Exception e1) {
Logger.error(this, e1.getMessage(), e1);
throw new WorkflowActionFailureException(e1.getMessage());
}
//if there are unreachable URL...
if(httpResponse.size()>0){
String msg="";
try {
msg = LanguageUtil.get(user, "checkURL.errorBrokenLinks");
} catch (Exception e) {
}
throw new WorkflowActionFailureException(LinkCheckerUtil.buildPopupMsgWithLinksList(msg, httpResponse));
}
}