
rem This script defines extra meta data for sdd schema objects that are not
rem defined in ACD, and hence do not have display details etc
rem
rem This script must be run before the rm logical model is populated for these
rem sdd objects as it updates their meta data

rem Help Tags
rem Agreed with Marian and Derek to use the folowing ranges for help tags, so
rem as not to clash with Designer model elements.
rem
rem                 Start   End     Increment
rem Element Types : 5000000 5999999 5
rem Properties    : 6000000 9999999 5

rem ---------------------------------------------------------------------------+
prompt Table: rm_reg_types
rem ---------------------------------------------------------------------------+
rem

create table rm_reg_types
( table_name      varchar2(30)  not null
, product         varchar2(240) not null
, name            varchar2(40)  not null
, short_name      varchar2(30)  not null
, plural_name     varchar2(40)  not null
, nls_name        varchar2(240) not null
, nls_plural_name varchar2(240) not null
, user_extension  varchar2(30)
, help_tag        varchar2(10)
)
/

-- rm_reg_types_pk
alter table rm_reg_types add constraint rm_reg_types_pk primary key (product, name)
/

rem ---------------------------------------------------------------------------+
prompt Table: rm_reg_properties
rem ---------------------------------------------------------------------------+
rem

create table rm_reg_properties
( product             varchar2(240) not null
, type_name           varchar2(40)  not null
, name                varchar2(40)  not null
, nls_name            varchar2(40)
, nls_default         varchar2(240)
, nls_hint            varchar2(240)
, case_mode           varchar2(1)   not null
, displayed           varchar2(1)   not null
, maintained          varchar2(1)   not null
, update_mode         varchar2(1)   not null
, help_tag            varchar2(10)
, display_sequence    number
, descriptor_sequence number
)
/

-- rm_reg_properties_pk
alter table rm_reg_properties add constraint rm_reg_properties_pk primary key (product, type_name, name)
/

-- These were inline comments but the RAU cannot handle these
-- case_mode   : Upper, Lower, Initcap or Mixed (default)
-- displayed   : Yes or No
-- maintained  : User or System
-- update_mode : Updateable, Not updateable, updateable Only from null

-------------------
-- *** Types *** --
-------------------

--                                 table_name                     product name                      short         plural_name                 nls_name                        nls_plural_name                   user_extension help_tag
--                                                                                                  _name
insert into rm_reg_types values ( 'SDD_BRANCHES'                , 'SDD', 'BRANCH'                 , 'BR'        , 'BRANCHES'                , 'Branch'                      , 'Branches'                      , 'NNY'        , null);
insert into rm_reg_types values ( 'SDD_CONFIGURATIONS'          , 'SDD', 'CONFIGURATION'          , 'CFG'       , 'CONFIGURATIONS'          , 'Configuration'               , 'Configurations'                , 'NNY'        , 5000000);
insert into rm_reg_types values ( 'SDD_CONFIGURATION_MEMBERS'   , 'SDD', 'CONFIGURATION_MEMBER'   , 'CFGMBR'    , 'CONFIGURATION_MEMBERS'   , 'Configuration Member'        , 'Configuration Members'         , 'NNY'        , null);

insert into rm_reg_types values ( 'SDD_DEPENDENCY_TYPES'        , 'SDD', 'DEPENDENCY_TYPE'        , 'DEPTYP'    , 'DEPENDENCY_TYPES'        , 'Dependency Type'             , 'Dependency Types'              , null         , null);
insert into rm_reg_types values ( 'SDD_DEPEND_STATUSES'         , 'SDD', 'DEPEND_STATUS'          , 'DEPSTAT'   , 'DEPEND_STATUSES'         , 'Dependency Status'           , 'Dependency Statuses'           , null         , null);
insert into rm_reg_types values ( 'SDD_DEPENDENCIES'            , 'SDD', 'DEPENDENCY'             , 'DEP'       , 'DEPENDENCIES'            , 'Dependency'                  , 'Dependencies'                  , null         , null);
insert into rm_reg_types values ( 'SDD_GLOBAL_NAME_DOMAINS'     , 'SDD', 'GLOBAL_NAME_DOMAIN'     , 'GNAMDOM'   , 'GLOBAL_NAME_DOMAINS'     , 'Global Name Domain'          , 'Global Name Domains'           , null         , null);
insert into rm_reg_types values ( 'SDD_NLS_GLOBAL_NAME_DOMAINS' , 'SDD', 'NLS_GLOBAL_NAME_DOMAIN' , 'NLSGNAMDOM', 'NLS_GLOBAL_NAME_DOMAINS' , 'Nls Global Name Domain'      , 'Nls Global Name Domains'       , null         , null);
insert into rm_reg_types values ( 'SDD_GLOBAL_NAMES'            , 'SDD', 'GLOBAL_NAME'            , 'GNAM'      , 'GLOBAL_NAMES'            , 'Global Name'                 , 'Global Names'                  , null         , null);

insert into rm_reg_types values ( 'SDD_DPND_PURGING_POLICIES'     , 'SDD', 'DPND_PURGING_POLICY'    , 'DPPU_POL'   , 'DPND_PURGING_POLICIES'    , 'Dependency Purging Policy'       , 'Dependency Purging Policies'       , null         , null);
insert into rm_reg_types values ( 'SDD_DPND_PURGING_CFG_POLICIES' , 'SDD', 'DPND_PURGING_CFG_POLICY', 'DPPU_CFGPOL', 'DPND_PURGING_CFG_POLICIES', 'Dependency Purging Config Policy', 'Dependency Purging Config Policies', null         , null);
insert into rm_reg_types values ( 'SDD_DPND_PURGING_BR_POLICIES'  , 'SDD', 'DPND_PURGING_BR_POLICY' , 'DPPU_BRPOL' , 'DPND_PURGING_BR_POLICIES' , 'Dependency Purging Branch Policy', 'Dependency Purging Branch Policies', null         , null);

insert into rm_reg_types values ( 'SDD_NLS_MESSAGES'            , 'SDD', 'NLS_MESSAGE'            , 'NMSG'      , 'NLS_MESSAGES'            , 'Nls Message'                 , 'Nls Messages'                  , null         , null);
insert into rm_reg_types values ( 'SDD_NLS_PROMPTS'             , 'SDD', 'NLS_PROMPT'             , 'NPMPT'     , 'NLS_PROMPTS'             , 'Nls Prompt'                  , 'Nls Prompts'                   , null         , null);
insert into rm_reg_types values ( 'SDD_NLS_PROPLIST_ENTRIES'    , 'SDD', 'NLS_PROPLIST_ENTRY'     , 'NPLENT'    , 'NLS_PROPLIST_ENTRIES'    , 'Nls Property List Entry'     , 'Nls Property List Entries'     , null         , null);
insert into rm_reg_types values ( 'SDD_NLS_RESOURCES'           , 'SDD', 'NLS_RESOURCE'           , 'NRSRC'     , 'NLS_RESOURCES'           , 'Nls Resource'                , 'Nls Resources'                 , null         , null);
insert into rm_reg_types values ( 'SDD_OBJECT_VERSIONS'         , 'SDD', 'OBJECT_VERSION'         , 'OBJVER'    , 'OBJECT_VERSIONS'         , 'Object Version'              , 'Object Versions'               , 'NNY'        , null);
insert into rm_reg_types values ( 'SDD_PROPERTY_LISTS'          , 'SDD', 'PROPERTY_LIST'          , 'PLIST'     , 'PROPERTY_LISTS'          , 'Property List'               , 'Property Lists'                , null         , null);
insert into rm_reg_types values ( 'SDD_PROPLIST_ENTRIES'        , 'SDD', 'PROPLIST_ENTRY'         , 'PLSTENT'   , 'PROPLIST_ENTRIES'        , 'Proplist Entry'              , 'Proplist Entries'              , null         , null);
insert into rm_reg_types values ( 'SDD_RULES'                   , 'SDD', 'RULE'                   , 'RULE'      , 'RULES'                   , 'Specification Rule'          , 'Specification Rules'           , 'NNY'        , null);
insert into rm_reg_types values ( 'SDD_VERSION_REGISTRY'        , 'SDD', 'VERSION_REGISTRY'       , 'VERREG'    , 'VERSION_REGISTRIES'      , 'Version Registry'            , 'Version Registries'            , null         , null);
insert into rm_reg_types values ( 'SDD_WORKAREAS'               , 'SDD', 'WORKAREA'               , 'WA'        , 'WORKAREAS'               , 'Workarea'                    , 'Workareas'                     , 'NNY'        , 5000005);
insert into rm_reg_types values ( 'SDD_WORKAREA_SPEC_ENTRIES'   , 'SDD', 'WORKAREA_SPEC_ENTRY'    , 'WASPEC'    , 'WORKAREA_SPEC_ENTRIES'   , 'Workarea Specification Entry', 'Workarea Specification Entries', null         , null);
insert into rm_reg_types values ( 'SDD_WIDGETS'                 , 'SDD', 'WIDGET'                 , 'WIDG'      , 'WIDGETS'                 , 'Widget'                      , 'Widgets'                       , null         , null);
insert into rm_reg_types values ( 'CK_APPLICATION_LOGIC'        , 'CK',  'APPLICATION_LOGIC'      , 'APPLOG'    , 'APPLICATION_LOGIC'       , 'Application Logic'           , 'Application Logic'             , null         , null);
insert into rm_reg_types values ( 'SDW_ACCESS_RIGHTS'           , 'SDW', 'ACCESS_RIGHT'           , 'SDWACC'    , 'ACCESS_RIGHTS'           , 'Access Right'                , 'Access Rights'                 , null         , null);
insert into rm_reg_types values ( 'SDW_USERS'                   , 'SDW', 'USER'                   , 'SDWUSR'    , 'USERS'                   , 'User'                        , 'Users'                         , null         , null);
insert into rm_reg_types values ( 'SDW_VALID_STRUCTURE_ELEMENTS', 'SDW', 'VALID_STRUCTURE_ELEMENT', 'SDWVSL'    , 'VALID_STRUCTURE_ELEMENTS', 'Valid Structure Element'     , 'Valid Structure Elements'      , null         , null);

------------------------
-- *** Properties *** --
------------------------

-- product type_name        name               nls_name     nls_    nls_hint     case  displayed maintained update help_tag display_ descriptor
--                                                          default              _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'CONFIGURATION', 'NAME'            , null       , null  , null       , 'M' , 'Y'     , 'U'     , 'U'   , 6000000, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'CONFIGURATION', 'KIND'            , null       , null  , null       , 'U' , 'N'     , 'S'     , 'N'   , null   , null   , null);
insert into rm_reg_properties values
( 'SDD' , 'CONFIGURATION', 'TRACKING'        , null       , null  , null       , 'M' , 'N'     , 'S'     , 'U'   , null   , null   , null);
insert into rm_reg_properties values
( 'SDD' , 'CONFIGURATION', 'DESCRIPTION'     , null       , null  , null       , 'M' , 'Y'     , 'U'     , 'U'   , 6000005, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'CONFIGURATION', 'CONFIG_SPEC_IRID', null       , null  , null       , 'M' , 'N'     , 'S'     , 'N'   , null   , null   , null);

-- product type_name         name      nls_name        nls_    nls_hint   case  displayed maintained update help_tag display_ descriptor
--                                                     default            _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'OBJECT_VERSION', 'VLABEL', 'Version Label', null  , null     , 'M' , 'Y'     , 'S'     , 'N'   , 6000040, null   , null);

-- CW 27-Aug-99 Fix bug 959794, make default checkin branch non-editable

-- product type_name        name                     nls_name                  nls_    nls_hint case  displayed maintained update help_tag display_ descriptor
--                                                                             default          _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'OWNER'                 , null                    , null  , null   , 'U' , 'Y'     , 'S'     , 'N'   , 6000010, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'NAME'                  , null                    , null  , null   , 'M' , 'Y'     , 'U'     , 'U'   , 6000015, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'KIND'                  , null                    , null  , null   , 'M' , 'N'     , 'S'     , 'N'   , null   , null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'PRIVATE_CFG_IRID'      , null                    , null  , null   , 'M' , 'N'     , 'S'     , 'N'   , null   , null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'PRIVATE_CFG_IVID'      , null                    , null  , null   , 'M' , 'N'     , 'S'     , 'N'   , null   , null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'NOTC'                  , 'No. of Times Refreshed', null  , null   , 'M' , 'Y'     , 'S'     , 'N'   , 6000020, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'IS_COMPILED'           , 'Refreshed ?'           , null  , null   , 'M' , 'Y'     , 'S'     , 'N'   , 6000025, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'DESCRIPTION'           , 'Description'           , null  , null   , 'M' , 'Y'     , 'U'     , 'U'   , 6000030, null   , null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA'     , 'DEFAULT_CHECKIN_BRANCH', 'Default Checkin Branch', null  , null   , 'M' , 'Y'     , 'S'     , 'N'   , 6000035, null   , null);

-- CW 27-Aug-99 Fix bug 863050, make associations to/from configuration (except to config members) non-displayed
--              Do this by making the foreign key column non-displayed, this will cause the link properties to be created as non-displayed

-- product type_name                  name             nls_name nls_    nls_hint case  displayed maintained update help_tag display_ descriptor
--                                                              default          _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA_SPEC_ENTRY'    , 'CONFIG_IVID'  , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'  , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA_SPEC_ENTRY'    , 'WORKAREA_IRID', null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'  , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'WORKAREA_SPEC_ENTRY'    , 'RULE_IRID'    , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'  , null   , null,    null);

insert into rm_reg_properties values
( 'SDD' , 'SDD_COMPILED_WA_CONFIGS', 'CONFIG_IVID'  , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'SDD_COMPILED_WA_CONFIGS', 'WORKAREA_IRID', null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);

insert into rm_reg_properties values
( 'SDD' , 'SDD_COMPILATION_CHANGES', 'WORKAREA_IRID', null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);

insert into rm_reg_properties values
( 'SDD' , 'SDD_WA_EXCLUSIONS'      , 'WORKAREA_IRID', null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'SDD_WA_EXCLUSIONS'      , 'CONFIG_IVID'  , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'SDD_WA_EXCLUSIONS'      , 'OBJECT_IVID'  , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);

insert into rm_reg_properties values
( 'SDD' , 'SDD_RULE_PARAM_VALUES'  , 'CONFIG_IVID'  , null   , null  , null   , 'M' , 'N'     , 'S'       , 'N'   , null  , null,    null);

-- product type_name                  name                    nls_name nls_    nls_hint case  displayed maintained update help_tag display_ descriptor
--                                                                     default          _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'STATUS'              , null   , null  , null   , 'M' , 'Y'     , 'U'      , 'U'   , null   , 10,      null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'PURGE_CANDIDATE'     , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'DEPENDENCY_TYPE_IRID', null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , 20,      null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'REMARK'              , null   , null  , null   , 'M' , 'Y'     , 'U'      , 'U'   , null   , 30,      null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'COPY_ON_COPY'        , null   , null  , null   , 'M' , 'Y'     , 'U'      , 'U'   , null   , 40,      null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'COPY_ON_VERSION'     , null   , null  , null   , 'M' , 'Y'     , 'U'      , 'U'   , null   , 50,      null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'SUPPLIER_TYPE_ID'    , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'SUPPLIER_PARENT_IVID', null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'CLIENT_TYPE_ID'      , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'CLIENT_PARENT_IVID'  , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'SUPPLIER_IRID'       , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'SUPPLIER_IVID'       , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'CLIENT_IRID'         , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY'             , 'CLIENT_IVID'         , null   , null  , null   , 'M' , 'N'     , 'U'      , 'U'   , null   , null,    null);

-- product type_name                  name                    nls_name nls_    nls_hint case  displayed maintained update help_tag display_ descriptor
--                                                                     default          _mode                      _mode           sequence _sequence
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY_TYPE'        , 'TYPE'                , null   , null  , null   , 'M' , 'Y'     , 'U'     , 'U'   , null    , 10,      1);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY_TYPE'        , 'SUBTYPE'             , null   , null  , null   , 'M' , 'Y'     , 'U'     , 'U'   , null    , 20,      2);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY_TYPE'        , 'SYSTEM_FLAG'         , null   , null  , null   , 'M' , 'N'     , 'U'     , 'U'   , null    , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY_TYPE'        , 'TRANSITIVE'          , null   , null  , null   , 'M' , 'N'     , 'U'     , 'U'   , null    , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DEPENDENCY_TYPE'        , 'IRID'                , null   , null  , null   , 'M' , 'N'     , 'U'     , 'U'   , null    , null,    null);

insert into rm_reg_properties values
( 'SDD' , 'DPND_PURGING_CONFIG_POLICY', 'CONFIG_IRID'      , null   , null  , null   , 'M' , 'N'     , 'U'     , 'U'   , null    , null,    null);
insert into rm_reg_properties values
( 'SDD' , 'DPND_PURGING_CONFIG_POLICY', 'CONFIG_IVID'      , null   , null  , null   , 'M' , 'N'     , 'U'     , 'U'   , null    , null,    null);


