public class TaskTO extends Object
Task.| Constructor and Description | 
|---|
TaskTO()
Empty constructor. 
 | 
TaskTO(Task task,
      boolean skipHandlerCreation)
Creates this TaskTO out of the given Task entity. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
TaskHandler | 
getHandler()  | 
Long | 
getId()  | 
Long | 
getInterval()  | 
Date | 
getLastExecution()  | 
Date | 
getNextExecution()  | 
Map<String,String> | 
getProperties()  | 
String | 
getProperty(String key)
Returns the value of a stored property. 
 | 
Date | 
getRescheduleDate()
Returns the reschedule date. 
 | 
TaskStatus | 
getStatus()  | 
String | 
getUniqueName()  | 
boolean | 
hasProperty(String key)
Returns whether the task has a specific property. 
 | 
boolean | 
isActive()  | 
void | 
setHandler(TaskHandler handler)  | 
void | 
setProperty(String key,
           String value)
Sets a property for the task. 
 | 
void | 
setRescheduleDate(Date rescheduleDate)  | 
String | 
toString() | 
public TaskTO()
public TaskTO(Task task, boolean skipHandlerCreation) throws ClassNotFoundException, InstantiationException, IllegalAccessException
task - The task.skipHandlerCreation - If true, the handler wouldn't be created through the constructor.ClassNotFoundException - Thrown, if there is no class for the given handler.IllegalAccessException - Thrown, if it was not possible to initialize the handler class.InstantiationException - Thrown, if it was not possible to initialize the handler class.public TaskHandler getHandler()
public Long getId()
public Long getInterval()
public Date getLastExecution()
public Date getNextExecution()
public Map<String,String> getProperties()
public String getProperty(String key)
key - the key of the propertypublic Date getRescheduleDate()
nullpublic TaskStatus getStatus()
public String getUniqueName()
public boolean hasProperty(String key)
key - the key of the property to check forpublic boolean isActive()
public void setHandler(TaskHandler handler)
handler - the handler to setpublic void setProperty(String key, String value)
key - the key of the propertyvalue - the value of the propertypublic void setRescheduleDate(Date rescheduleDate)
rescheduleDate - the rescheduleDate to setCopyright © 2019 Communote team. All rights reserved.