com.novell.nds.dirxml.job
Interface Job


public interface Job

Entry-point interface for a job that is to be run by Identity Manager's DirXML Engine.

A job implementation must be packaged in a .jar file and the .jar file must be present on the Identity Manager server in order to be executed by the Identity Manager Job Scheduler.

The .jar file's manifest must have a section entry with the following form:

DirXMLJob: <implementation class name>

For example:

DirXMLJob: com.novell.nds.dirxml.job.trigger.Trigger

The implementation's definition XML files also appear in the .jar file and are name according to the class file name. For example, if the class file name is

com/novell/nds/dirxml/job/trigger/Trigger.class

then the definition and translation files are named as follows:

com/novell/nds/dirxml/job.trigger/Trigger.xml
com/novell/nds/dirxml/job.trigger/Trigger_en.xlf
com/novell/nds/dirxml/job.trigger/Trigger_fr.xlf
etc.

More than one implementation may appear in a single .jar file. When this is the case the implementation class names appear together in the DirXMLJob section separated by whitespace.


Method Summary
 JobResult[] checkConfig(JobManager manager, Locale msgLocale)
          Check this job's configuration on behalf of a user interface.
 JobResult[] execute(JobManager manager)
          Execute the job.
 

Method Detail

checkConfig

public JobResult[] checkConfig(JobManager manager,
                               Locale msgLocale)
Check this job's configuration on behalf of a user interface.

This method is intended to be used by a user interface via the DirXML Engine. This method should check all parameters for illegal or incoherent parameter values and anything else that might prevent the job from starting and running successfully (e.g., eDirectory rights). Anything found should be reported in the return.

Note that messages returned should be localized if possible. A useful class to help with the localization is found in com.novell.nds.dirxml.util.LocalizedMessageSource

This action is performed on behalf of a user; therefore lengthy operations (e.g., examination of all the in-scope objects) should be avoided.

Parameters:
manager - interface that supplies all of the the job parameters, scope, etc.
msgLocale - specifies the locale information to be used for any messages returned
Returns:
array of interfaces via which to get the result(s) of the configuration check. May be empty or null if no errors or warnings need to be reported.
See Also:
CheckParamResult, CheckPrivilegesResult

execute

public JobResult[] execute(JobManager manager)
Execute the job.

Parameters:
manager - interface that supplies all of the the job parameters, scope, etc.
Returns:
array of interfaces via which to get the result(s) of the job execution. May be empty or null.