public class TaskDefinition extends BaseOpenmrsMetadata
| Constructor and Description | 
|---|
| TaskDefinition()Default no-arg public constructor | 
| TaskDefinition(Integer id,
              String name,
              String description,
              String taskClass)Public constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object obj) | 
| Object | getCreatedBy()Deprecated. 
 | 
| Integer | getId()Get the task identifier. | 
| Date | getLastExecutionTime()Get the time the task was last executed. | 
| Date | getNextExecutionTime()Convenience method that asks SchedulerUtil for it's next execution time. | 
| Map<String,String> | getProperties()Get the data map used to provide the task with runtime data. | 
| String | getProperty(String key)Get task configuration property. | 
| 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. | 
| Boolean | getStarted()Gets the flag that indicates whether the task has been started. | 
| Boolean | getStartOnStartup()Gets the flag that indicates whether the task should startup as soon as the scheduler starts. | 
| Date | getStartTime()Get the start time for when the task should be executed. | 
| String | getStartTimePattern()Get the date format used to set the start time. | 
| 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. 
 | 
| void | setId(Integer id)Set the task identifier. | 
| void | setLastExecutionTime(Date lastExecutionTime)Set the time the task was last executed | 
| void | setProperties(Map<String,String> properties)Set the properties of the task. | 
| void | setProperty(String key,
           String value)Set task configuration property. | 
| void | setRepeatInterval(Long repeatInterval)Sets the number of seconds until task is executed again. | 
| void | setStarted(Boolean started)Sets the flag that indicates whether the task has been started. | 
| void | setStartOnStartup(Boolean startOnStartup)Sets the flag that indicates whether the task should startup as soon as the scheduler starts. | 
| void | setStartTime(Date startTime)Set the start time for when the task should be executed. | 
| void | setStartTimePattern(String pattern)Sets the date format used to set the start time. | 
| void | setTaskClass(String taskClass)Set the schedulable object to be executed. | 
| void | setTaskInstance(Task taskInstance)Sets the runnable task instance associated with this definition. | 
| String | toString() | 
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReasongetUuid, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic Integer getId()
Integer identifier of the taskpublic void setId(Integer id)
id - public Map<String,String> getProperties()
public void setProperties(Map<String,String> properties)
properties - Map of the properties to setpublic String getTaskClass()
public void setTaskClass(String taskClass)
taskClass - String taskClass of a schedulable objectpublic Date getStartTime()
public void setStartTime(Date startTime)
startTime - start time for the taskpublic Date getLastExecutionTime()
public void setLastExecutionTime(Date lastExecutionTime)
lastExecutionTime - last execution timepublic Long getRepeatInterval()
public void setRepeatInterval(Long repeatInterval)
repeatInterval - number of seconds, or 0 to indicate to repetitionpublic String getStartTimePattern()
public void setStartTimePattern(String pattern)
public Boolean getStartOnStartup()
public void setStartOnStartup(Boolean startOnStartup)
public Boolean getStarted()
public void setStarted(Boolean started)
public String getProperty(String key)
key - the String key of the property to getString value for the given keypublic void setProperty(String key, String value)
key - the String key of the property to setvalue - the String value of the property to setpublic Date getNextExecutionTime()
Date of the next executionpublic long getSecondsUntilNextExecutionTime()
public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()public Task getTaskInstance()
public void setTaskInstance(Task taskInstance)
taskInstance - public Object getCreatedBy()
BaseOpenmrsMetadata.getCreator()public void setCreatedBy(User authenticatedUser)
BaseOpenmrsMetadata.setCreator(User)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.