---{{ $Header: \\ukst76\rcsroot.7_0\model\jin\config\RCS\jricfgd.jps 40.3 1998/12/17 11:11:26 wstallar Exp $ ---{{ ------------------------------------------------------------------------ ---File: $Workfile: jrphcfgd.sql $ ---Author: $Author: wstallar $ ---Date: $Date: 1998/12/17 11:11:26 $ ---Version: $Revision: 40.3 $ ---Status: $State: Exp $ ---Locked_by: $Locker: $ ---Project: The Oracle Common Repository --- Description: PL/SQL for Configuration Definition - Header --- Notes: --- RealAuth: dcaruana --- IncepDate: 1/15/1998 --- Copyright: (c) Oracle Corporation 1997. All Rights Reserved. --- Tagline: -- Oracle Repository: Managing *all* your data -- --- --------------------------------------------------------------------------- --- Log of Changes from Source Control System --- --------------------------------------------------------------------------- --- $Log: jricfgd.jps $ --- Revision 40.3 1998/12/17 11:11:26 wstallar --- 780836 ALLOW POPULATION OF CONFIG FROM TEXT-BASED LIST OF RULESpopulate_from_spec() --- Added populate_from_spec(). --- --- Revision 40.2 1998/05/27 13:07:59 eharding --- Moved reference JR_* PL/SQL from ClearCase --- --- --- Rev 1.1 15 Jan 1998 13:56:18 dcaruana --- Add Header --- }} -----------------------------------------------------------------------+ --- prompt Package Header: jr_configuration_def create or replace package jr_configuration_def is -- Public Interface ------------------------------------------------------------------------- --- jr_configuration_def.CREATE_CONFIGURATION() --- --- Creates a new configuration. -------------------------------------------------------------------------- procedure create_configuration( config_name in varchar2, config_irid out number, config_ivid out number, description in varchar2 := NULL); ------------------------------------------------------------------------- --- jr_configuration_def.REMOVE_CONFIGURATION() --- --- Deletes a non-versioned or checked-out configuration. -------------------------------------------------------------------------- procedure remove_configuration( config_irid in number, config_ivid in number ); ------------------------------------------------------------- -- jr_configuration_def.CHECK_CONFIG_FOR_UPDATE() -- -- Test if configuration is OK for update -- operations. Will raise exceptions and post appropriate -- errors. ------------------------------------------------------------- procedure check_config_for_update(config_irid in number ,config_ivid in number ,object_irid in number default NULL ,object_ivid in number default NULL); ------------------------------------------------------------------------- --- jr_configuration_def.RENAME_CONFIGURATION() --- --- Changes the name of the configuration. -------------------------------------------------------------------------- procedure rename_configuration(config_irid in number ,config_ivid in number ,new_name in varchar2); ------------------------------------------------------------------------- --- jr_configuration_def.CHANGE_CONFIGURATION_DESC() --- --- Changes the description of the configuration. -------------------------------------------------------------------------- procedure change_configuration_desc(config_irid in number ,config_ivid in number ,new_desc in varchar2); ------------------------------------------------------------------------- --- jr_configuration_def.ADD_MEMBER() --- --- Adds an object to the configuration. --- If RECURSE is TRUE, and object is a container element, then all --- children of the object will also be added. -------------------------------------------------------------------------- procedure add_member( config_irid in number, config_ivid in number, object_irid in number, object_ivid in number, ref_kind in varchar2 default null, recurse in boolean default FALSE ); ------------------------------------------------------------------------- --- jr_configuration_def.REMOVE_MEMBER() --- --- Removes an object from the configuration. --- If RECURSE is TRUE, and object is a container element, then all --- children of the object will also be removed. -------------------------------------------------------------------------- procedure remove_member( config_irid in number, config_ivid in number, object_irid in number, recurse in boolean default FALSE ); ------------------------------------------------------------------------- --- jr_configuration_def.REMOVE_ALL_MEMBERS() --- --- Removes all object from the configuration. -------------------------------------------------------------------------- procedure remove_all_members( config_irid in number, config_ivid in number ); --------------------------------------------------------------- -- jr_configuration_def.MERGE_CONFIGS() -- -- Procedure adds any members in the source config that are -- not in the target config to the target. --------------------------------------------------------------- procedure merge_configs(target_ivid in number, source_ivid in number); --------------------------------------------------------------- -- jr_configuration_def.SUBTRACT_CONFIGS() -- -- Procedure remove any members from the target config that -- are in the source config. --------------------------------------------------------------- procedure subtract_configs(target_ivid in number, source_ivid in number); --------------------------------------------------------------- -- jr_configuration_def.POPULATE_CONFIG_FROM_WORKAREA -- -- Procedure adds members of the specified workarea to a -- configuration. If workarea members are checked-out, then -- the checked-in versions are added. Workarea members not -- under change control are skipped. -- Optionally, just the members of the workareas private config -- will be added. --------------------------------------------------------------- procedure populate_config_from_workarea(config_irid in number ,config_ivid in number ,workarea_id in number ,private_only in boolean default FALSE); --------------------------------------------------------------- -- jr_configuration_def.SUBTRACT_WORKAREA_FROM_CONFIG -- -- Procedure removes any members of the specified workarea that -- occur in the specified configuration from the configuration. -- If workarea members are checked-out, then the checked-in versions -- are removed. Workarea members not under change control are -- skipped. -- Optionally, just the members of the workareas private config -- will be removed. --------------------------------------------------------------- procedure subtract_workarea_from_config(config_irid in number ,config_ivid in number ,workarea_id in number ,private_only in boolean default FALSE); --------------------------------------------------------------- -- jr_configuration_def.POPULATE_FROM_SPEC() -- -- Procedure create a config by executing the -- rules supplied in a text-based spec. -- Format is: -- RULE_NAME(PARAM1_VALUE,PARAM2_VALUE,PARAM3_VALUE) -- OTHER_RULE(PARAM1_VALUE) -- etc.. -- May also MERGE/SUBTRACT other configs with this one -- using INCLUDE_CONFIG and EXCLUDE_CONFIG -- -- Spec may include comments, indicated by: -- '-- ', '//', '--', and '/*' '*/' --------------------------------------------------------------- procedure populate_from_spec(config_ivid in number ,spec in varchar2); --------------------------------------------------------------- -- jr_configuration_def.UPDATE_FROM_SPEC() -- -- Procedure adds members to a config by executing -- rules supplied in a text-based spec. -- Format is: -- RULE_NAME(PARAM1_VALUE,PARAM2_VALUE,PARAM3_VALUE) -- OTHER_RULE(PARAM1_VALUE) -- etc.. -- May also MERGE/SUBTRACT other configs with this one -- using INCLUDE_CONFIG and EXCLUDE_CONFIG -- -- Spec may include comments, indicated by: -- '-- ', '//', '--', and '/*' '*/' --------------------------------------------------------------- procedure update_from_spec(config_ivid in number ,spec in varchar2); SPEC_PARSE_ERROR exception; ALTER_CONFIG_ERROR exception; CREATE_CONFIG_ERROR exception; REMOVE_CONFIG_ERROR exception; INVALID_CONFIG exception; end jr_configuration_def; / --- --- ---------------------------------------------------------------------------+ --- }} End of file $Workfile: jrphcfgd.sql $ $$Header_is_done --- ---------------------------------------------------------------------------+