Package vita :: Package modules :: Package s3 :: Module s3xrc :: Class S3ImportJob
[hide private]
[frames] | no frames]

Class S3ImportJob

source code

object --+
         |
        S3ImportJob

Helper class for data imports

Instance Methods [hide private]
 
__init__(self, manager, prefix, name, id, record=None, original=None, element=None, mtime=None, rmap=None, directory=None, onvalidation=None, onaccept=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_resolution(self, field)
Find Sync resolution for a particular field in this record
source code
 
commit(self)
Commits the record to the database
source code
 
resolve_references(self)
Resolve references of this record
source code
 
writeback(self, field, value)
Update a field in the record
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  METHOD = Storage(CREATE= "create", UPDATE= "update")
  RESOLUTION = Storage(THIS= "THIS", OTHER= "OTHER", NEWER= "NEW...
  UID = "uuid"
  MCI = "mci"
  MTIME = "modified_on"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, manager, prefix, name, id, record=None, original=None, element=None, mtime=None, rmap=None, directory=None, onvalidation=None, onaccept=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • manager - the S3ResourceController
  • prefix - prefix of the resource name (=module name)
  • name - the resource name (=without prefix)
  • id - the target record ID
  • record - the record data to import
  • element - the corresponding element from the element tree
  • rmap - map of references for this record
  • directory - resource directory of the input tree
  • onvalidation - extra function to validate records
  • onaccept - callback function for committed importes
Overrides: object.__init__
(inherited documentation)

get_resolution(self, field)

source code 

Find Sync resolution for a particular field in this record

Parameters:
  • field - the field name

commit(self)

source code 

Commits the record to the database

resolve_references(self)

source code 

Resolve references of this record

writeback(self, field, value)

source code 

Update a field in the record

Parameters:
  • field - field name
  • value - value to write

Class Variable Details [hide private]

METHOD

Value:
Storage(CREATE= "create", UPDATE= "update")

RESOLUTION

Value:
Storage(THIS= "THIS", OTHER= "OTHER", NEWER= "NEWER", MASTER= "MASTER"\
, MASTERCOPY= "MASTERCOPY")

UID

Value:
"uuid"

MCI

Value:
"mci"

MTIME

Value:
"modified_on"