org.apache.oozie.client.rest
Class BulkResponseImpl

java.lang.Object
  extended by org.apache.oozie.client.rest.BulkResponseImpl
All Implemented Interfaces:
org.apache.oozie.client.BulkResponse, JsonBean

public class BulkResponseImpl
extends Object
implements org.apache.oozie.client.BulkResponse, JsonBean

Server-side implementation class of the client interface BulkResponse Declares all the bulk request specific user parameters and handling as JSON object


Field Summary
static String BULK_DATE_FORMAT
           
static String BULK_FILTER_BUNDLE_NAME
           
static String BULK_FILTER_COORD_NAME
           
static String BULK_FILTER_END_CREATED_EPOCH
           
static String BULK_FILTER_END_NOMINAL_EPOCH
           
static String BULK_FILTER_LEVEL
           
static Set<String> BULK_FILTER_NAMES
           
static String BULK_FILTER_START_CREATED_EPOCH
           
static String BULK_FILTER_START_NOMINAL_EPOCH
           
static String BULK_FILTER_STATUS
           
 
Constructor Summary
BulkResponseImpl()
           
 
Method Summary
 CoordinatorActionBean getAction()
           
 BundleJobBean getBundle()
           
 CoordinatorJobBean getCoordinator()
           
 void setAction(CoordinatorActionBean ca)
          Sets the coord action comprising this bulk response object
 void setBundle(BundleJobBean bj)
          Sets the bundle comprising this bulk response object
 void setCoordinator(CoordinatorJobBean cj)
          Sets the coordinator comprising this bulk response object
static org.json.simple.JSONArray toJSONArray(List<? extends BulkResponseImpl> responses, String timeZoneId)
          Convert a nodes list into a JSONArray.
 org.json.simple.JSONObject toJSONObject()
          Construct JSON object using the bulk request object and the associated tags
 org.json.simple.JSONObject toJSONObject(String timeZoneId)
          Construct JSON object using the bulk request object and the associated tags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BULK_FILTER_BUNDLE_NAME

public static final String BULK_FILTER_BUNDLE_NAME
See Also:
Constant Field Values

BULK_FILTER_COORD_NAME

public static final String BULK_FILTER_COORD_NAME
See Also:
Constant Field Values

BULK_FILTER_LEVEL

public static final String BULK_FILTER_LEVEL
See Also:
Constant Field Values

BULK_FILTER_STATUS

public static final String BULK_FILTER_STATUS
See Also:
Constant Field Values

BULK_FILTER_START_CREATED_EPOCH

public static final String BULK_FILTER_START_CREATED_EPOCH
See Also:
Constant Field Values

BULK_FILTER_END_CREATED_EPOCH

public static final String BULK_FILTER_END_CREATED_EPOCH
See Also:
Constant Field Values

BULK_FILTER_START_NOMINAL_EPOCH

public static final String BULK_FILTER_START_NOMINAL_EPOCH
See Also:
Constant Field Values

BULK_FILTER_END_NOMINAL_EPOCH

public static final String BULK_FILTER_END_NOMINAL_EPOCH
See Also:
Constant Field Values

BULK_DATE_FORMAT

public static final String BULK_DATE_FORMAT
See Also:
Constant Field Values

BULK_FILTER_NAMES

public static final Set<String> BULK_FILTER_NAMES
Constructor Detail

BulkResponseImpl

public BulkResponseImpl()
Method Detail

toJSONObject

public org.json.simple.JSONObject toJSONObject()
Construct JSON object using the bulk request object and the associated tags

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)
Construct JSON object using the bulk request object and the associated tags

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

getBundle

public BundleJobBean getBundle()
Specified by:
getBundle in interface org.apache.oozie.client.BulkResponse

getCoordinator

public CoordinatorJobBean getCoordinator()
Specified by:
getCoordinator in interface org.apache.oozie.client.BulkResponse

getAction

public CoordinatorActionBean getAction()
Specified by:
getAction in interface org.apache.oozie.client.BulkResponse

setBundle

public void setBundle(BundleJobBean bj)
Sets the bundle comprising this bulk response object

Parameters:
BundleJobBean -

setCoordinator

public void setCoordinator(CoordinatorJobBean cj)
Sets the coordinator comprising this bulk response object

Parameters:
CoordinatorJobBean -

setAction

public void setAction(CoordinatorActionBean ca)
Sets the coord action comprising this bulk response object

Parameters:
CoordinatorActionBean -

toJSONArray

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

Parameters:
actions - nodes 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.