com.vodafone360.people.datatypes
Class ServerError

java.lang.Object
  extended by com.vodafone360.people.datatypes.BaseDataType
      extended by com.vodafone360.people.datatypes.ServerError

public class ServerError
extends BaseDataType

BaseDataType representing an error returned from Server


Nested Class Summary
static class ServerError.ErrorTypes
          Enumeration of Server error types.
 
Field Summary
 java.lang.String errorType
           
 java.lang.String errorValue
           
static java.lang.String NAME
           
 
Constructor Summary
ServerError()
           
 
Method Summary
 ServerError.ErrorTypes getType()
          Get current Error type
 java.lang.String name()
          Return name of the current Data-type.
 ServiceStatus toServiceStatus()
          Convert current error to ServiceStatus type.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

errorType

public java.lang.String errorType

errorValue

public java.lang.String errorValue
Constructor Detail

ServerError

public ServerError()
Method Detail

name

public java.lang.String name()
Return name of the current Data-type.

Specified by:
name in class BaseDataType
Returns:
String containing name of the data-type.

getType

public ServerError.ErrorTypes getType()
Get current Error type

Returns:
CurrentErrorTpye, return UNKNOWN if current type is null.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

toServiceStatus

public ServiceStatus toServiceStatus()
Convert current error to ServiceStatus type.

Returns:
ServiceStatus type matching current error type, return ServiceStatus.ERROR_UNKNOWN if current type is null.


JavaDoc