| Home | Trees | Index | Help |
|
|---|
| Package amplee :: Package atompub :: Module collection :: Class FeedHandler |
|
object --+
|
FeedHandler
| Method Summary | |
|---|---|
Provides a simple API to manipulate the collection feed as well as a public feed associated to the collection. | |
add(self,
entry)
| |
Returns a byte string of the collection feed or None if the feed was not set yet. | |
Initializes the public feed from the collection feed. | |
Returns a byte string of the public feed or None if the feed was not set yet. | |
remove(self,
entry)
| |
replace(self,
entry)
| |
Returns the collection feed as a bridge.Document instance | |
Replaces the collection feed instance by the one provided in parameter. | |
Adds a processing instruction to the collection feed to enable XSLT processing of the feed by the consumer. | |
Adds a processing instruction to the public feed to enable XSLT processing of the feed by the consumer. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Method Details |
|---|
__init__(self)
|
collection_xml(self)Returns a byte string of the collection feed or None if the feed was not set yet. |
init_public(self, collection=None, entry_processor=None, post_processor=None)Initializes the public feed from the collection feed. It also adds an atom:generator element. If the ``collection`` parameter is provided it also adds an app:collection element to allow the retrieval of the collection URI. The ``entry_processor`` if provided is a callable that takes one single parameter as member resource. It must return a bridge.Element that will be added to the public feed in place of the one passed in parameter. This can be useful if you have to pre-process the entry before it being inserted to the public feed. You can also return None to prevent the entry to be inserted at all. The ``post_processor`` should be a callable that takes a bridge.Document instance representing the public feed. The callable should return a bridge.Document instance after post processing if needed on the public feed. |
public_xml(self)Returns a byte string of the public feed or None if the feed was not set yet. |
retrieve(self)Returns the collection feed as a bridge.Document instance |
set(self, feed)Replaces the collection feed instance by the one provided in parameter. Wraps the bridge.Element provided into a bridge.Document instance |
set_collection_xslt(self, path, add_extra_comment=False)Adds a processing instruction to the collection feed to enable XSLT processing of the feed by the consumer. The ``path`` argument is the URI or URI path to the XSLT resource. You must ensure that the path will not break the XML validity. Set the ``add_extra_comment`` parameter to True to force a comment of 512 bytes to be added and ensure older browsers do treat the processing instruction. |
set_public_xslt(self, path, add_extra_comment=False)Adds a processing instruction to the public feed to enable XSLT processing of the feed by the consumer. The ``path`` argument is the URI or URI path to the XSLT resource. You must ensure that the path will not break the XML validity. Set the ``add_extra_comment`` parameter to True to force a comment of 512 bytes to be added and ensure older browsers do treat the processing instruction. |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Jul 19 15:32:17 2007 | http://epydoc.sf.net |