org.opengts.extra.service
Class ServiceMessage

java.lang.Object
  extended by org.opengts.extra.service.ServiceMessage

public class ServiceMessage
extends java.lang.Object


Field Summary
static ServiceMessage MSG_ACCOUNT_COMMAND
           
static ServiceMessage MSG_ACCOUNT_EXPIRED
           
static ServiceMessage MSG_ACCOUNT_HOST
           
static ServiceMessage MSG_ACCOUNT_INACTIVE
           
static ServiceMessage MSG_ACCOUNT_INVALID
           
static ServiceMessage MSG_ACCOUNT_SERVICE
           
static ServiceMessage MSG_ALREADY_EXISTS
           
static ServiceMessage MSG_AUTH_FAILED
           
static ServiceMessage MSG_BAD_RECORD
           
static ServiceMessage MSG_BAD_RECORD_KEY
           
static ServiceMessage MSG_BAD_TABLE
           
static ServiceMessage MSG_COMMAND_DISABLED
           
static ServiceMessage MSG_COMMAND_MISSING
           
static ServiceMessage MSG_COMMAND_NOTAUTH
           
static ServiceMessage MSG_COMMAND_UNSUPPORTED
           
static ServiceMessage MSG_CUSTOM_NOT_SUPPORTED
           
static ServiceMessage MSG_CUSTOM_TYPE_INVALID
           
static ServiceMessage MSG_DATETIME
           
static ServiceMessage MSG_DELETE_FAILED
           
static ServiceMessage MSG_DEVICE_INVALID
           
static ServiceMessage MSG_GROUP_INVALID
           
static ServiceMessage MSG_INSERT_FAILED
           
static ServiceMessage MSG_MAP_NOT_FOUND
           
static ServiceMessage MSG_NO_REPORT_SPECIFIED
           
static ServiceMessage MSG_NOT_FOUND
           
static ServiceMessage MSG_PRIVATE_XML_CONFIG
           
static ServiceMessage MSG_PRIVATE_XML_SYNTAX
           
static ServiceMessage MSG_PROP_BAD_KEY
           
static ServiceMessage MSG_READ_FAILED
           
static ServiceMessage MSG_REPORT_CREATE
           
static ServiceMessage MSG_REPORT_DEVICE
           
static ServiceMessage MSG_REPORT_GENERAL_ERROR
           
static ServiceMessage MSG_REPORT_INVALID_NAME
           
static ServiceMessage MSG_REPORT_NOT_FOUND
           
static ServiceMessage MSG_REPORT_UNEXPECTED
           
static ServiceMessage MSG_REQUEST_DISABLED
           
static ServiceMessage MSG_REQUEST_NOT_SUPPORTED
           
static ServiceMessage MSG_REQUEST_POST_REQUIRED
           
static ServiceMessage MSG_REQUEST_SOAP_XML_SYNTAX
           
static ServiceMessage MSG_REQUEST_XML_INVALID
           
static ServiceMessage MSG_REQUEST_XML_SYNTAX
           
static ServiceMessage MSG_SUCCESSFUL
           
static ServiceMessage MSG_UPDATE_FAILED
           
static ServiceMessage MSG_URL_NOT_ALLOWED
           
static ServiceMessage MSG_USER_INACTIVE
           
static ServiceMessage MSG_USER_INVALID
           
 
Constructor Summary
ServiceMessage(boolean isError, java.lang.String code, java.lang.String msg)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object other)
          Return true if the specified object is equal to this object
 java.lang.String getCode()
          Returns the message code
 java.lang.String getMessage()
          Gets the message description
 java.lang.String getMessage(java.lang.String text)
          Gets the message description
static ServiceMessage getMessageForCode(java.lang.String code)
          Gets the specific ServiceMessage for the specified code
static java.util.Map<java.lang.String,ServiceMessage> getMessageMap()
          Gets the MessageMap
 boolean isError()
          Returns true if this message indicates an error
 boolean isServiceDisabledError()
          Specific check for web-service disabled error
 java.lang.String toString()
          Returns a String representation of this Message
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_SUCCESSFUL

public static final ServiceMessage MSG_SUCCESSFUL

MSG_COMMAND_MISSING

public static final ServiceMessage MSG_COMMAND_MISSING

MSG_COMMAND_UNSUPPORTED

public static final ServiceMessage MSG_COMMAND_UNSUPPORTED

MSG_COMMAND_DISABLED

public static final ServiceMessage MSG_COMMAND_DISABLED

MSG_COMMAND_NOTAUTH

public static final ServiceMessage MSG_COMMAND_NOTAUTH

MSG_AUTH_FAILED

public static final ServiceMessage MSG_AUTH_FAILED

MSG_ACCOUNT_INVALID

public static final ServiceMessage MSG_ACCOUNT_INVALID

MSG_ACCOUNT_INACTIVE

public static final ServiceMessage MSG_ACCOUNT_INACTIVE

MSG_ACCOUNT_EXPIRED

public static final ServiceMessage MSG_ACCOUNT_EXPIRED

MSG_ACCOUNT_HOST

public static final ServiceMessage MSG_ACCOUNT_HOST

MSG_ACCOUNT_COMMAND

public static final ServiceMessage MSG_ACCOUNT_COMMAND

MSG_ACCOUNT_SERVICE

public static final ServiceMessage MSG_ACCOUNT_SERVICE

MSG_USER_INVALID

public static final ServiceMessage MSG_USER_INVALID

MSG_USER_INACTIVE

public static final ServiceMessage MSG_USER_INACTIVE

MSG_DEVICE_INVALID

public static final ServiceMessage MSG_DEVICE_INVALID

MSG_GROUP_INVALID

public static final ServiceMessage MSG_GROUP_INVALID

MSG_DATETIME

public static final ServiceMessage MSG_DATETIME

MSG_PRIVATE_XML_SYNTAX

public static final ServiceMessage MSG_PRIVATE_XML_SYNTAX

MSG_PRIVATE_XML_CONFIG

public static final ServiceMessage MSG_PRIVATE_XML_CONFIG

MSG_URL_NOT_ALLOWED

public static final ServiceMessage MSG_URL_NOT_ALLOWED

MSG_REQUEST_DISABLED

public static final ServiceMessage MSG_REQUEST_DISABLED

MSG_REQUEST_POST_REQUIRED

public static final ServiceMessage MSG_REQUEST_POST_REQUIRED

MSG_REQUEST_XML_SYNTAX

public static final ServiceMessage MSG_REQUEST_XML_SYNTAX

MSG_REQUEST_SOAP_XML_SYNTAX

public static final ServiceMessage MSG_REQUEST_SOAP_XML_SYNTAX

MSG_REQUEST_XML_INVALID

public static final ServiceMessage MSG_REQUEST_XML_INVALID

MSG_REQUEST_NOT_SUPPORTED

public static final ServiceMessage MSG_REQUEST_NOT_SUPPORTED

MSG_BAD_TABLE

public static final ServiceMessage MSG_BAD_TABLE

MSG_BAD_RECORD_KEY

public static final ServiceMessage MSG_BAD_RECORD_KEY

MSG_BAD_RECORD

public static final ServiceMessage MSG_BAD_RECORD

MSG_NOT_FOUND

public static final ServiceMessage MSG_NOT_FOUND

MSG_ALREADY_EXISTS

public static final ServiceMessage MSG_ALREADY_EXISTS

MSG_READ_FAILED

public static final ServiceMessage MSG_READ_FAILED

MSG_UPDATE_FAILED

public static final ServiceMessage MSG_UPDATE_FAILED

MSG_INSERT_FAILED

public static final ServiceMessage MSG_INSERT_FAILED

MSG_DELETE_FAILED

public static final ServiceMessage MSG_DELETE_FAILED

MSG_PROP_BAD_KEY

public static final ServiceMessage MSG_PROP_BAD_KEY

MSG_NO_REPORT_SPECIFIED

public static final ServiceMessage MSG_NO_REPORT_SPECIFIED

MSG_REPORT_NOT_FOUND

public static final ServiceMessage MSG_REPORT_NOT_FOUND

MSG_REPORT_INVALID_NAME

public static final ServiceMessage MSG_REPORT_INVALID_NAME

MSG_REPORT_DEVICE

public static final ServiceMessage MSG_REPORT_DEVICE

MSG_REPORT_CREATE

public static final ServiceMessage MSG_REPORT_CREATE

MSG_REPORT_GENERAL_ERROR

public static final ServiceMessage MSG_REPORT_GENERAL_ERROR

MSG_REPORT_UNEXPECTED

public static final ServiceMessage MSG_REPORT_UNEXPECTED

MSG_MAP_NOT_FOUND

public static final ServiceMessage MSG_MAP_NOT_FOUND

MSG_CUSTOM_NOT_SUPPORTED

public static final ServiceMessage MSG_CUSTOM_NOT_SUPPORTED

MSG_CUSTOM_TYPE_INVALID

public static final ServiceMessage MSG_CUSTOM_TYPE_INVALID
Constructor Detail

ServiceMessage

public ServiceMessage(boolean isError,
                      java.lang.String code,
                      java.lang.String msg)
Constructor

Method Detail

getMessageMap

public static java.util.Map<java.lang.String,ServiceMessage> getMessageMap()
Gets the MessageMap


getMessageForCode

public static ServiceMessage getMessageForCode(java.lang.String code)
Gets the specific ServiceMessage for the specified code


isError

public boolean isError()
Returns true if this message indicates an error


getCode

public java.lang.String getCode()
Returns the message code


getMessage

public java.lang.String getMessage()
Gets the message description


getMessage

public java.lang.String getMessage(java.lang.String text)
Gets the message description


isServiceDisabledError

public boolean isServiceDisabledError()
Specific check for web-service disabled error


toString

public java.lang.String toString()
Returns a String representation of this Message

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Return true if the specified object is equal to this object

Overrides:
equals in class java.lang.Object