it.eng.spagobi.tools.scheduler.bo
Class Job

java.lang.Object
  extended by it.eng.spagobi.tools.scheduler.bo.Job

public class Job
extends java.lang.Object

Conveys the detail properties of a given Job instance. Jobs have a name and group associated with them, which should uniquely identify them.

Author:
Andrea Gioia (andrea.gioia@eng.it)

Constructor Summary
Job()
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
           
 void addParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDescription()
          Return the description given to the Job instance by its creator (if any).
 java.lang.String getGroupName()
           
 java.lang.Class getJobClass()
          Get the instance of the actual class that contains the business logic of the job and that will be executed by the scheduler
 java.lang.String getName()
           
 java.util.Map<java.lang.String,java.lang.String> getParameters()
           
 int hashCode()
           
 boolean isDurable()
          Whether or not the Job should remain stored after it is orphaned (no Triggers point to it).
 boolean isRequestsRecovery()
          Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.
 boolean isVolatile()
          Whether or not the Job should not be persisted for re-use after program restarts.
 void setDescription(java.lang.String description)
          Set a description for the Job instance - may be useful for remembering/displaying the purpose of the job, though the description has no meaning for the scheduler.
 void setDurable(boolean durable)
          Instructs the Scheduler whether or not the Job should remain stored after it is orphaned (no Triggers point to it).
 void setGroupName(java.lang.String groupName)
           
 void setJobClass(java.lang.Class jobClass)
           
 void setName(java.lang.String name)
           
 void setRequestsRecovery(boolean requestsRecovery)
          Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.
 void setVolatile(boolean _volatile)
          Instructs the Scheduler whether or not the Job should not be persisted for re-use after program restarts.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Job

public Job()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getGroupName

public java.lang.String getGroupName()

setGroupName

public void setGroupName(java.lang.String groupName)

getDescription

public java.lang.String getDescription()
Return the description given to the Job instance by its creator (if any).

Returns:
null if no description was set

setDescription

public void setDescription(java.lang.String description)
Set a description for the Job instance - may be useful for remembering/displaying the purpose of the job, though the description has no meaning for the scheduler.

Parameters:
description - a description of the job purpose

getJobClass

public java.lang.Class getJobClass()
Get the instance of the actual class that contains the business logic of the job and that will be executed by the scheduler

Returns:
the class that will be executed by the scheduler

setJobClass

public void setJobClass(java.lang.Class jobClass)

isDurable

public boolean isDurable()
Whether or not the Job should remain stored after it is orphaned (no Triggers point to it). If not explicitly set, the default value is false.

Returns:
true if the Job should remain persisted after being orphaned.

setDurable

public void setDurable(boolean durable)
Instructs the Scheduler whether or not the Job should remain stored after it is orphaned (no Triggers point to it).


isRequestsRecovery

public boolean isRequestsRecovery()
Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered. If not explicitly set, the default value is false.

Returns:
true if the Job should be re-executed after 'recovery' or 'fail-over' situation

setRequestsRecovery

public void setRequestsRecovery(boolean requestsRecovery)
Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.

Parameters:
requestsRecovery - true if the Job should be re-executed after 'recovery' or 'fail-over' situation. False otherwise

isVolatile

public boolean isVolatile()
Whether or not the Job should not be persisted for re-use after program restarts. If not explicitly set, the default value is false.

Returns:
true if the Job should be garbage collected along with the SpagoBI Server webapp.

setVolatile

public void setVolatile(boolean _volatile)
Instructs the Scheduler whether or not the Job should not be persisted for re-use after program restarts.


addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)

addParameters

public void addParameters(java.util.Map<java.lang.String,java.lang.String> parameters)

getParameters

public java.util.Map<java.lang.String,java.lang.String> getParameters()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object