com.sage.swt.client.sdata
Interface ServiceOperation

All Superinterfaces:
BindableDataProvider, HasBindableDataChangedHandlers, HasBindableDataChangingHandlers, com.google.gwt.event.shared.HasHandlers
All Known Implementing Classes:
DefaultServiceOperation, DefaultServiceOperationProxy

public interface ServiceOperation
extends BindableDataProvider

Interface for a service operation, whose request and response properties (conceptually input and output fields) can be bound to widgets just like datasource properties.


Field Summary
static java.lang.String ACTION_CANCEL
          "Cancel" action
static java.lang.String ACTION_GET_DEFAULTS
          "GetDefaults" action
static java.lang.String ACTION_INVOKE
          "Invoke" action
static java.lang.String PROPERTY_REQUEST
          "Request" property (for inputs)
static java.lang.String PROPERTY_RESPONSE
          "Response" property (for outputs)
static java.lang.String STATUS
           
static java.lang.String SUCCESS
           
 
Fields inherited from interface com.sage.swt.client.sdata.BindableDataProvider
PROPERTY_NAME_SEGMENT_ESCAPE_SEPARATOR, PROPERTY_NAME_SEGMENT_SEPARATOR, PROPERTY_NAME_SEGMENT_SPLITTER
 
Method Summary
 void cancel(ServiceOperationCallback callback, java.lang.String trackingURL)
           Cancel the request for a service.
 void getDefaults(ServiceOperationCallback callback)
           Retrieve the default request values for a service.
 java.lang.Object getPropertyValue(java.lang.String... propertySegments)
           Gets the value of the specified property in the current entity of this bindable data provider.
 TypeInfo getRequestTypeInfo()
          Gets the type information for the "request" property (which is a compound property containing inputs for the service operation).
 TypeInfo getResponseTypeInfo()
          Gets the type information for the "response" property (which is a compound property containing outputs for the service operation).
 void invoke(ProgressType progressType, ServiceInvocationPreferredMode preferredMode, ServiceOperationCallback callback)
          Invokes the service operation with the values of the request (input) properties and with the specified progress type and preferred invocation mode.
 void invoke(ProgressType progressType, ServiceOperationCallback callback)
           Invokes the service operation with the values of the request (input) properties, and with a preferred invocation mode of ASYNC and with the progress type for the progress handler.
 void invoke(ServiceInvocationPreferredMode preferredMode, ServiceOperationCallback callback)
          Invokes the service operation with the values of the request (input) properties and with the specified preferred invocation mode and with the default progress handler.
 void invoke(ServiceInvocationPreferredMode preferredMode, SwtProgressHandler progressHandler, ServiceOperationCallback callback)
          Invokes the service operation with the values of the request (input) properties and with the specified preferred invocation mode and progress handler.
 void invoke(ServiceOperationCallback callback)
           Invokes the service operation with the values of the request (input) properties, and with a preferred invocation mode of ASYNC and with the default progress handler.
 void invoke(SwtProgressHandler progressHandler, ServiceOperationCallback callback)
           Invokes the service operation with the values of the request (input) properties, with the specified progress handler, and with a preferred invocation mode of ASYNC.
 
Methods inherited from interface com.sage.swt.client.sdata.BindableDataProvider
getMetaData, getPropertyValue, getTypeInfo, setPropertyValue, setPropertyValue, shutdown
 
Methods inherited from interface com.sage.swt.client.sdata.HasBindableDataChangedHandlers
addBindableDataChangedHandler
 
Methods inherited from interface com.sage.swt.client.sdata.HasBindableDataChangingHandlers
addBindableDataChangingHandler
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

ACTION_INVOKE

static final java.lang.String ACTION_INVOKE
"Invoke" action

See Also:
Constant Field Values

ACTION_GET_DEFAULTS

static final java.lang.String ACTION_GET_DEFAULTS
"GetDefaults" action

See Also:
Constant Field Values

ACTION_CANCEL

static final java.lang.String ACTION_CANCEL
"Cancel" action

See Also:
Constant Field Values

PROPERTY_REQUEST

static final java.lang.String PROPERTY_REQUEST
"Request" property (for inputs)

See Also:
Constant Field Values

PROPERTY_RESPONSE

static final java.lang.String PROPERTY_RESPONSE
"Response" property (for outputs)

See Also:
Constant Field Values

STATUS

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

SUCCESS

static final java.lang.String SUCCESS
See Also:
Constant Field Values
Method Detail

invoke

void invoke(ServiceOperationCallback callback)

Invokes the service operation with the values of the request (input) properties, and with a preferred invocation mode of ASYNC and with the default progress handler.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
callback - The callback for receiving the notification that the service operation is done.

invoke

void invoke(ProgressType progressType,
            ServiceOperationCallback callback)

Invokes the service operation with the values of the request (input) properties, and with a preferred invocation mode of ASYNC and with the progress type for the progress handler.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
progressType - The progress type for the progress handler.
callback - The callback for receiving the notification that the service operation is done.

invoke

void invoke(ServiceInvocationPreferredMode preferredMode,
            ServiceOperationCallback callback)
Invokes the service operation with the values of the request (input) properties and with the specified preferred invocation mode and with the default progress handler.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
preferredMode - The preferred mode to use when invoking the service operation. If the service operation is invoked in asynchronous mode, it responds with progress information until it is done. If invoked in synchronous mode, it does not give any response until it is done.
callback - The callback for receiving the notification that the service operation is done.

invoke

void invoke(SwtProgressHandler progressHandler,
            ServiceOperationCallback callback)

Invokes the service operation with the values of the request (input) properties, with the specified progress handler, and with a preferred invocation mode of ASYNC.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
progressHandler - The progress handler for receiving notifications containing progress information - this handler usually handles the progress information by displaying or logging it.
callback - The callback for receiving the notification that the service operation is done.

invoke

void invoke(ProgressType progressType,
            ServiceInvocationPreferredMode preferredMode,
            ServiceOperationCallback callback)
Invokes the service operation with the values of the request (input) properties and with the specified progress type and preferred invocation mode.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
progressType - The progress type for the progress handler.
preferredMode - The preferred mode to use when invoking the service operation. If the service operation is invoked in asynchronous mode, it responds with progress information until it is done. If invoked in synchronous mode, it does not give any response until it is done.
callback - The callback for receiving the notification that the service operation is done.

invoke

void invoke(ServiceInvocationPreferredMode preferredMode,
            SwtProgressHandler progressHandler,
            ServiceOperationCallback callback)
Invokes the service operation with the values of the request (input) properties and with the specified preferred invocation mode and progress handler.

NOTE: The actual invocation mode depends on what invocation modes the underlying service supports.

Parameters:
preferredMode - The preferred mode to use when invoking the service operation. If the service operation is invoked in asynchronous mode, it responds with progress information until it is done. If invoked in synchronous mode, it does not give any response until it is done.
progressHandler - The progress handler for receiving notifications containing progress information - this handler usually handles the progress information by displaying or logging it.
callback - The callback for receiving the notification that the service operation is done.

getDefaults

void getDefaults(ServiceOperationCallback callback)

Retrieve the default request values for a service.

Parameters:
callback - The callback for receiving the notification that the service operation is done.

cancel

void cancel(ServiceOperationCallback callback,
            java.lang.String trackingURL)

Cancel the request for a service.

Parameters:
callback - The callback for receiving the notification that the cancel operation is done.
trackingURL - The tracking URL of the request that has been canceled.

getRequestTypeInfo

TypeInfo getRequestTypeInfo()
Gets the type information for the "request" property (which is a compound property containing inputs for the service operation). If the service operation does not have a "request" property (in other words, it has no inputs), this method returns null.

Returns:
The type information for the "request" property (which is a compound property containing inputs for the service operation), or null if the service operation does not have a "request" property.

getResponseTypeInfo

TypeInfo getResponseTypeInfo()
Gets the type information for the "response" property (which is a compound property containing outputs for the service operation). If the service operation does not have a "response" property (in other words, it has no outputs), this method returns null.

Returns:
The type information for the "response" property (which is a compound property containing outputs for the service operation), or null if the service operation does not have a "response" property.

getPropertyValue

java.lang.Object getPropertyValue(java.lang.String... propertySegments)

Gets the value of the specified property in the current entity of this bindable data provider.

When a property is an EntityData object, the value of a sub-property can be obtained directly by using "." notation in the property name. For example, if the bindable data provider's current entity has a complex "fromAddress" property that contains a "streetName" sub-property, use "fromAddress.streetName" or fromAddress, streetName to get the value of the "streetName" sub-property directly.

Note that the "." notation is meant for cases where the main property (such as the "fromAddress" in the example) does not have a child or a reference relationship to the bindable data provider's current entity, but is instead just a complex property that's part of that current entity.

Also note that for primitive or simple properties that include a "." in their property name, use the "{dot}" escape sequence instead. For example, if the primitive property happens to be called "my.property" in the schema, use "my{dot}property" as the property name.

For datasources: while the cursor is being moved, the behaviour of this method is undefined.

Parameters:
propertySegments - The name of the property in question.
Returns:
The value of the property.


Copyright © 2011 Sage Software, Inc. All rights reserved.