cdp Package

cdp Package

exception tic.web.cdp.BadValueError[source]

Bases: tic.web.cdp.Error

Raised when property is set to an invalid value

class tic.web.cdp.Command(javascript_toolkit='dojo')[source]

Bases: object

Command is the superclass of all commands.

The programming model is to declare Python subclasses of the Model class, declaring datastore properties as class members of that class. So if you want to publish a story with title, body, and created date, you would do it like this:

class LoginCommand(Command):
title = StringProperty() created = db.DateTimeProperty()
from_js(json)[source]

Documentation

js_types()[source]

returns a set of closure_types if it is defined in the property

classmethod properties()[source]

Returns a dictionary of all the properties defined for this model.

to_js()[source]

Generates dojo class

to_json()[source]

Documentation

tic.web.cdp.DateTimeProperty[source]
tic.web.cdp.DictProperty[source]
exception tic.web.cdp.DuplicatePropertyError[source]

Bases: tic.web.cdp.Error

Duplication error

exception tic.web.cdp.Error[source]

Bases: exceptions.Exception

Base error

tic.web.cdp.IntegerProperty[source]
tic.web.cdp.ListProperty[source]
tic.web.cdp.LongProperty[source]
class tic.web.cdp.PropertiedClass(name, bases, dct)[source]

Bases: type

Meta-class for initializing Model classes properties.

Used for initializing Properties defined in the context of a model. By using a meta-class much of the configuration of a Property descriptor becomes implicit. By using this meta-class, descriptors that are of class Model are notified about which class they belong to and what attribute they are associated with and can do appropriate initialization via __property_config__.

Duplicate properties are not permitted.

tic.web.cdp.Property[source]

Base class for all command properties

tic.web.cdp.Result

alias of Command

tic.web.cdp.StringProperty[source]

api Module

class tic.web.cdp.api.ICommandHandler[source]

Bases: tic.core.Interface

handles the execution of a Command

This lives in the server and its not serializable

command = None
commnad()[source]

Required method

returns the command class

execute(command)[source]

Executes the Command

this must return an ICommandResult or throws CommandHandlerException

request = None
roll_back(command)[source]

Useful for doing undo stuff

cdp_tests Module

class tic.web.cdp.cdp_tests.CdpTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
tearDown()[source]
test_it_should_generate_closure_class_definition()[source]
test_it_should_generate_dojo_class_definition()[source]
class tic.web.cdp.cdp_tests.TCommand(javascript_toolkit='dojo')[source]

Bases: tic.web.cdp.Command

datetime = None
list = None
string = None

deps Module

main Module

class tic.web.cdp.main.CommandDispatcher(compmgr, init=None, cls=<class 'tic.web.cdp.main.CommandDispatcher'>)[source]

Bases: tic.core.Component

Handles the execution of an incoming command and returns the Command Result

command_handlers

List of components that implement tic.web.cdp.api.ICommandHandler

execute(command)[source]

Documentation

class tic.web.cdp.main.DojoClassDispatcher(compmgr, init=None, cls=<class 'tic.web.cdp.main.DojoClassDispatcher'>)[source]

Bases: tic.core.Component

this acts as a python => javascript convertor

match_request(req)[source]

Return whether the handler wants to process the given request.

process_request(req)[source]

this class maps “serializable” python classes to a dojo class to be able to use it in the Rpc request

class tic.web.cdp.main.Rcdc(compmgr, init=None, cls=<class 'tic.web.cdp.main.Rcdc'>)[source]

Bases: tic.core.Component

command_handlers

List of components that implement tic.web.cdp.api.ICommandHandler

match_request(req)[source]

Return whether the handler wants to process the given request.

process_request(req)[source]

Table Of Contents

Previous topic

browser Package

Next topic

tests Package

This Page