com.cisco.provisioning.cpe
Interface CommandStatus

All Superinterfaces:
ProvAPIStatus

public interface CommandStatus
extends ProvAPIStatus

A CommandStatus object is contained by a BatchStatus object. A CommandStatus object contains a status code and error message (for failed batches) indicating whether the command succeeded (database reflects changes that were specified by the batch) or failed (database does not reflect any changes that were specified by the batch). It also contains any data that was returned by the command (such as a search). The CommandStatusCode interfaces specifies constants for various error conditions that can be returned from a command.


Field Summary
static int DATA_BYTE_ARRAY
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a byte array object.
static int DATA_LEASE_RESULTS
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a LeaseResults object.
static int DATA_LIST
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a List object.
static int DATA_MAP
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a Map object.
static int DATA_NULL
          Return value from CommandStatus.getDataTypeCode, command that the intended data returned is null data.
static int DATA_RECORD_SEARCH_RESULTS
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a RecordSearchResults object.
static int DATA_STRING
          Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a String object.
static int DATA_SYNC_LIST
          Strictly For Internal Use Return value from CommandStatus.getDataTypeCode, indicating that the command return type is SyncList object.
static int DATA_VOID
          Return value from CommandStatus.getDataTypeCode, indicating that the command does not return any data.
 
Method Summary
 boolean commandReturnsData()
          Returns true if the command intends to return no data or if it intends to return a null value.
 Object getData()
          Returns the data object for the associated command.
 int getDataTypeCode()
          Returns the data type code for this CommandStatus.
 
Methods inherited from interface com.cisco.provisioning.cpe.ProvAPIStatus
getBatchID, getErrorMessage, getStatusCode, getStatusType, isError, isSystemError
 

Field Detail

DATA_VOID

static final int DATA_VOID
Return value from CommandStatus.getDataTypeCode, indicating that the command does not return any data. This is distinct from a command which returns data, but is return value is null. In that case CommandStatus.DATA_NULL would be returned.

See Also:
Constant Field Values

DATA_NULL

static final int DATA_NULL
Return value from CommandStatus.getDataTypeCode, command that the intended data returned is null data. This is distinct from a command which does not return data. In that case CommandStatus.DATA_VOID would be returned.

See Also:
Constant Field Values

DATA_MAP

static final int DATA_MAP
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a Map object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
Map, Constant Field Values

DATA_LIST

static final int DATA_LIST
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a List object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
List, Constant Field Values

DATA_STRING

static final int DATA_STRING
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a String object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
String, Constant Field Values

DATA_BYTE_ARRAY

static final int DATA_BYTE_ARRAY
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a byte array object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
Constant Field Values

DATA_LEASE_RESULTS

static final int DATA_LEASE_RESULTS
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a LeaseResults object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
LeaseResults, Constant Field Values

DATA_RECORD_SEARCH_RESULTS

static final int DATA_RECORD_SEARCH_RESULTS
Return value from CommandStatus.getDataTypeCode, representing that the command intended to return a RecordSearchResults object.

Note: In many cases this value may be returned, but the actual data is null.

See Also:
RecordSearchResults, Constant Field Values

DATA_SYNC_LIST

static final int DATA_SYNC_LIST
Strictly For Internal Use Return value from CommandStatus.getDataTypeCode, indicating that the command return type is SyncList object.

See Also:
Constant Field Values
Method Detail

commandReturnsData

boolean commandReturnsData()
Returns true if the command intends to return no data or if it intends to return a null value.

Note: It is possible for a command to intend to return a List, Map, String, etc such as in a search, but if there are no results that statisfy the search, command can return a null value and a flag other than CommandStatus.DATA_NULL.

Returns:
true if the command returns data to the caller.

getDataTypeCode

int getDataTypeCode()
Returns the data type code for this CommandStatus.

Returns:
the data type code for this CommandStatus.

getData

Object getData()
Returns the data object for the associated command.

See descriptions of individual methods for details on the type and contents of the returned data for that command.

Returns:
the data for this CommandStatus. If the data type code is CommandStatus.DATA_VOID or CommandStatus.DATA_NULL then the returned value will be null.