Overview | Package | Object Type | Deprecated | Index | Help
| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE

## Package wwctx_api_proxy

This package contains methods for administering Oracle Portal proxy settings.

Proxy settings are used for URL connections from the Portal middle tier and the database tier. For proxy settings to be used by the middle tier to contact the Portal database, they must be specified in the middle tier.

Note: Users must have the All Objects Manage privilege to use the add_proxy, delete_proxy and edit_proxy functions.

Scope:
  Public
Since:
  Oracle Portal 9.0.2

Exception Summary
`PROXY_DUPLICATE_EXCEPTION` A proxy with the same host_name and port number exists.
`PROXY_GENERAL_EXCEPTION` An unknown error occurred.
`PROXY_NOT_FOUND_EXCEPTION` The specified proxy could not be found.
`PROXY_VALD_EXCEPTION` The proxy details are not valid.

Type Summary
`proxy_info` A record structure containing details of a proxy setting. | `record`
`proxy_info_tab` A table structure containing a list of proxy_info records. | `table`
`proxy_record` A record structure containing proxy details. | `record`
`proxy_record_tab` A table structure containing a list of proxy records. | `table`

Constant Summary
`DEFAULT_PROXY_NO` Indicates whether the proxy is to be used as the default proxy for all non-provider HTTP connections made by Portal. | `number`
`DEFAULT_PROXY_YES` Indicates whether the proxy is to be used as the default proxy for all non-provider HTTP connections made by Portal. | `number`

Function/Procedure Summary
`add_proxy` Adds a proxy setting to Oracle Portal. | `varchar2`
`delete_proxy` Deletes a proxy setting from Oracle Portal, given a proxy ID. | ``
`edit_proxy` Updates proxy setting information in Oracle Portal. | ``
`get_default_proxy` Returns the default proxy, as specified in the proxy settings. | `proxy_info`
`get_noproxy_domain` Returns the list of domain names for which a proxy server is not used. | `varchar2`
`get_proxy` Returns information about a proxy, given a proxy ID. | `proxy_info`
`get_proxy_id` Returns the ID of a proxy, given the proxy host name and port number. | `varchar2`
`get_proxy_list` Returns the list of proxies specified in the proxy settings. | `proxy_info_tab`
`is_proxy_used_by_providers` Checks if a given proxy is used by any providers. | `boolean`
`set_default_proxy` Sets a proxy to be the default proxy. | ``
`set_noproxy_domain` Sets the 'No Proxy' server domains. | ``

Exception Detail

### PROXY_DUPLICATE_EXCEPTION

    PROXY_DUPLICATE_EXCEPTION exception

  A proxy with the same host_name and port number exists.

### PROXY_GENERAL_EXCEPTION

    PROXY_GENERAL_EXCEPTION exception

  An unknown error occurred.

### PROXY_NOT_FOUND_EXCEPTION

    PROXY_NOT_FOUND_EXCEPTION exception

  The specified proxy could not be found.

### PROXY_VALD_EXCEPTION

    PROXY_VALD_EXCEPTION exception

  The proxy details are not valid.

Type Detail

### proxy_info

    type proxy_info is record (
        id varchar2(32),
        host_name varchar2(2000),
        port_number number,
        default_proxy boolean
    )

  A record structure containing details of a proxy setting.

  This record is returned whenever information about proxies is requested, i.e. by the get_proxy, get_proxy_list and get_default_proxy functions.

  Note: For security reasons, this record does not contain authorization information but it does contain default proxy information.

  Fields:
    `id` - a unique identifier for the Proxy. This identifier is allocated by Oracle Portal.
    `host_name` - a name for the proxy host
    `port_number` - the port number of the proxy server
    `default_proxy` - indicates whether the proxy is to be used as the default proxy for all non-provider HTTP connections made by Portal
  Since:
    Oracle Portal 9.0.2

### proxy_info_tab

    type proxy_info_tab is table of proxy_info index by binary_integer

  A table structure containing a list of proxy_info records.

### proxy_record

    type proxy_record is record (
        id varchar2(32),
        host_name varchar2(2000),
        port_number number,
        username varchar2(200),
        password varchar2(4000),
        realm varchar2(4000)
    )

  A record structure containing proxy details.

  This record is used when adding/editing proxy settings, i.e. when using the add_proxy, edit_proxy and delete_proxy methods.

  Fields:
    `id` - a unique identifier for the Proxy. This identifier is allocated by Oracle Portal.
    `host_name` - a name for the proxy host. The format of the host name should be 'host.domain.com'. If 'http' or 'https' is included before the host name, it is removed.
    `port_number` - the port number of the proxy server
    `username` - username for connecting to the proxy, if the proxy is secure. Note that this field is not currently used.
    `password` - password for connecting to the proxy, if the proxy is secure. Note that this field is not currently used.
    `realm` - specifies the authorization space for the proxy. The value of this string is assigned by the proxy server. Note that this field is not currently used.
  Since:
    Oracle Portal 9.0.2

### proxy_record_tab

    type proxy_record_tab is table of proxy_record index by binary_integer

  A table structure containing a list of proxy records.

Constant Detail

### DEFAULT_PROXY_NO

    DEFAULT_PROXY_NO constant number := 0

  Indicates whether the proxy is to be used as the default proxy for all non-provider HTTP connections made by Portal. Administrators can choose one proxy as the default proxy. For internal use only.

### DEFAULT_PROXY_YES

    DEFAULT_PROXY_YES constant number := 1

  Indicates whether the proxy is to be used as the default proxy for all non-provider HTTP connections made by Portal. Administrators can choose one proxy as the default proxy. For internal use only.

Function/Procedure Detail

### add_proxy

    function add_proxy(
        p_proxy in proxy_record
    ) return varchar2

  Adds a proxy setting to Oracle Portal.

  Call this function to add a proxy setting to Oracle Portal. If specified, the port number of the proxy must be a valid integer. If not specified, it defaults to a value of 80.

  Note: Only Portal Administrators can use this function.

  Example:

         declare
             l_proxy_record wwctx_api_proxy.proxy_record;
             l_proxy_id varchar2(32);
         begin
             l_proxy_record.host_name := 'host.domain.com';
             l_proxy_record.port_number := 4000;
             l_proxy_id := wwctx_api_proxy.add_proxy
             (
                l_proxy_record
             );
         end;

  Parameters:
    `p_proxy` - the proxy record containing details about the proxy
  Returns:
    a unique proxy ID
  Exceptions:
    `wwsec_api.ACCESS_DENIED_EXCEPTION` - if security privileges are violated
    `PROXY_DUPLICATE_EXCEPTION` - if a proxy with the same host_name and port number exists
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### delete_proxy

    procedure delete_proxy(
        p_proxy_id in varchar2
    )

  Deletes a proxy setting from Oracle Portal, given a proxy ID.

  Note: Only Portal Administrators can execute this function.

  Parameters:
    `p_proxy_id` - the id of the proxy to be deleted
  Exceptions:
    `wwsec_api.ACCESS_DENIED_EXCEPTION` - if security privileges are violated
    `PROXY_NOT_FOUND_EXCEPTION` - if the proxy is not found
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### edit_proxy

    procedure edit_proxy(
        p_proxy in proxy_record
    )

  Updates proxy setting information in Oracle Portal.

  Call this procedure to edit properties of a proxy setting in Oracle Portal. If specified, the port number of the proxy must be a valid integer. If not specified, it defaults to a value of 80.

  Note: Only Portal Administrators can execute this function.

  Example:

         l_proxy_record wwctx_api_proxy.proxy_record;
         l_proxy_record.id := '8834567897456aaaaa45678898989456';
         l_proxy_record.host_name := 'host.domain.com';
         l_proxy_record.port_number := 5000;
         wwctx_api_proxy.edit_proxy(l_proxy_record);

  Parameters:
    `p_proxy` - the proxy record containing details about the proxy
  Exceptions:
    `wwsec_api.ACCESS_DENIED_EXCEPTION` - if security privileges are violated
    `PROXY_DUPLICATE_EXCEPTION` - if a proxy with the same host_name and port number exists
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### get_default_proxy

    function get_default_proxy
    return proxy_info

  Returns the default proxy, as specified in the proxy settings.

  Example:

         l_proxy_info wwctx_api_proxy.proxy_info;
         l_proxy_info := wwctx_api_proxy.get_default_proxy;

  Returns:
    a proxy_info record, containing information about the default proxy
  Exceptions:
    `PROXY_NOT_FOUND_EXCEPTION` - if the proxy is not found
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### get_noproxy_domain

    function get_noproxy_domain
    return varchar2

  Returns the list of domain names for which a proxy server is not used.

  Example:

         l_no_proxy varchar2;
         l_no_proxy := wwctx_api_proxy.get_noproxy_domain;

  Returns:
    a list of domain names for which a proxy server is not used
  Exceptions:
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### get_proxy

    function get_proxy(
        p_proxy_id in varchar2
    ) return proxy_info

  Returns information about a proxy, given a proxy ID.

  Call this function to return information about the proxy like the host name, port number and default proxy, given a proxy ID.

  Example:

         l_proxy_info wwctx_api_proxy.proxy_info;
         l_proxy_info := wwctx_api_proxy.get_proxy
         (
             p_proxy_id => '8834567897456aaaaa45678898989456'
         );

  Parameters:
    `p_proxy_id` - the ID of the proxy required
  Returns:
    a proxy_info record, containing information about the requested proxy
  Exceptions:
    `PROXY_NOT_FOUND_EXCEPTION` - if the proxy is not found
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### get_proxy_id

    function get_proxy_id(
        p_proxy_hostname in varchar2,
        p_proxy_portnumber in varchar2
    ) return varchar2

  Returns the ID of a proxy, given the proxy host name and port number.

  Example:

         l_proxy_id varchar2;
         l_proxy_id := wwctx_api_proxy.get_proxy_id
         (
             p_proxy_hostname => 'host.domain.com',
             p_proxy_portnumber => 4000
         );

  Parameters:
    `p_proxy_hostname` - the host name of the proxy required. The format of the host name should be ‘host.domain.com’. If ‘http’ or ‘https’ is included before the host name, it is removed.
    `p_proxy_portnumber` - the port number of the proxy required
  Returns:
    the ID of a requested proxy
  Exceptions:
    `PROXY_NOT_FOUND_EXCEPTION` - if the proxy is not found
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### get_proxy_list

    function get_proxy_list
    return proxy_info_tab

  Returns the list of proxies specified in the proxy settings.

  Example:

         l_proxy_tab wwctx_api_proxy.proxy_info_tab;
         l_proxy_tab := wwctx_api_proxy.get_proxy_list;

  Returns:
    the list of proxies specified in the proxy settings
  Exceptions:
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### is_proxy_used_by_providers

    function is_proxy_used_by_providers(
        p_proxy_id in varchar2
    ) return boolean

  Checks if a given proxy is used by any providers.

  Example:

         l_is_used Boolean;
         l_is_used := wwctx_api_proxy.is_proxy_used_by_providers
         (
             p_proxy_id => '8834567897456aaaaa45678898989456'
         );

  Parameters:
    `p_proxy_id` - the id of the proxy required
  Returns:
    true if the proxy is used by any providers and false if it is not
  Exceptions:
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### set_default_proxy

    procedure set_default_proxy(
        p_proxy_id in varchar2
    )

  Sets a proxy to be the default proxy.

  The default proxy is used for all non-provider HTTP connections made by Portal. Administrators can choose one proxy as the # default proxy.

  Note: The existing default proxy is updated such that it is no longer the default proxy, i.e. the current default setting is overwritten.

  Example:

         wwctx_api_proxy.set_default_proxy
         (
             p_proxy_id => '83456ABCD09783465384'
         );

  Parameters:
    `p_proxy_id` - the ID of the new, default proxy
  Exceptions:
    `wwsec_api.ACCESS_DENIED_EXCEPTION` - if security privileges are violated
    `PROXY_NOT_FOUND_EXCEPTION` - if the proxy is not found
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

### set_noproxy_domain

    procedure set_noproxy_domain(
        p_noproxy_domain in varchar2
    )

  Sets the 'No Proxy' server domains.

  Note: Proxy servers will not be used when connecting to these domains.

  Example:

         wwctx_api_proxy.set_noproxy_domain
         (
             p_noproxy_domain => '.domain1.company.com, .domain2.company.com'
         );

  Exceptions:
    `PROXY_GENERAL_EXCEPTION` - if an unknown error occurs
  Since:
    Oracle Portal 9.0.2

Overview | Package | Object Type | Deprecated | Index | Help
| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE