Package conduit :: Package modules :: Package NetworkModule :: Module XMLRPCUtils :: Class DataProviderClient
[hide private]

Class DataProviderClient

source code


Provides the Client portion of dataprovider proxying.

Instance Methods [hide private]
 
__init__(self, *args)
All sync functionality should be provided by derived classes
source code
 
refresh(self)
Performs any (conduit.logging in, etc) which must be undertaken on the dataprovider prior to calling get_all().
source code
 
get_all(self)
Returns an array of all the LUIDs this dataprovider holds.
source code
conduit.DataType.DataType
get(self, LUID)
Returns data with the specified LUID.
source code
 
put(self, data, overwrite=False, LUID=None)
Stores data.
source code
 
delete(self, LUID)
Deletes data with LUID.
source code
 
finish(self, aborted, error, conflict)
Perform any post-sync cleanup.
source code
string
get_UID(self)
Returns a UID that represents this dataproviders (locally) unique state and configuration.
source code
 
set_status(self, newStatus)
Sets the dataprovider status.
source code
 
get_status(self)
Returns: The current dataproviders status
source code
 
get_name(self)
Returns: The DataProvider name, to be displayed in the UI
source code

Inherited from dataproviders.DataProvider.DataSource: add, get_changes, get_num_items

Inherited from dataproviders.DataProvider.DataProviderBase: configure, emit, emit_change_detected, get_configuration, get_configuration_xml, get_input_conversion_args, get_input_type, get_output_conversion_args, get_output_type, initialize, is_busy, is_configured, set_configuration, set_configuration_xml, uninitialize

Class Variables [hide private]
  _configurable_ = False

Inherited from dataproviders.DataProvider.DataProviderBase: __gsignals__, _category_, _description_, _icon_, _in_type_, _module_type_, _name_, _out_type_

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
All sync functionality should be provided by derived classes
Overrides: dataproviders.DataProvider.TwoWay.__init__

refresh(self)

source code 

Performs any (conduit.logging in, etc) which must be undertaken on the dataprovider prior to calling get_all(). Should gather all information so a subsequent call to get_all() can return the uids of all the data this dataprovider holds

This function may be called multiple times so derived classes should be aware of this.

Derived classes should call this function to ensure the dataprovider status is updated.
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataProviderBase.refresh
(inherited documentation)

get_all(self)

source code 
Returns an array of all the LUIDs this dataprovider holds.
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataSource.get_all
(inherited documentation)

get(self, LUID)

source code 

Returns data with the specified LUID. This function must be overridden by the appropriate dataprovider.

Derived classes should call this function to ensure the dataprovider status is updated.
Returns: conduit.DataType.DataType
An item of data
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataSource.get
(inherited documentation)

put(self, data, overwrite=False, LUID=None)

source code 

Stores data. The derived class is responsible for checking if putData conflicts.

In the case of a two-way datasource, the derived type should consider the overwrite parameter, which if True, should allow the dp to replace a datatype instance if one is found at the existing location

Derived classes should call this function to ensure the dataprovider status is updated.
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataSink.put
(inherited documentation)

delete(self, LUID)

source code 
Deletes data with LUID.
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataSink.delete
(inherited documentation)

finish(self, aborted, error, conflict)

source code 
Perform any post-sync cleanup. For example, free any structures created in refresh that were used in the synchronization.
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataProviderBase.finish
(inherited documentation)

get_UID(self)

source code 

Returns a UID that represents this dataproviders (locally) unique state and configuration. For example the LUID for a gmail dp may be your username and password.

Derived types MUST overwride this function
Returns: string
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataProviderBase.get_UID
(inherited documentation)

set_status(self, newStatus)

source code 
Sets the dataprovider status. If the status has changed then emits a status-changed signal
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataProviderBase.set_status
(inherited documentation)

get_status(self)

source code 
Returns:
The current dataproviders status
Decorators:
  • @Utils.log_function_call(clog)
Overrides: dataproviders.DataProvider.DataProviderBase.get_status
(inherited documentation)

get_name(self)

source code 
Returns:
The DataProvider name, to be displayed in the UI
Overrides: dataproviders.DataProvider.DataProviderBase.get_name
(inherited documentation)