Java Doc for Task.java in  » Content-Management-System » harmonise » org » openharmonise » rm » tasks » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » harmonise » org.openharmonise.rm.tasks 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
final public static  StringATTRIB_FORMID
    
final public static  StringCLMN_TASK_DAYOFMONTH
    
final public static  StringCLMN_TASK_DAYOFWEEK
    
final public static  StringCLMN_TASK_HOURS
    
final public static  StringCLMN_TASK_LASTRUNTIME
    
final public static  StringCLMN_TASK_MINUTES
    
final public static  StringCLMN_TASK_NEXTRUNTIME
    
final public static  StringCLMN_TASK_SCRIPT
    
final public static  StringCLMN_TASK_SECONDS
    
final public static  StringCLMN_TASK_TARGET
    
final public static  StringCLMN_TASK_TARGETTYPE
    
final public static  StringEMAIL
    
final public static  StringFILE
    
final public static  StringFROM_ADDRESS
    
final public static  StringNONE
    
final public static  StringTAG_DAYOFMONTH
    
final public static  StringTAG_DAYOFWEEK
    
final public static  StringTAG_HOURS
    
final public static  StringTAG_MINUTES
    
final public static  StringTAG_SECONDS
    
final public static  StringTAG_TARGET
    
final public static  StringTAG_TASK
    
final public static  StringTASK
    
final public static  StringTASK_SEQUENCE
    
final public static  StringTBL_TASK
    
final public static  StringURI
    

Constructor Summary
public  Task()
     Default empty constructor.
public  Task(AbstractDataStoreInterface con)
     Constructs new Task object.
public  Task(AbstractDataStoreInterface con, int nTaskId)
     Constructs Task object given task id.

Method Summary
protected  voidaddColumnsToPopulateQuery(SelectStatement select, boolean bIsHist)
    
protected  voidaddDataToSave(InsertStatement insert)
    
protected  voidaddToState(Element elOutput, State state)
    
protected  StatebuildState(Element elLink)
     Builds an State from the contents of a link.
public  java.util.DatecalcNextRunTime()
     Method to calculate next run time for task.
public  voidexecute()
     Executes task.
public  voidexecute(State state)
     Executes task.
public  StringgetDBTableName()
    
public  ColumnRefgetInstanceColumnRef(String columnRef, boolean bIsHist)
     Returns ColumnRef object given column ref id.
public  JoinConditionsgetInstanceJoinConditions(String sObjectTag, boolean bIsOuter)
     Implementation of abstract function, does nothing.
public static  ListgetPendingTasks(AbstractDataStoreInterface dbinterf)
     Queries the database and finds all of the Tasks whose due time is before the present time.
public  StringgetTagName()
    
public  booleanisPending()
    
protected  voidpipeResults(org.w3c.dom.Document xmlDoc, Task taskTarget)
     Uses an XML Document to provide the arguments to execute a Task.
public  voidpopulate(Element xmlElement, State state)
     Method to instantiate task from XML element.
protected  voidpopulateFromResultSetRow(ResultSet rs, SelectStatement select)
    
protected  voidprocessXML(org.w3c.dom.Document xmlDoc, Templates xslStyle, PrintWriter outPut)
    
public  org.w3c.dom.Elementpublish(Template template, HarmoniseOutput xmlDoc, State state)
     Method to publish Task formatted by Form object.
public  org.w3c.dom.Elementpublish(Element topEl, HarmoniseOutput xmlDoc, State state)
     Method to publish Task formatted by XML.
protected  voidsaveNonCoreData()
    
protected  ListsearchForUsers()
     Uses the Profile of the Task to find Users to run this Task as.
public  voidupdateNextRuntime()
     Updates next run time field in database.

Field Detail
ATTRIB_FORMID
final public static String ATTRIB_FORMID(Code)



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)



TAG_DAYOFWEEK
final public static String TAG_DAYOFWEEK(Code)



TAG_HOURS
final public static String TAG_HOURS(Code)



TAG_MINUTES
final public static String TAG_MINUTES(Code)



TAG_SECONDS
final public static String TAG_SECONDS(Code)



TAG_TARGET
final public static String TAG_TARGET(Code)



TAG_TASK
final public static String TAG_TASK(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



TBL_TASK
final public static String TBL_TASK(Code)



URI
final public static String URI(Code)
Constant used for target type URI




Constructor Detail
Task
public Task()(Code)
Default empty constructor.



Task
public Task(AbstractDataStoreInterface con)(Code)
Constructs new Task object.
Parameters:
  con - Interface to database
exception:
  IOException -
exception:
  SQLException -



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 -




Method Detail
addColumnsToPopulateQuery
protected void addColumnsToPopulateQuery(SelectStatement select, boolean bIsHist) throws DataStoreException(Code)



addDataToSave
protected void addDataToSave(InsertStatement insert) throws DataStoreException(Code)



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



buildState
protected State buildState(Element elLink) throws StateException, ParserConfigurationException, FactoryConfigurationError(Code)
Builds an State from the contents of a link.
Parameters:
  elLink - The link XML The resultant State object.



calcNextRunTime
public java.util.Date calcNextRunTime() throws PopulateException(Code)
Method to calculate next run time for task.
exception:
  Exception - General exception Date for task to be next run



execute
public void execute() throws TaskExecutionException(Code)
Executes task.
throws:
  Exception -



execute
public void execute(State state) throws TaskExecutionException(Code)
Executes task.
Parameters:
  state - The state to use to run the Task
exception:
  Exception -



getDBTableName
public String getDBTableName()(Code)



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



getInstanceJoinConditions
public JoinConditions getInstanceJoinConditions(String sObjectTag, boolean bIsOuter) throws DataStoreException(Code)
Implementation of abstract function, does nothing.
Parameters:
  sObjectTag -
Parameters:
  bIsOuter -
throws:
  Exception -



getPendingTasks
public static List getPendingTasks(AbstractDataStoreInterface dbinterf) throws DataAccessException(Code)
Queries the database and finds all of the Tasks whose due time is before the present time.
Parameters:
  dbinterf - Interface to database
exception:
  Exception - Vector of pending tasks



getTagName
public String getTagName()(Code)



isPending
public boolean isPending() throws DataAccessException(Code)



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



populateFromResultSetRow
protected void populateFromResultSetRow(ResultSet rs, SelectStatement select) throws PopulateException(Code)



processXML
protected void processXML(org.w3c.dom.Document xmlDoc, Templates xslStyle, PrintWriter outPut) throws java.lang.Exception, org.xml.sax.SAXException(Code)



publish
public org.w3c.dom.Element publish(Template template, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)
Method to publish Task formatted by Form object.
exception:
  Exception - General exception
Parameters:
  form - Form to publish object with
Parameters:
  xmlDoc - XML Document to publish to XML output



publish
public org.w3c.dom.Element publish(Element topEl, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)
Method to publish Task formatted by XML.
Parameters:
  topEl - XML to publish object with
Parameters:
  xmlDoc - XML Document to publish to
exception:
  Exception - General exception XML output



saveNonCoreData
protected void saveNonCoreData() throws EditException(Code)



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



updateNextRuntime
public void updateNextRuntime() throws EditException(Code)
Updates next run time field in database.
exception:
  Exception -



Fields inherited from org.openharmonise.rm.resources.AbstractProfiledObject
final public static String DEFAULT_PROFILE_NAME(Code)(Java Doc)
protected Map m_profiles(Code)(Java Doc)
protected List m_profiles2Remove(Code)(Java Doc)
protected String m_sDefaultKey(Code)(Java Doc)

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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.