public class LinkChecker extends ProcessorModule implements Runnable
The linkChecker module detects broken urls in the urls builder and the jumpers builder. If the linkchecker module is active it will at start up (5 minutes after the MMBase initialisation) and start perfoming checks.
So this wil only happen once every time time MMBase has been started. But since this class is a Runnable it can also be scheduled as a 'cronjob'.
For the LinckChecker to work the sendmail modules has to be configured and has to be active.
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunctionPARAM_PAGEINFO, PARAMS_PAGEINFOconfigurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIMEdescription, guiName, namefunctions, getFunctions| Constructor and Description |
|---|
LinkChecker() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkUrl(String url)
Checks if an url exists.
|
protected void |
checkUrls(String builderName,
String fieldName,
StringBuilder data)
Checks if the urls in a specified builder exist.
|
String |
getModuleInfo()
Provide some info on the module;
By default, this returns the module description for the default locale
|
void |
init()
Initializes the module.
|
void |
run() |
getList, getListBuilder, getNodeList, onload, process, reload, replace, replace, unloadaddInitParameters, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdown, shutdownModules, startModule, startModulesgetDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setNameaddFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstancepublic void init()
ProcessorModuleModule.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.init in class ProcessorModulepublic String getModuleInfo()
ModulegetModuleInfo in class Moduleprotected void checkUrls(String builderName, String fieldName, StringBuilder data)
builderName - the builder to checkfieldName - the fieldname of the url to checkdata - the StringBuilder to append error information toprotected boolean checkUrl(String url) throws MalformedURLException, IOException
url - the url to checkfalse if the url does not exist, true if the url existsMalformedURLExceptionIOExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}