com.cisco.provisioning.cpe
Class ProvisioningException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.cisco.provisioning.cpe.BaseException
              extended by com.cisco.provisioning.cpe.ProvisioningException
All Implemented Interfaces:
ProvAPIStatus, Serializable
Direct Known Subclasses:
ProvTimeoutException

public class ProvisioningException
extends BaseException
implements ProvAPIStatus

This exception may be thrown as a result of calling Batch.post and signals that there was an error while attempting send the batch to the RDU for processing. Note: This is different than a batch that had an error while being processed. This exception is thrown when the batch could not be processed by or could not be sent to the RDU.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serialization version UID constant for this class
 
Constructor Summary
ProvisioningException(String batchID)
          Constructor for an exception related to the specified batchID with no text message.
ProvisioningException(String batchID, Exception nestedException)
          Constructor for an exception related to the specified batchID that contains a nested exception.
ProvisioningException(String batchID, Exception nestedException, String message)
          Constructor for an exception related to the specified batchID that contains a text message and a nested exception.
ProvisioningException(String batchID, String message)
          Constructor for an exception related to the specified batchID that contains a text message.
 
Method Summary
 String getBatchID()
          Gets the batch ID associated with this exception
 String getErrorMessage()
          Returns the error message explaining the error encountered.
 BatchStatusCode getStatusCode()
          Gets the status code for the results
 ProvStatusType getStatusType()
          Returns the type of interface the implementing object represents.
 boolean isError()
          Determines whether the status code indicates an error condition
 boolean isSystemError()
          Determines whether the status code indicates a system-level error.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serialization version UID constant for this class

See Also:
Constant Field Values
Constructor Detail

ProvisioningException

public ProvisioningException(String batchID)
Constructor for an exception related to the specified batchID with no text message.

Parameters:
batchID - the batchID this exception is related to

ProvisioningException

public ProvisioningException(String batchID,
                             Exception nestedException)
Constructor for an exception related to the specified batchID that contains a nested exception.

The message for this exception will be the result of toString() of the nestedException (as long as its not null).

Parameters:
batchID - the batchID this exception is related to
nestedException - The exception this exception is explaining in more detail.

ProvisioningException

public ProvisioningException(String batchID,
                             String message)
Constructor for an exception related to the specified batchID that contains a text message.

Parameters:
batchID - the batchID this exception is related to
message - the message to associate with this exception.

ProvisioningException

public ProvisioningException(String batchID,
                             Exception nestedException,
                             String message)
Constructor for an exception related to the specified batchID that contains a text message and a nested exception.

Parameters:
batchID - the batchID this exception is related to
nestedException - the exception this exception is explaining in more detail.

message - the message to associate with this exception.
Method Detail

getStatusType

public ProvStatusType getStatusType()
Returns the type of interface the implementing object represents.

Specified by:
getStatusType in interface ProvAPIStatus
Returns:
the type of interface the implementing object represents.

getStatusCode

public BatchStatusCode getStatusCode()
Gets the status code for the results

Specified by:
getStatusCode in interface ProvAPIStatus
Returns:
status code for the results

isError

public boolean isError()
Determines whether the status code indicates an error condition

Specified by:
isError in interface ProvAPIStatus
Returns:
true if status code indicates an error. Otherwise false is returned.

isSystemError

public boolean isSystemError()
Determines whether the status code indicates a system-level error. Note: Currently this will always returns false

Specified by:
isSystemError in interface ProvAPIStatus
Returns:
Always returns false.

getErrorMessage

public String getErrorMessage()
Returns the error message explaining the error encountered.

Specified by:
getErrorMessage in interface ProvAPIStatus
Returns:
Detailed description of the problem encountered.

getBatchID

public String getBatchID()
Gets the batch ID associated with this exception

Specified by:
getBatchID in interface ProvAPIStatus
Returns:
the batch ID associated with this exception