Class CmsInternalRelationsValidationJob
- java.lang.Object
-
- org.opencms.relations.CmsInternalRelationsValidationJob
-
- All Implemented Interfaces:
I_CmsScheduledJob
public class CmsInternalRelationsValidationJob extends java.lang.Object implements I_CmsScheduledJob
A schedulable OpenCms job to validate internal relations.This job will validate all link parseable resources of the context project.
Parameters used by this job (all optional):
email
parameter, should be a comma separated list of email addresses, if empty the email address of the context user will be user instead.from
parameter, should be the "from" field of the email to send, a valid email address, if empty the default will be used.subject
parameter, should be the subject of the sent email, if empty a default subject text will be used, a good practice is to use the same job name as subject.- Since:
- 6.5.0
- See Also:
I_CmsLinkParseable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PARAM_EMAIL
The email parameter name.static java.lang.String
PARAM_FROM
The from parameter name.static java.lang.String
PARAM_SUBJECT
The subject parameter name.
-
Constructor Summary
Constructors Constructor Description CmsInternalRelationsValidationJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
launch(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> parameters)
This method will be called when this scheduled job is executed.
-
-
-
Field Detail
-
PARAM_EMAIL
public static final java.lang.String PARAM_EMAIL
The email parameter name.- See Also:
- Constant Field Values
-
PARAM_SUBJECT
public static final java.lang.String PARAM_SUBJECT
The subject parameter name.- See Also:
- Constant Field Values
-
PARAM_FROM
public static final java.lang.String PARAM_FROM
The from parameter name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsInternalRelationsValidationJob
public CmsInternalRelationsValidationJob()
-
-
Method Detail
-
launch
public java.lang.String launch(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> parameters) throws java.lang.Exception
Description copied from interface:I_CmsScheduledJob
This method will be called when this scheduled job is executed.Depending on the configuration of this job, a new instance of the configured class will be instantiated every time the job is launched, or a new instance will be generated only the first time the job is launched, and re-used afterwards.
The result String will be written to the OpenCms logfile in the
org.opencms.scheduler.CmsScheduleManager
channel, onINFO
log level.- Specified by:
launch
in interfaceI_CmsScheduledJob
- Parameters:
cms
- will be initialized with the configured users cms contextparameters
- the configured parameters- Returns:
- a String that will be written to the OpenCms logfile
- Throws:
java.lang.Exception
- if something goes wrong- See Also:
I_CmsScheduledJob.launch(CmsObject, Map)
-
-