Package org.opencms.relations
Class CmsExternalLinksValidator
- java.lang.Object
-
- 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
-
-
Constructor Summary
Constructors Constructor Description CmsExternalLinksValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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<java.lang.String,java.lang.String> 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.
-
-
-
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 checkcms
- a OpenCms context object- Returns:
- false if the url could not be accessed
-
launch
public java.lang.String launch(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> parameters) throws CmsException
This method is called by the cron scheduler.- Specified by:
launch
in interfaceI_CmsScheduledJob
- Parameters:
cms
- a OpenCms context objectparameters
- 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
-
-