Package com.logicaldoc.core.task
Class TaskScheduling
- java.lang.Object
-
- com.logicaldoc.core.task.TaskScheduling
-
public class TaskScheduling extends Object
Scheduling configuration for a Task- Since:
- 3.5.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description TaskScheduling(String taskName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCronExpression()
String
getDayOfMonth()
String
getDayOfWeek()
long
getDelay()
long
getDelaySeconds()
String
getHours()
long
getInterval()
long
getIntervalSeconds()
long
getMaxLength()
The maximum duration expressed in secondsString
getMinutes()
String
getMode()
String
getMonth()
Date
getNextFireTime()
Date
getPreviousFireTime()
String
getSeconds()
String
getTaskName()
boolean
isEnabled()
void
load()
Loads scheduling configurations from persistent storagevoid
save()
Saves scheduling configurations in the persistent storagevoid
setCronExpression(String cronExpression)
void
setDayOfMonth(String dayOfMonth)
void
setDayOfWeek(String dayOfWeek)
void
setDelay(long delay)
void
setDelaySeconds(long delay)
void
setEnabled(boolean enabled)
void
setHours(String hours)
void
setInterval(long interval)
void
setIntervalSeconds(long interval)
void
setMaxLength(long maxLength)
void
setMinutes(String minutes)
void
setMode(String mode)
void
setMonth(String month)
void
setPreviousFireTime(Date previousFireTime)
void
setSeconds(String seconds)
String
toString()
-
-
-
Constructor Detail
-
TaskScheduling
public TaskScheduling(String taskName)
-
-
Method Detail
-
getTaskName
public String getTaskName()
-
getSeconds
public String getSeconds()
-
setSeconds
public void setSeconds(String seconds)
-
getMinutes
public String getMinutes()
-
getPreviousFireTime
public Date getPreviousFireTime()
-
setPreviousFireTime
public void setPreviousFireTime(Date previousFireTime)
-
setMinutes
public void setMinutes(String minutes)
-
getHours
public String getHours()
-
setHours
public void setHours(String hours)
-
getDayOfMonth
public String getDayOfMonth()
-
setDayOfMonth
public void setDayOfMonth(String dayOfMonth)
-
getDayOfWeek
public String getDayOfWeek()
-
setDayOfWeek
public void setDayOfWeek(String dayOfWeek)
-
getMonth
public String getMonth()
-
setMonth
public void setMonth(String month)
-
getMaxLength
public long getMaxLength()
The maximum duration expressed in seconds- Returns:
- the maximpum duration in seconds
-
setMaxLength
public void setMaxLength(long maxLength)
-
getNextFireTime
public Date getNextFireTime()
-
getCronExpression
public String getCronExpression()
-
setCronExpression
public void setCronExpression(String cronExpression) throws ParseException
- Throws:
ParseException
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
load
public void load() throws IOException, ParseException
Loads scheduling configurations from persistent storage- Throws:
IOException
- error reading the configuration fileParseException
- error parsing the scheduling expression
-
save
public void save() throws IOException, ParseException
Saves scheduling configurations in the persistent storage- Throws:
IOException
- raised is an I/O problem occursParseException
- raised if the scheduling expression is invalid
-
getMode
public String getMode()
-
setMode
public void setMode(String mode)
-
getDelay
public long getDelay()
-
getDelaySeconds
public long getDelaySeconds()
-
setDelay
public void setDelay(long delay)
-
setDelaySeconds
public void setDelaySeconds(long delay)
-
getInterval
public long getInterval()
-
getIntervalSeconds
public long getIntervalSeconds()
-
setInterval
public void setInterval(long interval)
-
setIntervalSeconds
public void setIntervalSeconds(long interval)
-
-