Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit to HEAD of merge of changes on oacs-5-1 branch between tags jc…
…d-merge-5-1-20040724 and jcd-merge-5-1-20050111
- Loading branch information
Showing
6 changed files
with
160 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
-- | ||
-- Adding defaulting for v_summary_context_id, to support | ||
-- the file-storage implementation of RssGenerationSubscriber. | ||
-- | ||
create or replace package body rss_gen_subscr | ||
as | ||
function new ( | ||
p_subscr_id in rss_gen_subscrs.subscr_id%TYPE, | ||
p_impl_id in rss_gen_subscrs.impl_id%TYPE, | ||
p_summary_context_id in rss_gen_subscrs.summary_context_id%TYPE, | ||
p_timeout in rss_gen_subscrs.timeout%TYPE, | ||
p_lastbuild in rss_gen_subscrs.lastbuild%TYPE, | ||
p_object_type in acs_objects.object_type%TYPE default 'rss_gen_subscr', | ||
p_creation_date in acs_objects.creation_date%TYPE default sysdate, | ||
p_creation_user in acs_objects.creation_user%TYPE default null, | ||
p_creation_ip in acs_objects.creation_ip%TYPE default null, | ||
p_context_id in acs_objects.context_id%TYPE default null | ||
) return acs_objects.object_id%TYPE | ||
is | ||
v_subscr_id rss_gen_subscrs.subscr_id%TYPE; | ||
v_summary_context_id rss_gen_subscrs.summary_context_id%TYPE; | ||
begin | ||
v_subscr_id := acs_object.new ( | ||
p_subscr_id, | ||
p_object_type, | ||
p_creation_date, | ||
p_creation_user, | ||
p_creation_ip, | ||
p_context_id | ||
); | ||
|
||
if p_summary_context_id is null then | ||
v_summary_context_id := v_subscr_id; | ||
else | ||
v_summary_context_id := p_summary_context_id; | ||
end if; | ||
|
||
insert into rss_gen_subscrs | ||
(subscr_id, impl_id, summary_context_id, timeout, lastbuild) | ||
values | ||
(v_subscr_id, p_impl_id, v_summary_context_id, p_timeout, p_lastbuild); | ||
|
||
return v_subscr_id; | ||
end new; | ||
|
||
function name ( | ||
p_subscr_id in rss_gen_subscrs.subscr_id%TYPE | ||
) return varchar2 | ||
is | ||
begin | ||
return 'RSS Generation Subscription #'||p_subscr_id; | ||
end name; | ||
|
||
function del ( | ||
p_subscr_id in rss_gen_subscrs.subscr_id%TYPE | ||
) return number | ||
is | ||
begin | ||
delete from acs_permissions where object_id = p_subscr_id; | ||
|
||
delete from rss_gen_subscrs where subscr_id = p_subscr_id; | ||
|
||
acs_object.del(p_subscr_id); | ||
|
||
return 0; | ||
end del; | ||
|
||
end rss_gen_subscr; | ||
/ | ||
show errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
-- | ||
-- Adding defaulting for v_summary_context_id, to support | ||
-- the file-storage implementation of RssGenerationSubscriber. | ||
-- | ||
|
||
drop function rss_gen_subscr__new ( | ||
integer, -- subscr_id | ||
integer, -- impl_id | ||
varchar, -- summary_context_id | ||
integer, -- timeout | ||
timestamptz, -- lastbuild | ||
varchar, -- object_type | ||
timestamptz, -- creation_date | ||
integer, -- creation_user | ||
varchar, -- creation_ip | ||
integer -- context_id | ||
); | ||
|
||
create function rss_gen_subscr__new ( | ||
integer, -- subscr_id | ||
integer, -- impl_id | ||
varchar, -- summary_context_id | ||
integer, -- timeout | ||
timestamptz, -- lastbuild | ||
varchar, -- object_type | ||
timestamptz, -- creation_date | ||
integer, -- creation_user | ||
varchar, -- creation_ip | ||
integer -- context_id | ||
) returns integer as ' | ||
declare | ||
p_subscr_id alias for $1; | ||
p_impl_id alias for $2; | ||
p_summary_context_id alias for $3; | ||
p_timeout alias for $4; | ||
p_lastbuild alias for $5; | ||
p_object_type alias for $6; -- default ''rss_gen_subscr'' | ||
p_creation_date alias for $7; -- default now() | ||
p_creation_user alias for $8; -- default null | ||
p_creation_ip alias for $9; -- default null | ||
p_context_id alias for $10; -- default null | ||
v_subscr_id rss_gen_subscrs.subscr_id%TYPE; | ||
v_summary_context_id rss_gen_subscrs.summary_context_id%TYPE; | ||
begin | ||
v_subscr_id := acs_object__new ( | ||
p_subscr_id, | ||
p_object_type, | ||
p_creation_date, | ||
p_creation_user, | ||
p_creation_ip, | ||
p_context_id | ||
); | ||
if p_summary_context_id is null then | ||
v_summary_context_id := v_subscr_id; | ||
else | ||
v_summary_context_id := p_summary_context_id; | ||
end if; | ||
insert into rss_gen_subscrs | ||
(subscr_id, impl_id, summary_context_id, timeout, lastbuild) | ||
values | ||
(v_subscr_id, p_impl_id, v_summary_context_id, p_timeout, p_lastbuild); | ||
return v_subscr_id; | ||
end;' language 'plpgsql'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters