org.opencms.relations
Class CmsExternalLinksValidator

java.lang.Object
  extended by org.opencms.relations.CmsExternalLinksValidator
All Implemented Interfaces:
I_CmsScheduledJob

public class CmsExternalLinksValidator
extends java.lang.Object
implements I_CmsScheduledJob

Class to validate pointer links.

Since:
6.0.0
Version:
$Revision: 1.10 $
Author:
Jan Baudisch

Constructor Summary
CmsExternalLinksValidator()
           
 
Method Summary
static boolean checkUrl(CmsObject cms, java.lang.String check)
          Checks if the given url is valid.
 java.lang.String launch(CmsObject cms, java.util.Map parameters)
          This method is called by the cron scheduler.
 void setReport(I_CmsReport report)
          Sets the report for the output.
 void validateLinks(CmsObject cms)
          Validate all links.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsExternalLinksValidator

public CmsExternalLinksValidator()
Method Detail

checkUrl

public static boolean checkUrl(CmsObject cms,
                               java.lang.String check)
Checks if the given url is valid.

Parameters:
check - the url to check
cms - a OpenCms context object
Returns:
false if the url could not be accessed

launch

public java.lang.String launch(CmsObject cms,
                               java.util.Map parameters)
                        throws CmsException
This method is called by the cron scheduler.

Specified by:
launch in interface I_CmsScheduledJob
Parameters:
cms - a OpenCms context object
parameters - link check parameters
Returns:
the String that is written to the OpenCms log
Throws:
CmsException - if something goes wrong
See Also:
CmsScheduledJobInfo, CmsScheduledJobInfo.setReuseInstance(boolean)

setReport

public void setReport(I_CmsReport report)
Sets the report for the output.

Parameters:
report - the report for the output

validateLinks

public void validateLinks(CmsObject cms)
                   throws CmsException
Validate all links.

Parameters:
cms - a OpenCms context object
Throws:
CmsException - if something goes wrong