|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.schedule.ScheduleTask
public class ScheduleTask
ScheduleTask defines a scheduled task. Each task is consisted of one or more conditions, and one or more actions. The conditions are checked to see when and whehter a task will be started. When any condition is met, the task actions are executed in order. If a task is a repeated task, it will be rescheduled to run at the next cycle.
| Constructor Summary | |
|---|---|
ScheduleTask(String name)
Create a ScheduleTask. |
|
| Method Summary | |
|---|---|
void |
addAction(ScheduleAction action)
Add an action to the task. |
void |
addCondition(ScheduleCondition cond)
Add a condition to the task. |
void |
cancel()
Cancel the task. |
boolean |
check(long time)
A task is complete when any its conditions are met. |
Object |
clone()
Clone the object. |
void |
copyTo(ScheduleTask task)
Copy to another task. |
boolean |
equals(Object val)
Two tasks are equal if they have same names. |
ScheduleAction |
getAction(int idx)
Get the specified action. |
int |
getActionCount()
Get the number of actions. |
ScheduleCondition |
getCondition(int idx)
Get the specified condition. |
int |
getConditionCount()
Get the number of conditions. |
inetsoft.sree.internal.DataCycleManager.CycleInfo |
getCycleInfo()
Get the cycle info. |
Enumeration |
getDependency()
Get the dependency list. |
String |
getDescription()
Get the task description. |
Date |
getEndDate()
Get the stop date of this task. |
inetsoft.uql.util.Identity |
getIdentity()
Get the identity to run this task. |
String |
getLocale()
Get the locale used by this task. |
String |
getName()
Get the task name. |
String |
getOwner()
Get the owner name of this task. |
long |
getRetryTime(long time)
Get the time to run the task. |
Date |
getStartDate()
Get the start date of this task. |
String |
getUser()
Deprecated. |
boolean |
isDeleteIfNoMoreRun()
Check if the task should be deleted if not scheduled tom run again. |
boolean |
isEditable()
Check if this task is editable. |
boolean |
isEnabled()
Check if this task is currently enabled. |
boolean |
isRemovable()
Check if the task is removable. |
boolean |
isRunning()
Determines if this task is currently running. |
void |
removeAction(int idx)
Remove the specified action. |
void |
removeCondition(int idx)
Remove the specified condition from the task. |
void |
run(Principal principal)
Run the actions in this task. |
void |
setAction(int idx,
ScheduleAction action)
Set the specified action. |
void |
setComplete(String taskname,
boolean complete)
Set the complete condition status. |
void |
setCondition(int idx,
ScheduleCondition cond)
Set a condition. |
void |
setCycleInfo(inetsoft.sree.internal.DataCycleManager.CycleInfo cycleInfo)
Set the cycle info. |
void |
setDeleteIfNoMoreRun(boolean delNotRun)
Set the delete if not scheduled tom run again option. |
void |
setDescription(String description)
Set the task description. |
void |
setEditable(boolean editable)
Makes the task editable or uneditable. |
void |
setEnabled(boolean enabled)
Enables or disables this task. |
void |
setEndDate(Date endDate)
Set the stop date of this task. |
void |
setIdentity(inetsoft.uql.util.Identity identity)
Set the identity(user, group) to run this task. |
void |
setLocale(String locale)
Set the locale to be used by this task. |
void |
setName(String name)
Set the task name. |
void |
setOwner(String owner)
Set the owner of this task. |
void |
setRemovable(boolean removable)
Set the removable option. |
void |
setStartDate(Date startDate)
Set the start date of this task. |
void |
setUser(String user)
Deprecated. |
String |
toString()
Get the string representation. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScheduleTask(String name)
name - task name. It should be unique in each scheduler.| Method Detail |
|---|
public String getName()
public void setName(String name)
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - true to enable and false to disable.public boolean isEditable()
public void setEditable(boolean editable)
editable - true for editable and false for uneditable.public boolean isRemovable()
public void setRemovable(boolean removable)
public boolean isDeleteIfNoMoreRun()
public void setDeleteIfNoMoreRun(boolean delNotRun)
public boolean check(long time)
time - current time.
public long getRetryTime(long time)
time - current time.
public void addCondition(ScheduleCondition cond)
cond - The ScheduleCondition we are adding.public void addAction(ScheduleAction action)
public int getConditionCount()
public ScheduleCondition getCondition(int idx)
idx - condition index.
public void setCondition(int idx,
ScheduleCondition cond)
idx - condition index.cond - new condition.public void removeCondition(int idx)
public int getActionCount()
public ScheduleAction getAction(int idx)
idx - action index.
public void setAction(int idx,
ScheduleAction action)
idx - action index.action - new action.public void removeAction(int idx)
public void setComplete(String taskname,
boolean complete)
public Enumeration getDependency()
public boolean isRunning()
true if this task is running.
public void run(Principal principal)
throws Throwable
principal - represents an entity.
Throwablepublic String toString()
toString in class Objectpublic void setOwner(String owner)
public String getOwner()
public void setStartDate(Date startDate)
startDate - the start date of this task.public Date getStartDate()
public void setEndDate(Date endDate)
endDate - the stop date of this task.public Date getEndDate()
public String getLocale()
public void setLocale(String locale)
locale - to be used by this task.public String getUser()
public void setUser(String user)
user - the user to run this task.public inetsoft.uql.util.Identity getIdentity()
public void setIdentity(inetsoft.uql.util.Identity identity)
identity - the identity to run this task.public String getDescription()
public void setDescription(String description)
description - the description.public void setCycleInfo(inetsoft.sree.internal.DataCycleManager.CycleInfo cycleInfo)
public inetsoft.sree.internal.DataCycleManager.CycleInfo getCycleInfo()
public boolean equals(Object val)
equals in class Objectpublic Object clone()
clone in class Objectpublic void copyTo(ScheduleTask task)
public void cancel()
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||