|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.BaseOpenmrsObject
org.openmrs.BaseOpenmrsMetadata
org.openmrs.scheduler.TaskDefinition
public class TaskDefinition
Represents the metadata for a task that can be scheduled.
| Constructor Summary | |
|---|---|
TaskDefinition()
Default no-arg public constructor |
|
TaskDefinition(java.lang.Integer id,
java.lang.String name,
java.lang.String description,
java.lang.String taskClass)
Public constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
getCreatedBy()
Deprecated. use BaseOpenmrsMetadata.getCreator() |
java.lang.Integer |
getId()
Get the task identifier. |
java.util.Date |
getLastExecutionTime()
Get the time the task was last executed. |
java.util.Date |
getNextExecutionTime()
Convenience method that asks SchedulerUtil for it's next execution time. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Get the data map used to provide the task with runtime data. |
java.lang.String |
getProperty(java.lang.String key)
Get task configuration property. |
java.lang.Long |
getRepeatInterval()
Gets the number of seconds until task is executed again. |
long |
getSecondsUntilNextExecutionTime()
Convenience method to calculate the seconds until the next execution time. |
java.lang.Boolean |
getStarted()
Gets the flag that indicates whether the task has been started. |
java.lang.Boolean |
getStartOnStartup()
Gets the flag that indicates whether the task should startup as soon as the scheduler starts. |
java.util.Date |
getStartTime()
Get the start time for when the task should be executed. |
java.lang.String |
getStartTimePattern()
Get the date format used to set the start time. |
java.lang.String |
getTaskClass()
Get the schedulable object to be executed. |
Task |
getTaskInstance()
Gets the runnable task instance associated with this definition. |
int |
hashCode()
|
void |
setCreatedBy(User authenticatedUser)
Deprecated. use BaseOpenmrsMetadata.setCreator(User) |
void |
setId(java.lang.Integer id)
Set the task identifier. |
void |
setLastExecutionTime(java.util.Date lastExecutionTime)
Set the time the task was last executed |
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Set the properties of the task. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Set task configuration property. |
void |
setRepeatInterval(java.lang.Long repeatInterval)
Sets the number of seconds until task is executed again. |
void |
setStarted(java.lang.Boolean started)
Sets the flag that indicates whether the task has been started. |
void |
setStartOnStartup(java.lang.Boolean startOnStartup)
Sets the flag that indicates whether the task should startup as soon as the scheduler starts. |
void |
setStartTime(java.util.Date startTime)
Set the start time for when the task should be executed. |
void |
setStartTimePattern(java.lang.String pattern)
Sets the date format used to set the start time. |
void |
setTaskClass(java.lang.String taskClass)
Set the schedulable object to be executed. |
void |
setTaskInstance(Task taskInstance)
Sets the runnable task instance associated with this definition. |
java.lang.String |
toString()
|
| Methods inherited from class org.openmrs.BaseOpenmrsMetadata |
|---|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason |
| Methods inherited from class org.openmrs.BaseOpenmrsObject |
|---|
getUuid, setUuid |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openmrs.OpenmrsObject |
|---|
getUuid, setUuid |
| Constructor Detail |
|---|
public TaskDefinition()
public TaskDefinition(java.lang.Integer id,
java.lang.String name,
java.lang.String description,
java.lang.String taskClass)
| Method Detail |
|---|
public java.lang.Integer getId()
Integer identifier of the taskpublic void setId(java.lang.Integer id)
id - public java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties - Map of the properties to setpublic java.lang.String getTaskClass()
public void setTaskClass(java.lang.String taskClass)
taskClass - String taskClass of a schedulable objectpublic java.util.Date getStartTime()
public void setStartTime(java.util.Date startTime)
startTime - start time for the taskpublic java.util.Date getLastExecutionTime()
public void setLastExecutionTime(java.util.Date lastExecutionTime)
lastExecutionTime - last execution timepublic java.lang.Long getRepeatInterval()
public void setRepeatInterval(java.lang.Long repeatInterval)
repeatInterval - number of seconds, or 0 to indicate to repetitionpublic java.lang.String getStartTimePattern()
public void setStartTimePattern(java.lang.String pattern)
public java.lang.Boolean getStartOnStartup()
public void setStartOnStartup(java.lang.Boolean startOnStartup)
public java.lang.Boolean getStarted()
public void setStarted(java.lang.Boolean started)
public java.lang.String getProperty(java.lang.String key)
key - the String key of the property to get
String value for the given key
public void setProperty(java.lang.String key,
java.lang.String value)
key - the String key of the property to setvalue - the String value of the property to setpublic java.util.Date getNextExecutionTime()
Date of the next executionpublic long getSecondsUntilNextExecutionTime()
public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public Task getTaskInstance()
public void setTaskInstance(Task taskInstance)
taskInstance - public java.lang.Object getCreatedBy()
BaseOpenmrsMetadata.getCreator()
public void setCreatedBy(User authenticatedUser)
BaseOpenmrsMetadata.setCreator(User)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||