Rem Copyright (c) 1993 by Oracle Corporation Rem NAME Rem cdapi.pkb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem jwetherb 10/25/94 - Make activity global into a function Rem jwetherb 10/22/94 - Add param to initialize and set_context_appsys Rem jwetherb 10/22/94 - Replace cdapi.ci_user with user Rem jwetherb 09/01/94 - Establish the context activity during initialize Rem jwetherb 08/24/94 - Delete rows from all RM tables during initialize Rem jwetherb 08/22/94 - add power_delete procedure Rem aheath 07/11/94 - Creation Rem jwetherb 08/09/93 - Creation rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cdapi.ipb 1.5 1998/11/10 19:48:58 cvanes Exp $ rem CREATE OR REPLACE PACKAGE BODY cdapi AS inited boolean DEFAULT false; -- If there are no messages in the server message table in the repository language, -- we shall just use the US ones instead. message_language rm$repositories.nls_language%type default null; FUNCTION initialized RETURN boolean IS BEGIN return(inited); END; FUNCTION get_app_sys_ref RETURN number IS BEGIN return app_sys_ref; END; PROCEDURE substitute_args(msg_string in out varchar2, arg1 varchar2 default null, arg2 varchar2 default null, arg3 varchar2 default null, arg4 varchar2 default null, arg5 varchar2 default null, arg6 varchar2 default null, arg7 varchar2 default null, arg8 varchar2 default null); --=========================== INITIALIZE THE API ============================-- -- This routine must be called at the outset of the ORACLE session to -- initialize all globals used by the API -- If spurious rows are found in the RM_ACTIVITIES table (possibly resulting -- from an illegal COMMIT issued during an activity that was never closed -- or aborted), they are deleted. -- Note that it causes an implicit 'commit' by invoking 'reset_ref_gen' PROCEDURE initialize(curr_app_sys_name varchar2 default null, curr_app_sys_ver number default null, curr_app_sys_ref number default null) IS dummy number; BEGIN -- Check that the user is a legal repository user select count(*) into dummy from sdw_users where username = user; if dummy = 0 then ciierr.fatal(6065,user); end if; -- -- Check to make sure we aren't currently in an activity select count(*) into dummy from rm_activities; if dummy > 0 and cdapi.inited = true then ciierr.fatal(6); elsif dummy > 0 then delete rm_activities; end if; -- Delete visible data from all volatile RM tables delete rm_deferred_checks; delete rm_deferred_queries; -- Clear the global message stack rmmes.clear; -- Set the context application system and get access rights set_context_appsys(curr_app_sys_name,curr_app_sys_ver,curr_app_sys_ref); -- Initialize the RM environment rm.init; -- Establish the context activity environment activity_status := null; activity_warnings := null; cdapi.inited := true; END; --====================== SET CONTEXT APPLICATION SYSTEM =====================-- -- Set global context: Given the application system name and the application -- system version, determine the application system reference. If the app sys -- version is not provided, assume the latest unfrozen version of the -- application system. If no application system name is provided, check -- whether any app sys' exist at all, and if not, assume this call will be -- followed by a call to 'cioapplication_system.ins()' to create one. PROCEDURE set_context_appsys(curr_app_sys_name varchar2, curr_app_sys_ver number default null, curr_app_sys_ref number default null) IS context_app_sys_name varchar2(256); no_context_appsys_flag boolean := false; save_app_sys_name varchar2(256); save_app_sys_ref number; app_sys_ivid number; BEGIN -- B655719 save_app_sys_name := app_sys_name; save_app_sys_ref := app_sys_ref; -- Format the app_sys_name, if provided -- b741665 jkc 7Oct98 - allow mixed case - removed nls_upper(..) if curr_app_sys_name is not null then context_app_sys_name := rtrim(curr_app_sys_name); end if; -- Load appsys info into globals if curr_app_sys_ref is not null then select max(irid), max(name), max(container_subtype) into app_sys_ref, app_sys_name, context_container_subtype from sdd_folders where irid = curr_app_sys_ref; elsif context_app_sys_name is not null then rmdbg.trace('Context Container is: '||context_app_sys_name); select app.irid, container_subtype into app_sys_ref, context_container_subtype from sdd_folders app where jr_name.get_path(app.ivid, 'NAME') = context_app_sys_name; cdapi.app_sys_name := context_app_sys_name; rmdbg.trace('Context Container is: '||cdapi.app_sys_name); else -- No application system info was provided, so assume this is intentional -- (i.e. user is initializing CDAPI in order to create a new APPSYS) cdapi.app_sys_ref := null; cdapi.app_sys_name := null; cdapi.context_container_subtype := null; no_context_appsys_flag := true; end if; if app_sys_ref is null and not no_context_appsys_flag then if curr_app_sys_ref is not null then ciierr.fatal(6000,ciiutl.identify(curr_app_sys_ref, 'CEL')); elsif context_app_sys_name is not null then ciierr.fatal(6007,context_app_sys_name); end if; end if; -- Initialize the access control globals for this application system -- (set to no access rights if appsys not found) ciiacc.initialize; -- Get the lock handle for the context App Sys -- PERFORMS A COMMIT !! -- commented out for early testing CvE -- if not no_context_appsys_flag then -- cdapi.app_sys_lock_handle := -- ck_util.allocate_lock(cdapi.app_sys_name , 1); -- 1 left over from when we had versions -- end if; EXCEPTION WHEN NO_DATA_FOUND OR TOO_MANY_ROWS THEN ciierr.fatal(6007,context_app_sys_name); WHEN OTHERS THEN app_sys_name := save_app_sys_name; -- B655719 app_sys_ref := save_app_sys_ref; rmdbg.trace('Error: '||to_char(sqlcode)||':'||sqlerrm); raise; END; --====================== SET CONTEXT CONTAINER =====================-- -- Set global context: Given the container full pathname, determine the container reference. PROCEDURE set_context_container(curr_container_name varchar2, curr_container_ref number default null) IS BEGIN set_context_appsys(curr_container_name, NULL, curr_container_ref); END; --================================= ACTIVITY ================================-- FUNCTION activity RETURN number IS act number; BEGIN rmmac.rmmacca(act); return(act); END; --============================== OPEN ACTIVITY ==============================-- -- Open a new activity PROCEDURE open_activity IS act number; BEGIN rmoactivity.open(cdapi.activity,act); END; --============================= CLOSE ACTIVITY ==============================-- -- Attempt to close the current activity PROCEDURE close_activity(act_status out varchar2) IS BEGIN rmoactivity.close(cdapi.activity,act_status); END; --============================= ABORT ACTIVITY ==============================-- -- Abort the current activity PROCEDURE abort_activity IS BEGIN rmoactivity.abort(cdapi.activity); END; --============================ VALIDATE ACTIVITY ============================-- -- Validate the current activity PROCEDURE validate_activity(act_status out varchar2, act_warnings out varchar2) IS BEGIN rmoactivity.validate(cdapi.activity,act_status,act_warnings); END; --=========================== VIOLATIONS TO STACK ===========================-- -- Copy outstanding violations against the current activity to the -- message stack PROCEDURE violations_to_stack IS BEGIN for viol in (select * from ci_violations) loop rmmes.post(viol.facility,viol.code,viol.p0,viol.p1,viol.p2, viol.p3,viol.p4,viol.p5,viol.p6,viol.p7); end loop; END; --=============================== POP MESSAGE ===============================-- -- Pop a message from the stack PROCEDURE pop_message(msg_facility out varchar2, msg_code out number, arg1 out varchar2, arg2 out varchar2, arg3 out varchar2, arg4 out varchar2, arg5 out varchar2, arg6 out varchar2, arg7 out varchar2, arg8 out varchar2) IS BEGIN rmmes.pop(msg_facility,msg_code,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); END; --========================= POP INSTANTIATED MESSAGE ========================-- -- Pop the top message off the stack, already formatted, and decrease the -- stack size by 1. Returns the message in a varchar2 string. FUNCTION pop_instantiated_message RETURN varchar2 IS msg_facility varchar2(3); msg_code number; arg1 varchar2(240); arg2 varchar2(240); arg3 varchar2(240); arg4 varchar2(240); arg5 varchar2(240); arg6 varchar2(240); arg7 varchar2(240); arg8 varchar2(240); BEGIN rmmes.pop(msg_facility,msg_code, arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); return(instantiate_message(msg_facility,msg_code, arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)); END; --=============================== GET MESSAGE ===============================-- -- Get a particular message from the stack, identified by it's depth in -- the stack PROCEDURE get_message(stack_depth in binary_integer, msg_facility out varchar2, msg_code out number, arg1 out varchar2, arg2 out varchar2, arg3 out varchar2, arg4 out varchar2, arg5 out varchar2, arg6 out varchar2, arg7 out varchar2, arg8 out varchar2) IS BEGIN rmmes.geterror(stack_depth,msg_facility,msg_code, arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); END; --================================ GET STACK ================================-- -- Retrieve the entire stack into pl/sql tables passed as arguments. PROCEDURE get_stack(msg_facility out cdapi.msg_facility_tab, msg_code out cdapi.msg_code_tab, arg1 out cdapi.lrg_arg_tab, arg2 out cdapi.med_arg_tab, arg3 out cdapi.med_arg_tab, arg4 out cdapi.med_arg_tab, arg5 out cdapi.sml_arg_tab, arg6 out cdapi.sml_arg_tab, arg7 out cdapi.sml_arg_tab, arg8 out cdapi.sml_arg_tab) IS BEGIN /* Retrieve details for all errors in error stack */ for position in 1..stacksize loop rmmes.geterror(position,msg_facility(position),msg_code(position), arg1(position),arg2(position),arg3(position),arg4(position), arg5(position),arg6(position),arg7(position),arg8(position)); end loop; END; --=============================== CLEAR STACK ===============================-- -- Remove all messages from the message stack PROCEDURE clear_stack IS BEGIN rmmes.clear; END; --=============================== STACK SIZE ================================-- -- Return the number of messages currently in the stack FUNCTION stacksize RETURN number IS BEGIN return(rmmes.getsize); END; --============================ GET CDAPI RELEASE ============================-- FUNCTION cdapi_release RETURN varchar2 IS BEGIN return('CDAPI Version 0.1.14.2 - Production'); END; --============================ GET REPOS RELEASE ============================-- FUNCTION repos_release RETURN varchar2 IS BEGIN return('Repository Version 0.1.10 - Production'); END; --============================= SUBSTITUTE ARGS =============================-- -- -- The PROCEDURE 'substitute_args()' scans a string and replaces each -- occurrence of '%s' or '%n!s' where n is a number from 1 to 8 with the -- corresponding string parameter (argX). The use of '%n!s' allows -- language-specific ordering of the substitute strings. As many as eight -- substitution strings may be provided. -- PROCEDURE substitute_args(msg_string in out varchar2, arg1 varchar2 default null, arg2 varchar2 default null, arg3 varchar2 default null, arg4 varchar2 default null, arg5 varchar2 default null, arg6 varchar2 default null, arg7 varchar2 default null, arg8 varchar2 default null) IS strlen binary_integer := length(msg_string); argcnt binary_integer := 1; nextc varchar2(1) := ''; arg varchar2(240); outbuf varchar2(2000) := ''; skip binary_integer := 0; type StringList is table of varchar2(240) index by binary_integer; arglist StringList; BEGIN arglist(0) := arg1; arglist(1) := arg2; arglist(2) := arg3; arglist(3) := arg4; arglist(4) := arg5; arglist(5) := arg6; arglist(6) := arg7; arglist(7) := arg8; for i in 1..strlen loop if skip > 0 then skip := skip - 1; elsif substrb(msg_string,i,1) = '%' then nextc := substrb(msg_string,i+1,1); if nextc = 's' then outbuf := outbuf || arglist(argcnt); argcnt := argcnt + 1; skip := 1; elsif ASCII(nextc) between ASCII('0') and ASCII('7') and ((strlen - i) > 2) and substrb(msg_string,i+2,1) = '!' and substrb(msg_string,i+3,1) = 's' then outbuf := outbuf || arglist(to_number(nextc)); skip := 3; else outbuf := outbuf || substrb(msg_string,i,1); end if; else outbuf := outbuf || substrb(msg_string,i,1); end if; end loop; msg_string := outbuf; EXCEPTION when no_data_found then null; END; --=========================== INSTANTIATE MESSAGE ===========================-- -- -- 'instantiate_message()' retrieves the text for the given error number, -- substitutes any passed parameters, and puts the new string into the -- global message stack -- FUNCTION instantiate_message(msg_facility varchar2, msg_code number, str1 varchar2 default null, str2 varchar2 default null, str3 varchar2 default null, str4 varchar2 default null, str5 varchar2 default null, str6 varchar2 default null, str7 varchar2 default null, str8 varchar2 default null) RETURN varchar2 IS BEGIN -- Prepend the FACILITY and CODE onto the m_text string -- NOTE: NLS conversion should exist in the TO_CHAR format below -- return msg_facility||'-'||ltrim(to_char(msg_code,'00000'))||': ' || instantiate_mess(msg_facility, msg_code, str1, str2, str3, str4, str5, str6, str7, str8); END; --=========================== INSTANTIATE MESS ==============================-- -- -- Return a message complete with argument substitutions but without -- the message code and facility FUNCTION instantiate_mess(msg_facility varchar2, msg_code number, str1 varchar2 default null, str2 varchar2 default null, str3 varchar2 default null, str4 varchar2 default null, str5 varchar2 default null, str6 varchar2 default null, str7 varchar2 default null, str8 varchar2 default null) RETURN varchar2 IS m_text varchar2(2000); BEGIN -- On first call, check if any server side messages exists in the requested -- langauge. If not, always give the US message. -- Check assumes that CDA-00001 always exists. if message_language is null then for i in (select r.nls_language from rm$nls_messages m ,rm$repositories r where m.code = 1 and m.utility = 'CDA' and m.lang_id = r.nls_language) loop message_language := i.nls_language; exit; end loop; if message_language is null then message_language := 'US'; end if; end if; -- -- Retrieve TEXT from the NLS_USMESSAGE table -- based on utility, msgno, and [NLS] language -- select m.text into m_text from rm$nls_messages m where m.utility = msg_facility and m.code = abs(msg_code) and m.lang_id = message_language; -- -- Replace the '%s' symbols with str parameters in the TEXT string -- substitute_args(m_text, str1, str2, str3, str4, str5, str6, str7, str8); -- return(m_text); EXCEPTION when no_data_found then return(' Parameters: <' || str1 || '><'|| str2 || '><'|| str3 || '><'|| str4 || '><'|| str5 || '><'|| str6 || '><'|| str7 || '><'|| str8 || '>'); END; --=============================== POWER DELETE ==============================-- -- Delete all elements which reference the element with the supplied ID PROCEDURE power_delete(id number) IS BEGIN null; /* delete from sdd_elements where id in (el_id ,el_elem_owned_by ,el_within_id ,el_2nd_within_id ,el_3rd_within_id ,el_4th_within_id ,el_5th_within_id ,el_6th_within_id); delete from sdd_structure_elements where id in (str_use_of ,str_part_of); */ END; -------------------------------------------------------------------------------- -- Procedure : share_pac -- Create a share link from the pac_irid to the container -- -- CW 10-Mar-2000 Fix bug 985593, prevent share of non-shareable elements -------------------------------------------------------------------------------- PROCEDURE share_pac(pac_irid in number, container_reference in number) IS fm ciofolder_member.data; save_csynch boolean; cel_subtype varchar2(3); name_in_context varchar2(4000); -- Max size string returned from get_path type_short_name varchar2(30); -- PAC element type stype varchar2(10); -- Supertype short name BEGIN begin -- Raise an exception if attempting to share a non-shareable element -- Find type of pac element select e.short_name into type_short_name from sdd_object_versions o , rm_element_types e where o.irid = share_pac.pac_irid and e.irid = o.logical_type_id ; -- Check its supertype (don't need to provide ref as this is only needed -- for module unit supertypes, which cannot be shared) stype := ciisty.supertype(type_short_name); if stype = 'NSHR' then -- Cannot share non-shareable element '%0!s' ciierr.fatal(202, ciiutl.identify(pac_irid, type_short_name)); elsif stype = 'CEL' then -- Cannot share container '%0!s' ciierr.fatal(203, ciiutl.identify(pac_irid, type_short_name)); end if; end; if container_reference is null then return; end if; select cel.container_subtype into cel_subtype from ci_container_elements cel where cel.id = share_pac.container_reference; if cel_subtype = 'PCK' then name_in_context := jr_name.get_path(pac_irid, 'NAMETYPE'); if lengthb(name_in_context) > 256 then -- Add '...' to fromt to indicate that something has been truncated -- then truncate chars from front so 252 bytes are left. (Should always -- work with even numbers with '..b' char functions, so multi-byte -- characters don't get split.) fm.v.name_in_context := '...' || substrb(name_in_context, -252); else fm.v.name_in_context := name_in_context; end if; fm.i.name_in_context := true; end if; fm.v.member_object := pac_irid; fm.i.member_object := true; fm.v.folder_reference := container_reference; fm.i.folder_reference := true; fm.v.ownership_flag := 'N'; fm.i.ownership_flag := true; save_csynch := rm.do_csynch; rm.do_csynch := true; -- Allow setting of system properties ciofolder_member.ins(null, fm); rm.do_csynch := save_csynch; EXCEPTION when others then rm.do_csynch := save_csynch; raise; END; -- Delete a share link from the pac_irid to the container PROCEDURE unshare_pac(pac_irid in number, container_reference in number) IS fm_ref number; BEGIN select max(irid) into fm_ref from sdd_folder_members fm where fm.folder_reference = container_reference and fm.member_object = pac_irid; ciofolder_member.del(fm_ref); END; -- Update the owning link from the pac_irid to make the container the new owner PROCEDURE move_pac(pac_irid in number, container_reference in number) IS fm ciofolder_member.data; save_csynch boolean; type_short_name varchar2(10); -- type_short_name of the pac_irid container_subtype varchar2(3); current_owner number; owner_ivid number; -- B3558577 Added no_checkin_update boolean := jr_context.is_enabled(jr_context.no_checkin_update); l_exists_on_tree number; -- check for element being moved within own substructure cursor get_type_short_name(pac_irid number) is select et.short_name from rm_element_types et ,sdd_object_versions ov where et.id = ov.logical_type_id and ov.irid = pac_irid; BEGIN --dbms_output.put_line('A1'); select max(irid), max(folder_reference) into fm.v.irid, current_owner from sdd_folder_members fm where fm.member_object = pac_irid and fm.ownership_flag = 'Y'; -- Do nothing if attempt to move to self. if current_owner = move_pac.container_reference then return; end if; type_short_name := null; for typ in get_type_short_name(move_pac.pac_irid) loop type_short_name := typ.short_name; exit; end loop; if type_short_name is null then -- %0!s: Only Primary Accesss Elements may be moved. ciierr.fatal(6103,move_pac.pac_irid); -- Cannot call identify as we don't know type end if; select max(fol.container_subtype) into container_subtype from sdd_folders fol where irid = move_pac.container_reference; -- Project Containers cannot own objects #1058440 if container_subtype = 'PRJ' then -- %0!s: Project Containers cannot own objects ciierr.fatal(6100,ciiutl.identify(move_pac.container_reference, 'CEL')); end if; -- B3558577 : This fix was missing from all versions that I looked at, but was present in the -- Designer pe repository. -- D'oh! (RJM) 18/09/2001 -- Current owner must be CO (BUG 1845905) begin select ivid into owner_ivid from sdd_folders where irid = current_owner; if jr_version.is_checked_in( current_owner, owner_ivid ) then --cannot modify checked in object %0 rmmes.post('CDR', 02622, ciiutl.identify(current_owner, 'CEL')); raise jr_version.not_checked_out; end if; exception when no_data_found then --the object being moved was a root container (probably) owner_ivid:=null; when others then raise; end; if container_reference is null then -- This is the case where a folder is becoming a root folder -- This is why a container reference is null -- SB 02/13/01 -- --dbms_output.put_line('A2'); -- Only allowed for Containers being made 'top level' if fm.v.irid is null then -- Already a top level element so stop now. return; end if; if type_short_name not in ('APP', 'PRJ', 'PCK', 'FOL') then -- %0!s : CONTAINER_REFERENCE must be set unless moving a Container to be top level ciierr.fatal(6099,ciiutl.identify(pac_irid, type_short_name)); end if; save_csynch := rm.do_csynch; rm.do_csynch := true; -- Allow deleting of owning folder member -- Check if the user has delete access on the source folder -- SB 02/13/01 - Bug 1565623 -- if not jr_acc_rights.has_access(current_owner, USER, 'DEL') then -- Insufficient privileges to perform a delete operation rmmes.post('CDR', 2513, jr_name.get_path(pac_irid,'NAME'),jr_name.get_path(current_owner,'NAME')); raise jr_acc_rights.access_rights_error; end if; -- -- All is well; allow delete operation. -- ciofolder_member.del(fm.v.irid); rm.do_csynch := save_csynch; -- B3057824 : Allow checked-in folder to be moved to the workarea -- Disable 'No update of checked in object versions' to allow root_flag to be set 'Y' on checked-in folders -- Re-set to original value after update (and in exception handler) jr_context.disable(jr_context.no_checkin_update); -- Much easier to update the table instead of making one of 4 CDAPI calls. update i$sdd_folders fol set fol.root_flag = 'Y' where fol.irid = pac_irid; if (no_checkin_update) then jr_context.enable(jr_context.no_checkin_update); end if; rmman.log_change('CIHAPPCONU1',pac_irid); else -- container_reference is not null -- Element being made a child of a container --dbms_output.put_line('A3'); -- -- VLJ 01/12/00 #1521610 -- check that the element is not being moved into itself -- if move_pac.pac_irid = move_pac.container_reference then -- Cannot move : %0!s into itself ciierr.fatal(6105, ciiutl.identify( move_pac.pac_irid, 'CEL')); end if; -- VLJ 22/11/00 #1511736 check that the element being made a child -- is not moving to a subfolder within its own hierarchy -- Thus verify that target (container_ref) and source (element being moved) -- are not present on same tree -- begin select distinct level into l_exists_on_tree from i$sdd_folder_members fm where fm.member_object = move_pac.container_reference connect by prior fm.member_object = fm.folder_reference start with fm.folder_reference = move_pac.pac_irid; exception when no_data_found then l_exists_on_tree := null; end; -- Cannot move element %0!s - target container %1!s is within same hierarchy if l_exists_on_tree is not null then ciierr.fatal(6104, ciiutl.identify( move_pac.pac_irid, 'CEL') , ciiutl.identify( move_pac.container_reference, 'CEL' )); end if; fm.v.folder_reference := container_reference; fm.i.folder_reference := true; save_csynch := rm.do_csynch; rm.do_csynch := true; -- Allow setting of system properties if fm.v.irid is not null then -- This is the case where folder is being moved from one folder to another folder -- This is possibly the more common scenario -- SB 02/13/01 -- -- Check if the user has delete access on the source folder -- SB 02/13/01 - Bug 1565623 -- if not jr_acc_rights.has_access(current_owner, USER, 'DEL') then -- Insufficient privileges to perform a delete operation rmmes.post('CDR', 2513, jr_name.get_path(pac_irid,'NAME'),jr_name.get_path(current_owner,'NAME')); raise jr_acc_rights.access_rights_error; end if; -- Delete any existing share into this constainer (may be 0 or 1) #937583 --dbms_output.put_line('A4'); for existing_fm in ( select fm.irid from ci_folder_members fm where fm.member_object = pac_irid and fm.folder_reference = move_pac.container_reference) loop ciofolder_member.del(existing_fm.irid); end loop; -- If we got here then check for insert access on the target folder -- SB 02/13/01 - Bug 1565623 -- if not jr_acc_rights.has_access(container_reference, USER, 'INS') then -- Insufficient privileges to perform an insert operation rmmes.post('CDR', 2620, jr_name.get_path(container_reference,'NAME')); raise jr_acc_rights.access_rights_error; end if; ciofolder_member.upd(fm.v.irid, fm); --dbms_output.put_line('A5'); else -- fm.v.irid is null -- This is the case where a root folder is being moved into another -- folder. -- SB 02/13/01 -- --dbms_output.put_line('A6'); -- Element used to be a top level container fm.v.member_object := pac_irid; fm.i.member_object := true; -- Check for insert access on the target folder -- SB 02/13/01 - Bug 1565623 -- -- Change this error message to the appropriate number if not jr_acc_rights.has_access(container_reference, USER, 'INS') then -- Insufficient privileges to perform an insert operation rmmes.post('CDR', 2620, jr_name.get_path(current_owner,'NAME')); raise jr_acc_rights.access_rights_error; end if; ciofolder_member.ins(null, fm); -- VLJ 21-11-00 fix #1502867 -- Disable 'No update of checked in object versions' to allow root_flag to be set 'N' on checked-in folders -- Re-set to original value after update (or in exception handler) jr_context.disable(jr_context.no_checkin_update); update i$sdd_folders fol set fol.root_flag = 'N' where fol.irid = pac_irid; --dbms_output.put_line('A7'); if ( no_checkin_update ) then jr_context.enable(jr_context.no_checkin_update); end if; end if; -- fm.v.irid is not null rm.do_csynch := save_csynch; rmman.log_change('CIHAPPCONU1',fm.v.irid); end if; -- container_reference is null --dbms_output.put_line('A8'); -- Change the ownership of other versions of the same object too. jr_acc_rights.change_owning_container(pac_irid, container_reference); --dbms_output.put_line('A9'); EXCEPTION when others then rm.do_csynch := save_csynch; if ( no_checkin_update ) then jr_context.enable(jr_context.no_checkin_update); end if; raise; END; --=============================== IDENTIFY ==================================-- function identify(id number, short_name varchar2) return varchar2 is begin return ciiutl.identify(id, short_name); end identify; --=============================== IDENTIFY ==================================-- function identify(id number, types number) return varchar2 is begin return ciiutl.identify(id, types); end identify; --=================================== END ===================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END cdapi; /