Rem Copyright (c) 1998 by Oracle Corporation Rem NAME Rem cipck.hpb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem CvE 11/09/98 - added cihapp.set_access_rights REM *************************************************************************** REM Hand-carved package body for PACKAGE created on 20-OCT-98 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihpck IS -- Generic post-process routines PROCEDURE check_delete(id number); --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY ciopackage.data) IS BEGIN if operation = 'INS' then pl.v.element_type_name := 'CEL'; pl.i.element_type_name := true; pl.v.container_subtype := 'PCK'; pl.i.container_subtype := true; pl.v.owning_user := USER; pl.i.owning_user := true; if cdapi.app_sys_ref is null then pl.v.root_flag := 'Y'; else pl.v.root_flag := 'N'; end if; pl.i.root_flag := true; end if; --remove spaces and dots from name if pl.i.name then pl.v.name := REPLACE (pl.v.name, ' ', NULL); pl.v.name := REPLACE (pl.v.name, '.', NULL); pl.i.name := true; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS BEGIN -- if operation is 'DELETE', make sure no non-cascading references exist if operation = 'DEL' then check_delete(id); end if; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id number, pl ciopackage.data) IS BEGIN if operation = 'INS' then if cdapi.app_sys_ref is not null then ciiutl.create_appxxx('CEL', pl.v.id, pl.v.name); else -- check top level containers rmdbg.trace('Calling log_change'); rmman.log_change('CIHAPPCONU1',id); end if; elsif operation = 'UPD' and (pl.i.name) then if pl.v.root_flag = 'N' then rmdbg.trace('root flag is : '||pl.v.root_flag); cioapp_con_interface.traverse('CIHAPPCONU1',id,'APPCEL'); else -- check top level containers rmdbg.trace('Calling log_change'); rmman.log_change('CIHAPPCONU1',id); end if; end if; cihapp.set_access_rights(operation, 'PCK', pl.v.id, pl.v.owning_user, pl.i.owning_user); if operation != 'SEL' then if UPPER(pl.v.name) = 'PACKAGE' then --%0!s: The name of a Package cannot be 'Package' ciierr.post(2188,ciiutl.identify(pl.v.id,'PCK')); raise cdapi.apierror; end if; --deferred unique name check rmman.log_change('CIHPCKE_UNIQUE_NAME',pl.v.id); end if; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id number) IS BEGIN null; END; --============================= CHECK DELETE ================================-- PROCEDURE check_delete(id number) IS dummy number; error_count number := 0; BEGIN null; END; --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /