org.apache.oozie.client.rest
Class JsonCoordinatorAction

java.lang.Object
  extended by org.apache.oozie.client.rest.JsonCoordinatorAction
All Implemented Interfaces:
CoordinatorAction, JsonBean
Direct Known Subclasses:
CoordinatorActionBean

public class JsonCoordinatorAction
extends Object
implements CoordinatorAction, JsonBean


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.oozie.client.CoordinatorAction
CoordinatorAction.Status
 
Constructor Summary
JsonCoordinatorAction()
           
JsonCoordinatorAction(org.json.simple.JSONObject jsonObject)
           
 
Method Summary
 boolean equals(Object obj)
           
static List<JsonCoordinatorAction> fromJSONArray(org.json.simple.JSONArray array)
          Convert a JSONArray into a nodes list.
 int getActionNumber()
          Return the action number
 String getActionXml()
           
 String getConsoleUrl()
          Return the URL to the web console of the system executing the application instance.
 String getCreatedConf()
          Return the application instance ?? created configuration.
 Date getCreatedTime()
          Return the creation time for the application instance
 String getErrorCode()
          Return the error code of the application instance, if it ended in ERROR.
 String getErrorMessage()
          Return the error message of the application instance, if it ended in ERROR.
 String getExternalId()
           
 String getExternalStatus()
          Return the external status of the application instance.
 String getId()
          Return the application instance ID.
 String getJobId()
          Return the coordinator job ID.
 Date getLastModifiedTime()
          Return the last modified time
 String getMissingDependencies()
          Return the missing dependencies for the particular action
 Date getNominalTime()
          Return the nominal time for the application instance
 String getRunConf()
          Return the run-time configuration
 CoordinatorAction.Status getStatus()
          Return the current status of the application instance.
 int getTimeOut()
           
 String getTrackerUri()
          Return the URL to programmatically track the status of the application instance.
 String getType()
           
 int hashCode()
           
 void setActionNumber(int actionNumber)
           
 void setActionXml(String actionXml)
           
 void setConsoleUrl(String consoleUrl)
           
 void setCreatedConf(String createdConf)
           
 void setCreatedTime(Date createdTime)
           
 void setErrorCode(String errorCode)
           
 void setErrorInfo(String errorCode, String errorMessage)
           
 void setErrorMessage(String errorMessage)
           
 void setExternalId(String extId)
           
 void setExternalStatus(String externalStatus)
           
 void setId(String id)
           
 void setJobId(String id)
           
 void setLastModifiedTime(Date lastModifiedTime)
           
 void setMissingDependencies(String missingDependencies)
           
 void setNominalTime(Date nominalTime)
           
 void setRunConf(String runConf)
           
 void setStatus(CoordinatorAction.Status status)
           
 void setTimeOut(int timeOut)
           
 void setTrackerUri(String trackerUri)
           
 void setType(String type)
           
static org.json.simple.JSONArray toJSONArray(List<? extends JsonCoordinatorAction> actions)
          Convert a nodes list into a JSONArray.
 org.json.simple.JSONObject toJSONObject()
          Return the JSONObject for the bean.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonCoordinatorAction

public JsonCoordinatorAction()

JsonCoordinatorAction

public JsonCoordinatorAction(org.json.simple.JSONObject jsonObject)
Method Detail

toJSONObject

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

Specified by:
toJSONObject in interface JsonBean
Returns:
the JSONObject for the bean.

getId

public String getId()
Description copied from interface: CoordinatorAction
Return the application instance ID.

Specified by:
getId in interface CoordinatorAction
Returns:
the application instance ID.

setId

public void setId(String id)

getJobId

public String getJobId()
Description copied from interface: CoordinatorAction
Return the coordinator job ID.

Specified by:
getJobId in interface CoordinatorAction
Returns:
the coordinator job ID.

setJobId

public void setJobId(String id)

getType

public String getType()

setType

public void setType(String type)

getExternalId

public String getExternalId()
Specified by:
getExternalId in interface CoordinatorAction

setExternalId

public void setExternalId(String extId)

setActionNumber

public void setActionNumber(int actionNumber)

getActionNumber

public int getActionNumber()
Description copied from interface: CoordinatorAction
Return the action number

Specified by:
getActionNumber in interface CoordinatorAction
Returns:
the action number

getCreatedConf

public String getCreatedConf()
Description copied from interface: CoordinatorAction
Return the application instance ?? created configuration.

Specified by:
getCreatedConf in interface CoordinatorAction
Returns:
the application instance configuration.

setCreatedConf

public void setCreatedConf(String createdConf)

setCreatedTime

public void setCreatedTime(Date createdTime)

getCreatedTime

public Date getCreatedTime()
Description copied from interface: CoordinatorAction
Return the creation time for the application instance

Specified by:
getCreatedTime in interface CoordinatorAction
Returns:
the creation time for the application instance

getStatus

public CoordinatorAction.Status getStatus()
Description copied from interface: CoordinatorAction
Return the current status of the application instance.

Specified by:
getStatus in interface CoordinatorAction
Returns:
the current status of the application instance.

setStatus

public void setStatus(CoordinatorAction.Status status)

setLastModifiedTime

public void setLastModifiedTime(Date lastModifiedTime)

getLastModifiedTime

public Date getLastModifiedTime()
Description copied from interface: CoordinatorAction
Return the last modified time

Specified by:
getLastModifiedTime in interface CoordinatorAction
Returns:
the last modified time

setRunConf

public void setRunConf(String runConf)

getRunConf

public String getRunConf()
Description copied from interface: CoordinatorAction
Return the run-time configuration

Specified by:
getRunConf in interface CoordinatorAction
Returns:
the run-time configuration

setMissingDependencies

public void setMissingDependencies(String missingDependencies)

getMissingDependencies

public String getMissingDependencies()
Description copied from interface: CoordinatorAction
Return the missing dependencies for the particular action

Specified by:
getMissingDependencies in interface CoordinatorAction
Returns:
the missing dependencies for the particular action

getExternalStatus

public String getExternalStatus()
Description copied from interface: CoordinatorAction
Return the external status of the application instance.

Specified by:
getExternalStatus in interface CoordinatorAction
Returns:
the external status of the application instance.

setExternalStatus

public void setExternalStatus(String externalStatus)

getTrackerUri

public String getTrackerUri()
Description copied from interface: CoordinatorAction
Return the URL to programmatically track the status of the application instance.

Specified by:
getTrackerUri in interface CoordinatorAction
Returns:
the URL to programmatically track the status of the application instance.

setTrackerUri

public void setTrackerUri(String trackerUri)

getConsoleUrl

public String getConsoleUrl()
Description copied from interface: CoordinatorAction
Return the URL to the web console of the system executing the application instance.

Specified by:
getConsoleUrl in interface CoordinatorAction
Returns:
the URL to the web console of the system executing the application instance.

setConsoleUrl

public void setConsoleUrl(String consoleUrl)

getErrorCode

public String getErrorCode()
Description copied from interface: CoordinatorAction
Return the error code of the application instance, if it ended in ERROR.

Specified by:
getErrorCode in interface CoordinatorAction
Returns:
the error code of the application instance.

getErrorMessage

public String getErrorMessage()
Description copied from interface: CoordinatorAction
Return the error message of the application instance, if it ended in ERROR.

Specified by:
getErrorMessage in interface CoordinatorAction
Returns:
the error message of the application instance.

setErrorInfo

public void setErrorInfo(String errorCode,
                         String errorMessage)

getActionXml

public String getActionXml()

setActionXml

public void setActionXml(String actionXml)

toString

public String toString()
Overrides:
toString in class Object

getNominalTime

public Date getNominalTime()
Description copied from interface: CoordinatorAction
Return the nominal time for the application instance

Specified by:
getNominalTime in interface CoordinatorAction
Returns:
the nominal time for the application instance

setNominalTime

public void setNominalTime(Date nominalTime)

getTimeOut

public int getTimeOut()

setTimeOut

public void setTimeOut(int timeOut)

setErrorCode

public void setErrorCode(String errorCode)
Specified by:
setErrorCode in interface CoordinatorAction

setErrorMessage

public void setErrorMessage(String errorMessage)
Specified by:
setErrorMessage in interface CoordinatorAction

toJSONArray

public static org.json.simple.JSONArray toJSONArray(List<? extends JsonCoordinatorAction> actions)
Convert a nodes list into a JSONArray.

Parameters:
nodes - nodes list.
Returns:
the corresponding JSON array.

fromJSONArray

public static List<JsonCoordinatorAction> fromJSONArray(org.json.simple.JSONArray array)
Convert a JSONArray into a nodes list.

Parameters:
array - JSON array.
Returns:
the corresponding nodes list.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011 Yahoo. All Rights Reserved.