org.apache.oozie.client.rest
Class JsonWorkflowJob

java.lang.Object
  extended by org.apache.oozie.client.rest.JsonWorkflowJob
All Implemented Interfaces:
JsonBean, org.apache.oozie.client.WorkflowJob
Direct Known Subclasses:
WorkflowJobBean

@Entity
public class JsonWorkflowJob
extends Object
implements org.apache.oozie.client.WorkflowJob, JsonBean

Json Bean that represents an Oozie workflow job.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.oozie.client.WorkflowJob
org.apache.oozie.client.WorkflowJob.Status
 
Constructor Summary
JsonWorkflowJob()
           
 
Method Summary
 String getAcl()
           
 List<org.apache.oozie.client.WorkflowAction> getActions()
           
 String getAppName()
           
 String getAppPath()
           
 String getConf()
           
 String getConsoleUrl()
          Return the workflow job console URL.
 Date getCreatedTime()
           
 Date getEndTime()
           
 String getExternalId()
           
 String getGroup()
           
 String getId()
           
 Date getLastModifiedTime()
           
 String getParentId()
          Return the corresponding Action ID, if any.
 int getRun()
           
 Date getStartTime()
           
 org.apache.oozie.client.WorkflowJob.Status getStatus()
           
 String getUser()
           
 void setActions(List<? extends JsonWorkflowAction> nodes)
           
 void setAppName(String appName)
           
 void setAppPath(String appPath)
           
 void setConf(String conf)
           
 void setConsoleUrl(String consoleUrl)
          Set the workflow job console URL.
 void setCreatedTime(Date createdTime)
           
 void setEndTime(Date endTime)
           
 void setExternalId(String externalId)
           
 void setGroup(String group)
           
 void setId(String id)
           
 void setLastModifiedTime(Date lastModTime)
           
 void setParentId(String parentId)
          Set coordinator action id
 void setRun(int run)
           
 void setStartTime(Date startTime)
           
 void setStatus(org.apache.oozie.client.WorkflowJob.Status status)
           
 void setUser(String user)
           
static org.json.simple.JSONArray toJSONArray(List<? extends JsonWorkflowJob> workflows, String timeZoneId)
          Convert a workflows list into a JSONArray.
 org.json.simple.JSONObject toJSONObject()
          Return the JSONObject for the bean with GMT time zone.
 org.json.simple.JSONObject toJSONObject(String timeZoneId)
          Return the JSONObject for the bean with the given time zone.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonWorkflowJob

public JsonWorkflowJob()
Method Detail

toJSONObject

public org.json.simple.JSONObject toJSONObject()
Description copied from interface: JsonBean
Return the JSONObject for the bean with GMT time zone.

Specified by:
toJSONObject in interface JsonBean
Returns:
the JSONObject for the bean with GMT time zone.

toJSONObject

public org.json.simple.JSONObject toJSONObject(String timeZoneId)
Description copied from interface: JsonBean
Return the JSONObject for the bean with the given time zone.

Specified by:
toJSONObject in interface JsonBean
Parameters:
timeZoneId - the time zone to use
Returns:
the JSONObject for the bean with the given time zone.

getAppPath

public String getAppPath()
Specified by:
getAppPath in interface org.apache.oozie.client.WorkflowJob

setAppPath

public void setAppPath(String appPath)

getAppName

public String getAppName()
Specified by:
getAppName in interface org.apache.oozie.client.WorkflowJob

setAppName

public void setAppName(String appName)

getId

public String getId()
Specified by:
getId in interface org.apache.oozie.client.WorkflowJob

setId

public void setId(String id)

setExternalId

public void setExternalId(String externalId)

getExternalId

public String getExternalId()
Specified by:
getExternalId in interface org.apache.oozie.client.WorkflowJob

getConf

public String getConf()
Specified by:
getConf in interface org.apache.oozie.client.WorkflowJob

setConf

public void setConf(String conf)

getStatus

public org.apache.oozie.client.WorkflowJob.Status getStatus()
Specified by:
getStatus in interface org.apache.oozie.client.WorkflowJob

setStatus

public void setStatus(org.apache.oozie.client.WorkflowJob.Status status)

getLastModifiedTime

public Date getLastModifiedTime()
Specified by:
getLastModifiedTime in interface org.apache.oozie.client.WorkflowJob

setLastModifiedTime

public void setLastModifiedTime(Date lastModTime)

getCreatedTime

public Date getCreatedTime()
Specified by:
getCreatedTime in interface org.apache.oozie.client.WorkflowJob

setCreatedTime

public void setCreatedTime(Date createdTime)

getStartTime

public Date getStartTime()
Specified by:
getStartTime in interface org.apache.oozie.client.WorkflowJob

setStartTime

public void setStartTime(Date startTime)

getEndTime

public Date getEndTime()
Specified by:
getEndTime in interface org.apache.oozie.client.WorkflowJob

setEndTime

public void setEndTime(Date endTime)

getUser

public String getUser()
Specified by:
getUser in interface org.apache.oozie.client.WorkflowJob

setUser

public void setUser(String user)

getGroup

public String getGroup()
Specified by:
getGroup in interface org.apache.oozie.client.WorkflowJob

getAcl

public String getAcl()
Specified by:
getAcl in interface org.apache.oozie.client.WorkflowJob

setGroup

public void setGroup(String group)

getRun

public int getRun()
Specified by:
getRun in interface org.apache.oozie.client.WorkflowJob

setRun

public void setRun(int run)

getConsoleUrl

public String getConsoleUrl()
Return the workflow job console URL.

Specified by:
getConsoleUrl in interface org.apache.oozie.client.WorkflowJob
Returns:
the workflow job console URL.

getParentId

public String getParentId()
Return the corresponding Action ID, if any.

Specified by:
getParentId in interface org.apache.oozie.client.WorkflowJob
Returns:
the coordinator Action Id.

setParentId

public void setParentId(String parentId)
Set coordinator action id

Parameters:
parentId - : coordinator action id

setConsoleUrl

public void setConsoleUrl(String consoleUrl)
Set the workflow job console URL.

Parameters:
consoleUrl - the workflow job console URL.

getActions

public List<org.apache.oozie.client.WorkflowAction> getActions()
Specified by:
getActions in interface org.apache.oozie.client.WorkflowJob

setActions

public void setActions(List<? extends JsonWorkflowAction> nodes)

toString

public String toString()
Overrides:
toString in class Object

toJSONArray

public static org.json.simple.JSONArray toJSONArray(List<? extends JsonWorkflowJob> workflows,
                                                    String timeZoneId)
Convert a workflows list into a JSONArray.

Parameters:
workflows - workflows list.
timeZoneId - time zone to use for dates in the JSON array.
Returns:
the corresponding JSON array.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.