Package gchecky :: Module gxml :: Class DocumentManager
[hide private]
[frames] | no frames]

Type DocumentManager

source code

object --+        
         |        
      type --+    
             |    
   NodeManager --+
                 |
                DocumentManager

Keeps track of all the Document subclasses. Similar to NodeManager automates tasks needed to be donefor every Document subclass.

The main purpose is to keep the list of all the classes and theirs correspongin xml tag names so that when an XML message is recieved it could be possible automatically determine the right Document subclass the message corresponds to (and parse the message using the found document-class).

Instance Methods [hide private]

Inherited from type: __call__, __cmp__, __delattr__, __getattribute__, __hash__, __repr__, __setattr__, __subclasses__, mro

Inherited from object: __init__, __reduce__, __reduce_ex__, __str__

Class Methods [hide private]
 
register_class(self, clazz, tag_name)
Register the Document subclass.
source code
 
get_class(self, tag_name)
Returns: the class by its xml tag name or raises an exception if no class was found for the tag name.
source code
Static Methods [hide private]
 
__new__(cls, name, bases, attrs)
Do some stuff for every created Document subclass.
source code
Class Variables [hide private]
  documents = {'-notification': <class 'gchecky.model.abstract_n...
The dictionary of all the documents.

Inherited from NodeManager: nodes

Properties [hide private]

Inherited from type: __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details [hide private]

__new__(cls, name, bases, attrs)
Static Method

source code 
Do some stuff for every created Document subclass.
Overrides: NodeManager.__new__

get_class(self, tag_name)
Class Method

source code 
Returns:
the class by its xml tag name or raises an exception if no class was found for the tag name.

Class Variable Details [hide private]

documents

The dictionary of all the documents.
Value:
{'-notification': <class 'gchecky.model.abstract_notification_t'>,
 '-order': <class 'gchecky.model.abstract_order_t'>,
 'add-merchant-order-number': <class 'gchecky.model.add_merchant_order\
_number_t'>,
 'add-tracking-data': <class 'gchecky.model.add_tracking_data_t'>,
 'archive-order': <class 'gchecky.model.archive_order_t'>,
 'authorization-amount-notification': <class 'gchecky.model.authorizat\
ion_amount_notification_t'>,
...