| org.openharmonise.rm.resources.AbstractProfiledObject org.openharmonise.rm.tasks.Task
Task | public class Task extends AbstractProfiledObject implements Editable,Publishable(Code) | | Handles the running of scheduled tasks. The scheduling variables are based on
cron type settings. Values of -1 indicate that the variable isn't being used, if all
are -1 then it is a run once task.
author: Michael Bell version: $Revision: 1.2 $ |
Method Summary | |
protected void | addColumnsToPopulateQuery(SelectStatement select, boolean bIsHist) | protected void | addDataToSave(InsertStatement insert) | protected void | addToState(Element elOutput, State state) | protected State | buildState(Element elLink) Builds an State from the contents of a link. | public java.util.Date | calcNextRunTime() Method to calculate next run time for task. | public void | execute() Executes task. | public void | execute(State state) Executes task. | public String | getDBTableName() | public ColumnRef | getInstanceColumnRef(String columnRef, boolean bIsHist) Returns ColumnRef object given column ref id. | public JoinConditions | getInstanceJoinConditions(String sObjectTag, boolean bIsOuter) Implementation of abstract function, does nothing. | public static List | getPendingTasks(AbstractDataStoreInterface dbinterf) Queries the database and finds all of the Tasks whose due time is
before the present time. | public String | getTagName() | public boolean | isPending() | protected void | pipeResults(org.w3c.dom.Document xmlDoc, Task taskTarget) Uses an XML Document to provide the arguments to execute a Task. | public void | populate(Element xmlElement, State state) Method to instantiate task from XML element. | protected void | populateFromResultSetRow(ResultSet rs, SelectStatement select) | protected void | processXML(org.w3c.dom.Document xmlDoc, Templates xslStyle, PrintWriter outPut) | public org.w3c.dom.Element | publish(Template template, HarmoniseOutput xmlDoc, State state) Method to publish Task formatted by Form object. | public org.w3c.dom.Element | publish(Element topEl, HarmoniseOutput xmlDoc, State state) Method to publish Task formatted by XML. | protected void | saveNonCoreData() | protected List | searchForUsers() Uses the Profile of the Task to find Users to run this Task as. | public void | updateNextRuntime() Updates next run time field in database. |
CLMN_TASK_DAYOFMONTH | final public static String CLMN_TASK_DAYOFMONTH(Code) | | |
CLMN_TASK_DAYOFWEEK | final public static String CLMN_TASK_DAYOFWEEK(Code) | | |
CLMN_TASK_HOURS | final public static String CLMN_TASK_HOURS(Code) | | |
CLMN_TASK_LASTRUNTIME | final public static String CLMN_TASK_LASTRUNTIME(Code) | | |
CLMN_TASK_MINUTES | final public static String CLMN_TASK_MINUTES(Code) | | |
CLMN_TASK_NEXTRUNTIME | final public static String CLMN_TASK_NEXTRUNTIME(Code) | | |
CLMN_TASK_SCRIPT | final public static String CLMN_TASK_SCRIPT(Code) | | |
CLMN_TASK_SECONDS | final public static String CLMN_TASK_SECONDS(Code) | | |
CLMN_TASK_TARGET | final public static String CLMN_TASK_TARGET(Code) | | |
CLMN_TASK_TARGETTYPE | final public static String CLMN_TASK_TARGETTYPE(Code) | | |
EMAIL | final public static String EMAIL(Code) | | Constant used for target type email
|
FILE | final public static String FILE(Code) | | Constant used for target type file
|
FROM_ADDRESS | final public static String FROM_ADDRESS(Code) | | The from address used in the email target
|
NONE | final public static String NONE(Code) | | Constant used for tasks with no output
|
TAG_DAYOFMONTH | final public static String TAG_DAYOFMONTH(Code) | | |
TASK | final public static String TASK(Code) | | Constant used for target type task
|
TASK_SEQUENCE | final public static String TASK_SEQUENCE(Code) | | Name of the sequence for task
|
URI | final public static String URI(Code) | | Constant used for target type URI
|
Task | public Task()(Code) | | Default empty constructor.
|
Task | public Task(AbstractDataStoreInterface con, int nTaskId)(Code) | | Constructs Task object given task id.
Parameters: con - Interface to database Parameters: nTaskId - Id of task to create exception: Exception - |
addToState | protected void addToState(Element elOutput, State state)(Code) | | Extracts state XML from an Element
Parameters: elOutput - The element to extrate state XML from Parameters: state - The State object to add it to |
getInstanceColumnRef | public ColumnRef getInstanceColumnRef(String columnRef, boolean bIsHist) throws DataStoreException(Code) | | Returns ColumnRef object given column ref id.
Parameters: columnRef - Column ref id exception: Exception - ColumnRef object |
pipeResults | protected void pipeResults(org.w3c.dom.Document xmlDoc, Task taskTarget) throws TaskExecutionException(Code) | | Uses an XML Document to provide the arguments to execute a Task.
Parameters: xmlDoc - The XML Document containing the results of another Task Parameters: taskTarget - The Task to execute |
populate | public void populate(Element xmlElement, State state) throws PopulateException(Code) | | Method to instantiate task from XML element.
exception: Exception - General exception Parameters: xmlElement - root elemnt from which to create Task object instance |
searchForUsers | protected List searchForUsers() throws DataAccessException(Code) | | Uses the Profile of the Task to find Users to run this Task as.
An ArrayList of Users |
Methods inherited from org.openharmonise.rm.resources.AbstractProfiledObject | protected void addColumnsToPopulateQuery(SelectStatement select, boolean bIsHist) throws DataStoreException(Code)(Java Doc) public void addProfile(Profile profile) throws InvalidProfileException(Code)(Java Doc) public Editable changeStatus(Status status) throws EditException(Code)(Java Doc) public void clear()(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected void delete(boolean bDeleteHistory) throws DataStoreException, DataAccessException, EditException, PopulateException(Code)(Java Doc) protected void fillProfiles() throws PopulateException(Code)(Java Doc) protected void fullPopulate() throws PopulateException(Code)(Java Doc) public int getNumProfiles() throws DataAccessException(Code)(Java Doc) public Profile getProfile() throws DataAccessException(Code)(Java Doc) public Profile getProfile(String sName) throws DataAccessException(Code)(Java Doc) public List getProfiles() throws DataAccessException(Code)(Java Doc) public Map getProfilesMap() throws DataAccessException(Code)(Java Doc) public AbstractPropertyInstance getPropertyInstance(String sPropName) throws InvalidPropertyInstanceException, DataAccessException(Code)(Java Doc) public AbstractPropertyInstance getPropertyInstance(Property prop) throws InvalidPropertyInstanceException, DataAccessException(Code)(Java Doc) public void ignoreProfileRestrictions(boolean bIgnore)(Code)(Java Doc) public boolean isChanged() throws DataAccessException(Code)(Java Doc) public boolean isDefaultProfile(Profile prof)(Code)(Java Doc) protected boolean isProfileLoaded(String sName)(Code)(Java Doc) public void markAsNew() throws PopulateException(Code)(Java Doc) public void populate(Element xmlElement, State state) throws PopulateException(Code)(Java Doc) protected void populateFromResultSetRow(ResultSet rs, SelectStatement select) throws PopulateException(Code)(Java Doc) public List processResultSet(CachedResultSet rs, SelectStatement select)(Code)(Java Doc) public List processResultSet(CachedResultSet rs, SelectStatement select, int nLimit)(Code)(Java Doc) public Element publish(Element topEl, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)(Java Doc) public void removeProfile(String sProfile) throws DataAccessException(Code)(Java Doc) protected void saveCoreData() throws EditException(Code)(Java Doc) protected void setDefaultProfile(String sName) throws InvalidProfileException, DataAccessException(Code)(Java Doc) public void setHistorical(boolean bIsHistorical)(Code)(Java Doc) public void setProfile(Profile profile) throws InvalidProfileException(Code)(Java Doc) protected void setProfiles(List profiles) throws InvalidProfileException(Code)(Java Doc) protected void setProfiles(Map profiles)(Code)(Java Doc) protected void setProfilesHistorical(boolean bIsHistorical)(Code)(Java Doc) public String toString()(Code)(Java Doc) protected void update() throws DataStoreException, EditException(Code)(Java Doc)
|
|
|