/** * The run method which starts the import process.<p> */ @Override public void run() { try { // do the validation m_externLinkValidator.validateLinks(m_cms); } catch (Throwable e) { getReport().println(e); if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage()); } } } }
/** * Constructor, creates a new CmsExternLinkValidationThread.<p> * * @param cms the current CmsObject */ public CmsExternalLinksValidatorThread(CmsObject cms) { super(cms, Messages.get().getBundle().key(Messages.GUI_POINTER_VALIDATION_THREAD_NAME_0)); initHtmlReport(cms.getRequestContext().getLocale()); m_cms = cms; m_cms.getRequestContext().setUpdateSessionEnabled(false); m_externLinkValidator = new CmsExternalLinksValidator(); m_externLinkValidator.setReport(getReport()); }
if (!checkUrl(cms, linkUrl)) { brokenLinks.put(link.getRootPath(), linkUrl); m_report.println(Messages.get().container(Messages.RPT_BROKEN_0), I_CmsReport.FORMAT_ERROR);
/** * Constructor, creates a new CmsExternLinkValidationThread.<p> * * @param cms the current CmsObject */ public CmsExternalLinksValidatorThread(CmsObject cms) { super(cms, Messages.get().getBundle().key(Messages.GUI_POINTER_VALIDATION_THREAD_NAME_0)); initHtmlReport(cms.getRequestContext().getLocale()); m_cms = cms; m_cms.getRequestContext().setUpdateSessionEnabled(false); m_externLinkValidator = new CmsExternalLinksValidator(); m_externLinkValidator.setReport(getReport()); }
if (!checkUrl(cms, linkUrl)) { brokenLinks.put(link.getRootPath(), linkUrl); m_report.println(Messages.get().container(Messages.RPT_BROKEN_0), I_CmsReport.FORMAT_ERROR);
/** * The run method which starts the import process.<p> */ @Override public void run() { try { // do the validation m_externLinkValidator.validateLinks(m_cms); } catch (Throwable e) { getReport().println(e); if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage()); } } } }
/** * This method is called by the cron scheduler.<p> * * @param cms a OpenCms context object * @param parameters link check parameters * @return the String that is written to the OpenCms log * @throws CmsException if something goes wrong */ public String launch(CmsObject cms, Map<String, String> parameters) throws CmsException { if (Boolean.valueOf(parameters.get("writeLog")).booleanValue()) { m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class); } validateLinks(cms); return "CmsExternLinkValidator.launch(): Links checked."; }
/** * This method is called by the cron scheduler.<p> * * @param cms a OpenCms context object * @param parameters link check parameters * @return the String that is written to the OpenCms log * @throws CmsException if something goes wrong */ public String launch(CmsObject cms, Map parameters) throws CmsException { if (Boolean.valueOf((String)parameters.get("writeLog")).booleanValue()) { m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class); } validateLinks(cms); return "CmsExternLinkValidator.launch(): Links checked."; }