Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 4 Nov 2001 23:17:40 -0000 1.1 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 5 Nov 2001 02:53:33 -0000 1.2 @@ -1,32 +1,125 @@ -create table rss_generation_subscriptions ( - subscription_id integer, - impl_name varachar(100), - context_identifier varchar(100), - timeout integer +create function inline_0 () +returns integer as ' +begin + PERFORM acs_object_type__create_type ( + ''rss_gen_subscr'', -- object_type + ''RSS Generation Subscription'', -- pretty_name + ''RSS Generation Subscriptions'', -- pretty_plural + ''acs_object'', -- supertype + ''rss_gen_subscrs'', -- table_name + ''subscr_id'', -- id_column + null, -- package_name + ''f'', -- abstract_p + null, -- type_extension_table + ''rss_gen_subscr__name'' -- name_method + ); + + return 0; +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +create function inline_1 () +returns integer as ' +begin + PERFORM acs_attribute__create_attribute ( + ''rss_gen_subscr'', -- object_type + ''IMPL_ID'', -- attribute_name + ''integer'', -- datatype + ''Implementation ID'', -- pretty_name + ''Implementation IDs'', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + ''type_specific'', -- storage + ''f'' -- static_p + ); + + PERFORM acs_attribute__create_attribute ( + ''rss_gen_subscr'', -- object_type + ''CONTEXT_IDENTIFIER'', -- attribute_name + ''integer'', -- datatype + ''Context Identifier'', -- pretty_name + ''Context Identifiers'', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + ''type_specific'', -- storage + ''f'' -- static_p + ); + + PERFORM acs_attribute__create_attribute ( + ''rss_gen_subscr'', -- object_type + ''TIMEOUT'', -- attribute_name + ''integer'', -- datatype + ''Timeout'', -- pretty_name + ''Timeouts'', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + ''type_specific'', -- storage + ''f'' -- static_p + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1 (); + +drop function inline_1 (); + +create table rss_gen_subscrs ( + subscr_id integer + constraint rss_gen_subscrs_id_fk + references acs_objects(object_id) + constraint rss_gen_subscrs_id_pk + primary key, + impl_id integer + constraint rss_gen_subscrs_impl_nn + not null + constraint rss_gen_subscrs_impl_fk + references acs_sc_impls(impl_id), + context_identifier varchar(100) + constraint rss_gen_subscrs_ctx_nn + not null, + timeout integer + constraint rss_gen_subscrs_timeout_nn + not null ); -comment on table rss_generation_subscriptions is ' +comment on table rss_gen_subscrs is ' Table for storing the different parts of the site we will generate summaries for. '; -comment on column rss_generation_subscriptions.subscription_id is ' +comment on column rss_gen_subscrs.subscr_id is ' Subscriptions are ACS objects. They will typically inherit permission from a package instance. '; -comment on column rss_generation_subscriptions.impl_name is ' +comment on column rss_gen_subscrs.impl_id is ' The implementation which will provide summary information and update status. '; -comment on column rss_generation_subscriptions.context_identifier is ' +comment on column rss_gen_subscrs.context_identifier is ' An identifier unique to the site section whose content is to be summarized. A context identifier need not be a package instance id. We will suggest a convention but the format is entirely up to the implementors. '; -comment on column rss_generation_subscriptions.timeout is ' +comment on column rss_gen_subscrs.timeout is ' The minimum number of seconds between summary builds. '; Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-sc-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-sc-create.sql 4 Nov 2001 23:17:40 -0000 1.1 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-sc-create.sql 5 Nov 2001 02:53:33 -0000 1.2 @@ -14,7 +14,7 @@ select acs_sg_msg_type__new ( 'RssGenerationSubscriber.Datasource.OutputType', - 'datasource:string' -- ???? + 'version:string,channel_title:string,channel_link:uri,channel_description:string,image:string,items:string,channel_language:string,channel_copyright:string,channel_managingEditor:string,channel_webMaster:string,channel_rating:string,channel_pubDate:timestamp,channel_lastBuildDate:timestamp,channel_skipDays:integer,channel_skipHours:integer' ); select acs_sc_operation__new ( Index: openacs-4/packages/rss-support/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/index.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/rss-support/www/doc/index.html 4 Nov 2001 23:17:40 -0000 1.1 +++ openacs-4/packages/rss-support/www/doc/index.html 5 Nov 2001 02:53:33 -0000 1.2 @@ -63,15 +63,17 @@
-The feed generation service contract consists of two operations.
+The feed generation service contract is called RssGenerationSubscriber
and consists of two operations.
RssGenDatasource
. The return value of RssGenDatasource
-contains all required metadata fields as well as configuration
-information such as the RSS version to be used (0.91 or 1.00 are
-supported at present).
-RssLastUpdated
. Used to determine if the live summary
-is out of date.
+Datasource(context_identifier)
returns a data
+structure that contains all required metadata fields plus
+configuration information such as the RSS version to be used (0.91 or
+1.00 are supported at present). This data structure contains
+everything needed to run rss_gen
.
+
+LastUpdated(context_identifier)
returns a timestamp
+that is used to determine if the live summary is out of date.
@@ -97,13 +99,15 @@
RssGenDatasource
and uses the
- information to build a new summary page. This generic and simple scheme
- can be used to dispatch different versions of the summary builder as well
- as to support extensibility via modules. Warning:
- This design expects the output of RssGenDatasource to be reasonably small,
- as we will have to parse this list-of-lists to generate a summary.
+Datasource
and uses the information to build a new
+ summary page. This generic and simple scheme can be used to
+ dispatch different versions of the summary builder as well as to
+ support extensibility via modules. Warning:
+ This design expects the output of Datasource
to be
+ reasonably small, as we will have to parse this list-of-lists to
+ generate a summary.