Rem
Rem $Header: javavm/ojvmwcu/install/export_ojvmwcu_classes.sql /st_javavm_19.0.0.0.0ojvmru/2 2025/03/11 16:41:41 apfwkr Exp $
Rem
Rem export_ojvmwcu_classes.sql
Rem
Rem Copyright (c) 2015, 2025, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      export_ojvmwcu_classes.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    BEGIN SQL_FILE_METADATA 
Rem    SQL_SOURCE_FILE: javavm/ojvmwcu/export_ojvmwcu_classes.sql 
Rem    SQL_SHIPPED_FILE: 
Rem    SQL_PHASE: 
Rem    SQL_STARTUP_MODE: NORMAL 
Rem    SQL_IGNORABLE_ERRORS: NONE 
Rem    SQL_CALLING_FILE: 
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    apfwkr      02/28/25 - CI #37647624 of mohshanm_bug-29867088 from main
Rem                           (apfwkr_ci_backport_29867088_19.27.0.0.250415ojvmru).
Rem    kdere       12/12/17 - Adding Size Wrapper Class
Rem    kdere       03/08/16 - Adding user parameter to export procedures
Rem    kdere       08/13/15 - Created
Rem

-- public grants and synonyms
call dbms_output.put_line('WCU: Granting Privileges'); 


declare
procedure export_class(uname varchar2, name varchar2) as
  id varchar2(256);
  ojvmwcuuser varchar2(256);
  install_schema VARCHAR2(20) := 'OJVMWCU_INSTALL';
begin
  ojvmwcu_sys.require_sys;
  id := sys.dbms_assert.enquote_name(name, false)  ;
  ojvmwcuuser := sys.dbms_assert.schema_name(uname);
  execute immediate 'grant execute on ' || install_schema || '.' || id || ' to ' || ojvmwcuuser;
  execute immediate 'create or replace synonym ' || ojvmwcuuser || '.' || id || ' for ' ||
     install_schema || '.' || id;
end;

procedure export_resource(uname varchar2, name varchar2) as
  id varchar2(256);
  ojvmwcuuser varchar2(256);
  install_schema VARCHAR2(20) := 'OJVMWCU_INSTALL';
begin
  ojvmwcu_sys.require_sys;
  id := sys.dbms_assert.enquote_name(name, false)  ;
  ojvmwcuuser := sys.dbms_assert.schema_name(uname);
  execute immediate 'grant execute on java resource ' || install_schema || '.' || id || ' to ' || ojvmwcuuser;
  execute immediate 'create or replace synonym ' || ojvmwcuuser || '.' || id || ' for ' ||
     install_schema || '.' || id;
end;

begin
  export_class(upper('&1'),'oracle/ojvmwcu/security/Utils');
  export_class(upper('&1'),'oracle/ojvmwcu/conversion/ConversionUtils');
  export_class(upper('&1'),'javax/ws/rs/client/Entity');
  export_class(upper('&1'),'javax/ws/rs/client/ClientBuilder');
  export_class(upper('&1'),'javax/ws/rs/client/Client');
  export_class(upper('&1'),'javax/ws/rs/client/Invocation$Builder');
  export_class(upper('&1'),'javax/ws/rs/client/Invocation');
  export_class(upper('&1'),'javax/ws/rs/client/WebTarget');
  export_class(upper('&1'),'javax/ws/rs/core/Configurable');
  export_class(upper('&1'),'javax/ws/rs/core/GenericType');
  export_class(upper('&1'),'javax/ws/rs/core/UriBuilder');
  export_class(upper('&1'),'javax/ws/rs/core/Response');
  export_class(upper('&1'),'javax/ws/rs/core/Response$Status');
  export_class(upper('&1'),'javax/ws/rs/WebApplicationException');
  export_class(upper('&1'),'org/glassfish/jersey/uri/UriTemplate');  
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OAsyncInvoker');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OClient');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OClientBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OInvocation');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OInvocationBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OMultivaluedMap');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OResponse$1');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OResponse');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OUriBuilder$QueryParam');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OUriTemplate');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OUriBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/OWebTarget');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/filters/OClientRequestContext');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/filters/OClientRequestFilter');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/filters/OClientResponseContext');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/filters/OClientResponseFilter');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/MessageBodyReader');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/MessageBodyWriter');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/OCoreJsonProvider$TypeAdapter');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/OCoreJsonProvider');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/OJaxbXmlProvider');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/providers/OStringProvider');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/runtime/OCustomResponseBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/runtime/OCustomRuntimeDelegate$1');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/runtime/OCustomRuntimeDelegate$OCustomLinkBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/runtime/OCustomRuntimeDelegate');
  export_class(upper('&1'),'ojvmwcu/rest/client/client/runtime/OCustomUriBuilder');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClient');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClientConfig$1');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClientConfig$Builder');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClientConfig');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClientImpl$1');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpClientImpl');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpRequest$1');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpRequest$Builder');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpRequest');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpResponse');
  export_class(upper('&1'),'ojvmwcu/rest/client/httpEngine/HttpUtils');

  export_resource(upper('&1'),'META-INF/services/javax.ws.rs.client.ClientBuilder');
  export_resource(upper('&1'),'META-INF/services/javax.ws.rs.ext.RuntimeDelegate');
  export_resource(upper('&1'),'lib/security/cacerts');
end;
/
