com.smartgwt.client.types
Enum DSProtocol

java.lang.Object
  extended by java.lang.Enum<DSProtocol>
      extended by com.smartgwt.client.types.DSProtocol
All Implemented Interfaces:
ValueEnum, java.io.Serializable, java.lang.Comparable<DSProtocol>

public enum DSProtocol
extends java.lang.Enum<DSProtocol>
implements ValueEnum

dataProtocol affects how the data in the DSRequest (data is sent to the dataURL . Note that, when using the SmartGWT server, data is automatically translated from JavaScript to Java according to the rules described here; dataProtocol does not apply.


Enum Constant Summary
CLIENTCUSTOM
          This setting entirely bypasses the SmartGWT comm system.
GETPARAMS
          Data is added to the dataURL, with each property in the data becoming an HTTP parameter, eg http://service.com/search?keyword=foo
POSTMESSAGE
          dsRequest.data is assumed to be a String set up by DataSource.transformRequest(com.smartgwt.client.data.DSRequest) and is POST'd as the HTTP request body.
POSTPARAMS
          Data is POST'd to the dataURL, with each property becoming an HTTP parameter, exactly as an HTML form would submit them if it had one input field per property in the data.
POSTXML
          Data is serialized as XML via DataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject) and POST'd as the HTTP request body with contentType text/xml
SOAP
          Data is serialized as XML via DataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject) , wrapped in a SOAP envelope, and POST'd as the HTTP request body with contentType "text/xml".
 
Method Summary
 java.lang.String getValue()
           
static DSProtocol valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DSProtocol[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GETPARAMS

public static final DSProtocol GETPARAMS
Data is added to the dataURL, with each property in the data becoming an HTTP parameter, eg http://service.com/search?keyword=foo


POSTPARAMS

public static final DSProtocol POSTPARAMS
Data is POST'd to the dataURL, with each property becoming an HTTP parameter, exactly as an HTML form would submit them if it had one input field per property in the data.


POSTXML

public static final DSProtocol POSTXML
Data is serialized as XML via DataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject) and POST'd as the HTTP request body with contentType text/xml


CLIENTCUSTOM

public static final DSProtocol CLIENTCUSTOM
This setting entirely bypasses the SmartGWT comm system. Instead of the DataSource sending an HTTP request to the server, the developer is expected to implement DataSource.transformRequest() to perform their own custom data manipulation logic, and then call DataSource.processResponse() to handle the results of this action. The user must populate dsRequest.data in the transformRequest method. If call was successful status and data should be filled. If call was unsuccessful only status should contain error code.


SOAP

public static final DSProtocol SOAP
Data is serialized as XML via DataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject) , wrapped in a SOAP envelope, and POST'd as the HTTP request body with contentType "text/xml". Generally only used in connection with a 'WSDL web service'.


POSTMESSAGE

public static final DSProtocol POSTMESSAGE
dsRequest.data is assumed to be a String set up by DataSource.transformRequest(com.smartgwt.client.data.DSRequest) and is POST'd as the HTTP request body.

Method Detail

values

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

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

valueOf

public static DSProtocol 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

getValue

public java.lang.String getValue()
Specified by:
getValue in interface ValueEnum