com.google.visualization.datasource.base
Enum ReasonType

java.lang.Object
  extended by java.lang.Enum<ReasonType>
      extended by com.google.visualization.datasource.base.ReasonType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ReasonType>

public enum ReasonType
extends java.lang.Enum<ReasonType>

Possible reasons for errors or warnings.

Author:
Hillel M.

Enum Constant Summary
ACCESS_DENIED
          The user has no access to the requested data.
DATA_TRUNCATED
          Not all data is retrieved.
ILLEGAL_FORMATTING_PATTERNS
          Illegal user given formatting patterns.
INTERNAL_ERROR
          An internal error occured.
INVALID_QUERY
          The query sent to the data source contains invalid data.
INVALID_REQUEST
          The request from the client is invalid.
NOT_MODIFIED
          The data hasn't been changed (signatures are the same).
NOT_SUPPORTED
          This operation is not supported.
OTHER
          Any other error that occured and prevented the data source from completing the action.
TIMEOUT
          The request has timed out.
UNSUPPORTED_QUERY_OPERATION
          The query sent to the data source contains an operation that the data source does not support.
USER_NOT_AUTHENTICATED
          The user cannot be authenticated.
 
Method Summary
 java.lang.String getMessageForReasonType()
          Returns a message for this reason type in the default locale.
 java.lang.String getMessageForReasonType(java.util.Locale locale)
          Returns a localized message for this reason type and locale.
 java.lang.String lowerCaseString()
          Returns a lower case string of this enum.
static ReasonType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ReasonType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ACCESS_DENIED

public static final ReasonType ACCESS_DENIED
The user has no access to the requested data.


USER_NOT_AUTHENTICATED

public static final ReasonType USER_NOT_AUTHENTICATED
The user cannot be authenticated. Used when the data requires authentication. Enable the data source to distinguish between 'no user' and 'user has no access' scenarios.


UNSUPPORTED_QUERY_OPERATION

public static final ReasonType UNSUPPORTED_QUERY_OPERATION
The query sent to the data source contains an operation that the data source does not support.


INVALID_QUERY

public static final ReasonType INVALID_QUERY
The query sent to the data source contains invalid data.


INVALID_REQUEST

public static final ReasonType INVALID_REQUEST
The request from the client is invalid.


INTERNAL_ERROR

public static final ReasonType INTERNAL_ERROR
An internal error occured.


NOT_SUPPORTED

public static final ReasonType NOT_SUPPORTED
This operation is not supported.


DATA_TRUNCATED

public static final ReasonType DATA_TRUNCATED
Not all data is retrieved.


NOT_MODIFIED

public static final ReasonType NOT_MODIFIED
The data hasn't been changed (signatures are the same).


TIMEOUT

public static final ReasonType TIMEOUT
The request has timed out. This is used only in the client, it is defined here for completeness.


ILLEGAL_FORMATTING_PATTERNS

public static final ReasonType ILLEGAL_FORMATTING_PATTERNS
Illegal user given formatting patterns.


OTHER

public static final ReasonType OTHER
Any other error that occured and prevented the data source from completing the action.

Method Detail

values

public static ReasonType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ReasonType c : ReasonType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ReasonType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getMessageForReasonType

public java.lang.String getMessageForReasonType(java.util.Locale locale)
Returns a localized message for this reason type and locale.

Parameters:
locale - The locale.
Returns:
A localized message given a reason type and locale.

getMessageForReasonType

public java.lang.String getMessageForReasonType()
Returns a message for this reason type in the default locale.

Returns:
A message message for this reason type in the default locale.

lowerCaseString

public java.lang.String lowerCaseString()
Returns a lower case string of this enum.

Returns:
a lower case string of this enum


Copyright © 2009 Google. All Rights Reserved.