c.l.c.apihelpers : module documentation

Part of canonical.launchpad.components

Helpers to patch circular import shortcuts for the webservice.

Many of the exports for the webservice entries deliberately set various types to Interface because using the real types cause circular import problems.

The only current option is to later patch the types to the correct value. The helper functions in this file make that easy.

Function patch_entry_return_type Update return type for a webservice method that returns entries.
Function patch_collection_return_type Update return type for a webservice method that returns a collection.
Function patch_list_parameter_type Update a list parameter type for a webservice method.
Function patch_plain_parameter_type Update a plain parameter type for a webservice method.
Function patch_choice_parameter_type Update a Choice parameter type for a webservice method.
Function patch_reference_property Set the type of the given property on the given class.
Function patch_collection_property Set the collection type of the given property on the given class.
def patch_entry_return_type(exported_class, method_name, return_type):
Update return type for a webservice method that returns entries.
Parametersexported_classThe class containing the method.
method_nameThe method name that you need to patch.
return_typeThe new return type for the method.
def patch_collection_return_type(exported_class, method_name, return_type):
Update return type for a webservice method that returns a collection.
Parametersexported_classThe class containing the method.
method_nameThe method name that you need to patch.
return_typeThe new return type for the method.
def patch_list_parameter_type(exported_class, method_name, param_name, param_type):
Update a list parameter type for a webservice method.
Parametersexported_classThe class containing the method.
method_nameThe method name that you need to patch.
param_nameThe name of the parameter that you need to patch.
param_typeThe new type for the parameter.
def patch_plain_parameter_type(exported_class, method_name, param_name, param_type):
Update a plain parameter type for a webservice method.
Parametersexported_classThe class containing the method.
method_nameThe method name that you need to patch.
param_nameThe name of the parameter that you need to patch.
param_typeThe new type for the parameter.
def patch_choice_parameter_type(exported_class, method_name, param_name, choice_type):
Update a Choice parameter type for a webservice method.
Parametersexported_classThe class containing the method.
method_nameThe method name that you need to patch.
param_nameThe name of the parameter that you need to patch.
choice_typeThe new choice type for the parameter.
def patch_reference_property(exported_class, property_name, property_type):
Set the type of the given property on the given class.
Parametersexported_classThe class containing the property.
property_nameThe name of the property whose type you need to patch.
property_typeThe new type for the property.
def patch_collection_property(exported_class, property_name, collection_type):
Set the collection type of the given property on the given class.
Parametersexported_classThe class containing the property.
property_nameThe name of the property whose type you need to patch.
collection_typeThe Collection type.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.