Rem
Rem This file is used to install the Partner Application example
Rem package and the packages of the portlets it implements.
Rem
Rem Usage:  login to sqlplus 
Rem In sqlplus type the following:
Rem @install.sql 
Rem

set serveroutput on size 1000000
set define on
spool install.log

prompt    #############################################
prompt    Installation of Flights of Fancy Portlet  
prompt    bundled with the Flights of Fancy Provider. 
prompt    #############################################
prompt    Partner Portlets SQL*Plus Installer

--
-- description: This shell script installs the Partner Application. 
--              It uses sqlplus. All arguments will be validated before the
--              install starts.  A typical install will take about 5 minutes.
--
set define '&'
prompt
prompt Please enter the database name(ORACLE_SID) you wish to connect to...
undefine portal_sid
define portal_sid=&portal_sid
prompt
prompt Please enter the schema name of the Portal database objects...
undefine portal_schema
define portal_schema=&portal_schema
prompt
prompt Please enter the password of this Portal schema...
undefine portal_password
define portal_password = &portal_password
prompt
prompt Please enter the schema name for the Provider of the Sample portlets...
undefine prov_schema
define prov_schema=&prov_schema
prompt
prompt Please enter the password of this Provider schema...
undefine prov_password
define prov_password=&prov_password
prompt
prompt Please enter the web server which will host this application...
prompt (For example: webdbsvr.us.oracle.com)
undefine listener_server
define listener_server=&listener_server
prompt
prompt Please enter the port number of the web server which will be used...
prompt (For example: 80 or 3000 etc.)
undefine port_number
define port_number=&port_number
prompt
prompt Please enter the DAD name of your portal...
prompt (For example: portal_dad or my_dad etc.)
undefine dad_name
define dad_name=&dad_name
prompt
prompt Please enter the Partner Application name you used while registering  your  Partner Application with the Login Server...
prompt (For example: FlightsOfFancy or example1 etc.)
undefine app_name
define app_name=&app_name
prompt
prompt 
prompt Begining Partner Application Portlets install ..
prompt ...portal_sid:            &&portal_sid
prompt ...portal_schema:         &&portal_schema
prompt ...portal_password:       *************
prompt ...prov_schema:           &&prov_schema
prompt ...prov_password:         *************
prompt ...listener_server:       &&listener_server
prompt ...port_number:           &&port_number
prompt ...dad_name:              &&dad_name
prompt ...app_name:              &&app_name
prompt 
prompt Note:  If the schema where this provider is installed
prompt is not the portal schema then the provsyns.sql script
prompt needs to be run prior to running this script.  
prompt The provsyns.sql script is in the wwc directory.  
prompt Instructions of how to run the provsyns.sql
prompt script is included in the script.
prompt 
prompt If everything is o.k, just press <enter>
prompt otherwise kill this SQL*Plus session and run it again
undefine ok_to_proceed
define ok_to_proceed=OK&ok_to_proceed
prompt

Rem Connecting to Provider Schema
connect &&prov_schema./&&prov_password.@&&portal_sid;
show user
Rem Installing the portlet package and the Flights of Fancy provider package 
@@flinstal &&listener_server &&port_number &&dad_name &&prov_schema &&app_name

Rem Connecting to Portal Schema
connect &&portal_schema./&&portal_password.@&&portal_sid; 
Rem Installing and registering the Provider 
@@flreg &&portal_schema &&prov_schema 

prompt =======================================================
prompt Installation of Partner Application portlets finished.
prompt Please check install.log file for any errors.
prompt If no errors mentioned in the log file, you can now
prompt add the Flights of Fancy Portlet implemented by the 
prompt Flights of Fancy Provider to your Portal pages.  
prompt =======================================================

spool off;
