Next Previous Contents

3. APC rss aa module Server

3.1 Requirements for the server

The rss aa module server has at least two different tasks: Its primary purpose is to generate xml data to transport Action Application item information. Its secondary purpose is to assist a remote node in establishing a feed.

The rss aa module server must perform the following tasks:

3.2 Specification Detail

A new php file getxml.php3 is created.

Different from most files in the admin/ directory, this file does not include init_page.php3 because does not use session management.

In case of errors such as bad authentication, bad authorization, bad arguments and so on, a clear text error message is sent to the client. No effort is taken to put this error message into an xml like structure.

The program parses its GET or PUSH arguments and extracts these:

The node_username and password values are checked against the nodes table's data. In case the credentials are not correct, the request is rejected.

If the parameter slice_id is empty, the program goes into feed establishing mode. It must try to find the correct slice by searching the slice table. Search criteria are:

If no such slice is found, the server aborts with an error message.

If the parameter slice_id is not empty, the program goes into feeding mode. It then looks up permissions for the slice slice_id, the user user of node node_username in the table ef_permissions . If the remote user at the remote node does not appear in this table, the request is rejected. (If the ef_permissions.user field is empty, access is granted to all users of the node. If the ef_permissions.node field is empty, access is granted to all nodes.)

Then the program starts to create an xml/rss aa module message.

The rss aa module first section contains informations about the slice or feed itself. If the program is in feed establishing mode, the informations about all slices found during the search for the correct slice are put into the first section. If the program is in feeding mode, the informations of the slice from which the feed is requested are put into the first section.

Any categories mentioned in the first section must be specified after the slice and feed section. This is the second section of the message.

Any fields mentioned in the first section must be specified after the categories section. This is the third section of the message.

The rss aa module fourth section contains informations about the items itself. The items section is empty if the program is in feed establishing mode. It contains items if the program is in feeding mode. The items to be sent are selected by the slice_id and further narrowed by the timestamp information from the start_timestamp parameter. Only those items are sent which have been created between the time of start_timestamp and the current time. If the parameter categories is not empty, only those items are sent which belong to one of the categories given. Finally, only those items are sent which have not been imported from another remote slice. In case there is anything left, it is sent.

The text of the actual items is transported in the content:items container (as described in content:items ). The format used is selected accoring to the format of the acual text of the item.

Fields other than the actual item text which are to be tranported but are not in plain text format must be converted to plain text for transmission. html for other fields is not supported.


Next Previous Contents