org.apache.oozie.client.rest
Class JsonToBean

java.lang.Object
  extended by org.apache.oozie.client.rest.JsonToBean

public class JsonToBean
extends Object

JSON to bean converter for WorkflowAction, WorkflowJob, CoordinatorAction and CoordinatorJob.

It uses JDK dynamic proxy to create bean instances.


Constructor Summary
JsonToBean()
           
 
Method Summary
static List<BulkResponse> createBulkResponseList(org.json.simple.JSONArray json)
          Creates a list of bulk response beans from a JSON array.
static BundleJob createBundleJob(org.json.simple.JSONObject json)
          Creates a bundle job bean from a JSON object.
static List<BundleJob> createBundleJobList(org.json.simple.JSONArray json)
          Creates a list of bundle job beans from a JSON array.
static CoordinatorAction createCoordinatorAction(org.json.simple.JSONObject json)
          Creates a coordinator action bean from a JSON object.
static List<CoordinatorAction> createCoordinatorActionList(org.json.simple.JSONArray json)
          Creates a list of coordinator action beans from a JSON array.
static CoordinatorJob createCoordinatorJob(org.json.simple.JSONObject json)
          Creates a coordinator job bean from a JSON object.
static List<CoordinatorJob> createCoordinatorJobList(org.json.simple.JSONArray json)
          Creates a list of coordinator job beans from a JSON array.
static WorkflowAction createWorkflowAction(org.json.simple.JSONObject json)
          Creates a workflow action bean from a JSON object.
static List<WorkflowAction> createWorkflowActionList(org.json.simple.JSONArray json)
          Creates a list of workflow action beans from a JSON array.
static WorkflowJob createWorkflowJob(org.json.simple.JSONObject json)
          Creates a workflow job bean from a JSON object.
static List<WorkflowJob> createWorkflowJobList(org.json.simple.JSONArray json)
          Creates a list of workflow job beans from a JSON array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonToBean

public JsonToBean()
Method Detail

createWorkflowAction

public static WorkflowAction createWorkflowAction(org.json.simple.JSONObject json)
Creates a workflow action bean from a JSON object.

Parameters:
json - json object.
Returns:
a workflow action bean populated with the JSON object values.

createWorkflowActionList

public static List<WorkflowAction> createWorkflowActionList(org.json.simple.JSONArray json)
Creates a list of workflow action beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of workflow action beans from a JSON array.

createWorkflowJob

public static WorkflowJob createWorkflowJob(org.json.simple.JSONObject json)
Creates a workflow job bean from a JSON object.

Parameters:
json - json object.
Returns:
a workflow job bean populated with the JSON object values.

createWorkflowJobList

public static List<WorkflowJob> createWorkflowJobList(org.json.simple.JSONArray json)
Creates a list of workflow job beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of workflow job beans from a JSON array.

createCoordinatorAction

public static CoordinatorAction createCoordinatorAction(org.json.simple.JSONObject json)
Creates a coordinator action bean from a JSON object.

Parameters:
json - json object.
Returns:
a coordinator action bean populated with the JSON object values.

createCoordinatorActionList

public static List<CoordinatorAction> createCoordinatorActionList(org.json.simple.JSONArray json)
Creates a list of coordinator action beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of coordinator action beans from a JSON array.

createCoordinatorJob

public static CoordinatorJob createCoordinatorJob(org.json.simple.JSONObject json)
Creates a coordinator job bean from a JSON object.

Parameters:
json - json object.
Returns:
a coordinator job bean populated with the JSON object values.

createCoordinatorJobList

public static List<CoordinatorJob> createCoordinatorJobList(org.json.simple.JSONArray json)
Creates a list of coordinator job beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of coordinator job beans from a JSON array.

createBundleJob

public static BundleJob createBundleJob(org.json.simple.JSONObject json)
Creates a bundle job bean from a JSON object.

Parameters:
json - json object.
Returns:
a bundle job bean populated with the JSON object values.

createBundleJobList

public static List<BundleJob> createBundleJobList(org.json.simple.JSONArray json)
Creates a list of bundle job beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of bundle job beans from a JSON array.

createBulkResponseList

public static List<BulkResponse> createBulkResponseList(org.json.simple.JSONArray json)
Creates a list of bulk response beans from a JSON array.

Parameters:
json - json array.
Returns:
a list of bulk response beans from a JSON array.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.