-------------------------------------------------------------------------------
--
--  @Copyright (c) 2002, Oracle Corporation. All rights reserved.
--  @headcom
--
--  Pre-populate strings for database services example
--
--  This script is used to pre-populate data for the database services 
--  example. It is called from install.sql and shouldn't be run by hand. 
--
-------------------------------------------------------------------------------
set serveroutput on size 1000000
set define off

declare
    l_string_id  integer;
    l_person_id  integer;
    l_group_id   integer;
begin

dbms_output.put_line('Adding NLS strings...');

-- strings for preview mode
l_string_id := wwnls_api.add_string( 
    'provider','services','prevstr1','us','Database Services Portlet');
wwnls_api.set_string(
    'provider','services','prevstr1','d','Database Services Portlet - d');

-- strings for edit defaults mode
l_string_id := wwnls_api.add_string( 
    'provider','services','custdeftextprompt','us','Enter default personalized text:');
wwnls_api.set_string(
    'provider','services','custdeftextprompt','d','Enter default personalized text - d:');
l_string_id := wwnls_api.add_string( 
    'provider','services','titledefprompt','us','Enter default personalized portlet title:');
wwnls_api.set_string(
    'provider','services','titledefprompt','d','Enter default personalized portlet title - d:');

-- strings for customize mode
l_string_id := wwnls_api.add_string( 
    'provider','services','custtextprompt','us','Enter your personalized text:');
wwnls_api.set_string(
    'provider','services','custtextprompt','d','Enter your personalized text - d:');
l_string_id := wwnls_api.add_string( 
    'provider','services','titleprompt','us','Enter your personalized portlet title:');
wwnls_api.set_string(
    'provider','services','titleprompt','d','Enter your personalized portlet title - d:');
l_string_id := wwnls_api.add_string( 
    'provider','services','applybutn','us','Apply');
wwnls_api.set_string(
    'provider','services','applybutn','d','Apply - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','okbutn','us','OK');
wwnls_api.set_string(
    'provider','services','okbutn','d','OK - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','cancelbutn','us','Cancel');
wwnls_api.set_string(
    'provider','services','cancelbutn','d','Cancel - d');

-- strings for error messages
l_string_id := wwnls_api.add_string( 
    'provider','services','invalid_text','us',
    'You have entered invalid characters. A valid string, must be non null, and may only '
    ||'contain alphanumeric characters and -_$()"%,. :{}! as special characters.'); 
wwnls_api.set_string(
    'provider','services','invalid_text','d',
    'You have entered invalid characters. A valid string, must be non null, and may only '
    ||'contain alphanumeric characters and -_$()"%,. :{}! as special characters. - d'); 
l_string_id := wwnls_api.add_string( 
    'provider','services','securityerr','us','Insufficient privileges');
wwnls_api.set_string(
    'provider','services','securityerr','d','Insufficient privileges - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','invaliddispmode','us','Invalid display mode');
wwnls_api.set_string(
    'provider','services','invaliddispmode','d','Invalid display mode - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','generalerr','us','An error occurred');
wwnls_api.set_string(
    'provider','services','generalerr','d','An error occurred - d');

-- strings for buttons
l_string_id := wwnls_api.add_string( 
    'provider','services','closebtn','us','Close');
wwnls_api.set_string(
    'provider','services','closebtn','d','Close - d');

-- strings for portlet record fields
l_string_id := wwnls_api.add_string( 
    'provider','services','ptldefname','us','DatabaseServicesPortlet');
wwnls_api.set_string(
    'provider','services','ptldefname','d','DatabaseServicesPortlet-d');
l_string_id := wwnls_api.add_string( 
    'provider','services','ptldeftitle','us','Database Services Portlet');
wwnls_api.set_string(
    'provider','services','ptldeftitle','d','Database Services Portlet - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','ptldefdesc','us','This is the database services portlet implemented in PL/SQL. It displays 6 show modes.');
wwnls_api.set_string(
    'provider','services','ptldefdesc','d','This is the database services portlet implemented in PL/SQL. It displays 6 show modes. - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','ptldevtmmsg','us','Web Services Portlet Timed Out.');
wwnls_api.set_string(
    'provider','services','ptldevtmmsg','d','Web Services Portlet Timed Out. - d');

-- strings for show mode
l_string_id := wwnls_api.add_string( 
    'provider','services','showstr1','us','Welcome {0} to Oracle Portal Introductory Example!');
wwnls_api.set_string(
    'provider','services','showstr1','d','Welcome {0} to Oracle Portal Introductory Example! - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','showstr2','us','This portlet has rendered {0} times in this session.');
wwnls_api.set_string(
    'provider','services','showstr2','d','This portlet has rendered {0} times in this session. - d');

-- strings for details mode
l_string_id := wwnls_api.add_string( 
    'provider','services','detailstr1','us','The current language setting is {0}.');
wwnls_api.set_string(
    'provider','services','detailstr1','d','The current language setting is {0}. - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','detailstr2','us','This portlet has been rendered {0} times in this session.');
wwnls_api.set_string(
    'provider','services','detailstr2','d','This portlet has been rendered {0} times in this session. - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','clearcntbtn','us','Clear count');
wwnls_api.set_string(
    'provider','services','clearcntbtn','d','Clear count - d');

-- strings for help mode
l_string_id := wwnls_api.add_string( 
    'provider','services','helptitle','us','Help');
wwnls_api.set_string(
    'provider','services','helptitle','d','Help - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','helpstr1','us','<center>This portlet displays session information.  <BR> To clear the session or view your current language, <BR> click on the portlet title!</center>');
wwnls_api.set_string(
    'provider','services','helpstr1','d','<center>This portlet displays session information.  <BR> To clear the session or view your current language, <BR> click on the portlet title!</center> - d');

-- strings for about mode
l_string_id := wwnls_api.add_string( 
    'provider','services','abouttitle','us','About');
wwnls_api.set_string(
    'provider','services','abouttitle','d','About - d');
l_string_id := wwnls_api.add_string( 
    'provider','services','aboutstr1','us','<center>This portlet displays a welcome message.  <BR> The portlet offers session and language information!</center>');
wwnls_api.set_string(
    'provider','services','aboutstr1','d','<center>This portlet displays a welcome message.  <BR> The portlet offers session and language information!</center> - d');

commit;

dbms_output.put_line('Seed data successfully completed');

exception
    when others then
        dbms_output.put_line('ERROR: Could not install seed data for Services example provider');
        rollback;
end;
/

set define on

