Oracle Application Server Portal PL/SQL API Reference - 904

Package wwpro_api_progrp_registry

This package contains methods that are used by the portlet provider administration UI and by developers to register provider groups and perform other related tasks:

A provider group is a collection of portlet providers that is defined by a remote provider groups service.

Provider groups often define a group of providers that share a common feature, such as belonging to the same organization, or providing similar content or function.

Note: A provider group only contains Web or database providers that are accessed via the Federated Portal Adapter.

A Portal Administrator can register a provider group for use with their portal. Once registered, the provider group simplifies the process of registering the providers in the group.

Scope:
Public
Since:
Oracle Portal 9.0.2


Exception Summary
PROGRP_MODIFICATION_EXCEPTION
An error occurred while updating provider group details.
PROGRP_NOT_FOUND_EXCEPTION
The specified provider group cannot be found.
PROGRP_REGISTRATION_EXCEPTION
An error occurred during provider group registration.
PROGRP_SECURITY_EXCEPTION
Insufficient privileges while trying to access a provider group.
PROGRP_SERVER_EXCEPTION
An error occurred whilst obtaining details of providers from the provider group server.

Type Summary
provider_group_record
A record type whose instances represent a single provider group.
 record
provider_group_table
A table of provider group records.
 table

Variable Summary
g_providers
For internal use only.
 wwpro_api_provider_registry.provider_table

Function/Procedure Summary
edit
Updates the properties of a selected provider group.
 
find
Finds a provider group, given an ID and returns a corresponding provider_group_record.
 provider_group_record
find
Finds a provider group, given a name and returns a corresponding provider_group_record.
 provider_group_record
get_provider_group_list
Obtains a list of provider groups.
 provider_group_table
get_providers
Returns a list of providers defined in a particular provider group.
 wwpro_api_provider_registry.provider_table
register
Registers a provider group for use with Oracle Portal.
 varchar2
register_provider
Registers a provider using registration metadata provided by a provider group service.
 
remove
Deletes a selected provider group.
 

Exception Detail

PROGRP_MODIFICATION_EXCEPTION

PROGRP_MODIFICATION_EXCEPTION exception
An error occurred while updating provider group details.

PROGRP_NOT_FOUND_EXCEPTION

PROGRP_NOT_FOUND_EXCEPTION exception
The specified provider group cannot be found.

PROGRP_REGISTRATION_EXCEPTION

PROGRP_REGISTRATION_EXCEPTION exception
An error occurred during provider group registration.

PROGRP_SECURITY_EXCEPTION

PROGRP_SECURITY_EXCEPTION exception
Insufficient privileges while trying to access a provider group.

PROGRP_SERVER_EXCEPTION

PROGRP_SERVER_EXCEPTION exception
An error occurred whilst obtaining details of providers from the provider group server.

Type Detail

provider_group_record

type provider_group_record is record (
    id varchar2(32),
    name varchar2(200),
    display_name varchar2(2000),
    location varchar2(4000),
    last_updated date
)
A record type whose instances represent a single provider group.
Fields:
id - the provider group's ID as registered with Oracle Portal. This is typically a GUID.
name - the name of the provider group. Required to be unique within Oracle Portal.
display_name - the translatable display name of the provider group
location - the HTTP URL that defines the location of the provider group
last_updated - the date when the provider group definition was last updated
Since:
Oracle Portal 9.0.2

provider_group_table

type provider_group_table is table of provider_group_record
A table of provider group records.

Variable Detail

g_providers

g_providers wwpro_api_provider_registry.provider_table
For internal use only.

Function/Procedure Detail

edit

procedure edit(
    p_provider_group in provider_group_record
) 
Updates the properties of a selected provider group.

Example

  declare
   l_provider_grp wwpro_api_progrp_registry.provider_group_record;
  begin
   l_provider_grp.id            := '8C307B34BC44211FE034080020F7DA4B';
   l_provider_grp.name          := 'MyNewProgrp';
   l_provider_grp.display_name  := 'A better display name';
   l_provider_grp.location      := 'http://my.progrps.com/progrp02';
   wwpro_api_progrp_registry.edit
   (
       p_provider_group => l_provider_grp
   );
  end;
 
Parameters:
p_provider_group - a provider_group_record, where the ID field identifies the provider group to be updated and the name, display name, and location fields contain updated provider group details
Exceptions:
PROGRP_SECURITY_EXCEPTION - if the Portal user executing this function does not have All Provider Manage or All Provider Publish rights
PROGRP_MODIFICATION_EXCEPTION - if the new provider group name is not unique within the portal
Since:
Oracle Portal 9.0.2

find

function find(
    p_provider_group_id in varchar2,
    p_language in varchar2 default null
) return provider_group_record
Finds a provider group, given an ID and returns a corresponding provider_group_record.

Note: The translatable text in the provider group record is in the langage specified by the p_language argument.

Example

  begin
   wwpro_api_progrp_registry.find
   (
     p_provider_group_id => '8C307B34BC44211FE034080020F7DA4B',
     p_language          => wwnls_api.FRENCH
   )
  end;
 
Parameters:
p_provider_group_id - the ID of the provider group to find
p_language - the NLS language to be used when translating the display name of the provider group. For example, wwnls_api.FRENCH.
Returns:
the provider group record corresponding to the given ID, (p_provider_group_id)
Exceptions:
PROGRP_NOT_FOUND_EXCEPTION - if the provider group cannot be found
Since:
Oracle Portal 9.0.2

find

function find(
    p_name in varchar2,
    p_language in varchar2 default null
) return provider_group_record
Finds a provider group, given a name and returns a corresponding provider_group_record.

Note: The translatable text in the provider group record is in the langage specified by the p_language argument.

Example

  begin
   wwpro_api_progrp_registry.find
   (
     p_name       => 'MyProgrp',
     p_language   => wwnls_api.FINNISH
   )
  end;
 
Parameters:
p_name - the name of the provider group to find
p_language - the NLS language to be used when translating the display name of the provider group. For example, wwnls_api.FRENCH.
Returns:
the provider group record corresponding to the given name (p_name)
Exceptions:
PROGRP_NOT_FOUND_EXCEPTION - if the provider group cannot be found

get_provider_group_list

function get_provider_group_list(
    p_name in varchar2 default '%',
    p_language in varchar2 default null,
    p_start_row in integer default 1,
    p_row_count in integer default 20
) return provider_group_table
Obtains a list of provider groups.

The provider_group_table returned contains provider_group_records that have a 'name' that match the pattern specified in the p_name argument. The 'display_name' in the provider_group_records are translated into the language given in the p_language argument.

If required, the number of records returned can be restricted by specifying the p_start_row and p_row_count arguments.

Note: If no provider groups match the criteria specified, an empty provider_group_table is returned.

Example

  begin
   wwpro_api_progrp_registry.get_provider_group_list
   (
     p_name => 'ProviderGroup0%'
   )
  end;
 
Parameters:
p_name - the pattern to match against provider group names
p_language - the NLS language to be used for any translatable text in the provider group records that are returned
p_start_row - the first record to retrieve
p_row_count - the number of records to retrieve
Returns:
a provider_group_table of provider_group_records that match the criteria specified
Since:
Oracle Portal 9.0.2

get_providers

function get_providers(
    p_provider_group in provider_group_record
) return wwpro_api_provider_registry.provider_table
Returns a list of providers defined in a particular provider group.

The location field of the provider_group_record specifies the URL for the provider group location.

Example

  declare
   l_provider_grp wwpro_api_progrp_registry.provider_group_record;
  begin
   l_provider_grp.location  := 'http://my.progrps.com/progrp01';
   l_provider_grp.name      := 'MyProgrp';
   wwpro_api_progrp_registry.get_providers
   (
       p_provider_group => l_provider_grp
   );
  end;
 
Parameters:
p_provider_group - identifies the provider group, a provider_group_record with the location and name fields populated
Returns:
a table of provider records describing the providers that are available for the specified provider group
Exceptions:
PROGRP_SERVER_EXCEPTION - if an error occurs whilst getting details of providers
Since:
Oracle Portal 9.0.2

register

function register(
    p_provider_group in provider_group_record,
    p_create_flag in boolean default false
) return varchar2
Registers a provider group for use with Oracle Portal.

The name field of the specified provider_group_record must be the same as the name used to identify the provider group on the server. The location field of the provider_group_record specifies the URL for the provider group location.

Example

  declare
   l_provider_grp  wwpro_api_progrp_registry.provider_group_record;
   l_id            varchar2(32);
  begin
   l_provider_grp.name      := 'SomeProviderGroup';
   l_provider_grp.location  := 'http://my.progrps.com/progrp01';
   l_id := wwpro_api_progrp_registry.register
   (
       p_provider_group => l_provider_grp
   );
  end;
 
Parameters:
p_provider_group - identifies the provider group, a provider_group_record with the location and name fields populated
p_create_flag - for internal use only
Returns:
the ID of the newly registered provider group
Exceptions:
PROGRP_SECURITY_EXCEPTION - if the Portal user executing this function does not have All Provider Manage or All Provider Publish rights
PROGRP_REGISTRATION_EXCEPTION - if an error occurs while trying to register the provider group or the provider group definition is already registered
Since:
Oracle Portal 9.0.2

register_provider

procedure register_provider(
    p_provider_group in provider_group_record,
    p_provider_name in varchar2
) 
Registers a provider using registration metadata provided by a provider group service.

Translated strings and the external application associated with the provider (if one exists) are also registered.

Example

  declare
   l_provider_grp  wwpro_api_progrp_registry.provider_group_record;
   l_provider_name varchar2(200);
  begin
   l_provider_grp.location  := 'http://my.progrps.com/progrp01';
   l_provider_grp.name      := 'MyProgrp';
   l_provider_name          := 'Provider01';
   wwpro_api_progrp_registry.register_provider
   (
       p_provider_group => l_provider_grp,
       p_provider_name  => l_provider_name
    );
  end;
 
Parameters:
p_provider_group - identifies the provider group, a provider_group_record with the location and name fields populated
p_provider_name - the name of the provider to be registered
Since:
Oracle Portal 9.0.2

remove

procedure remove(
    p_provider_group_id in varchar2
) 
Deletes a selected provider group.

Note: Any providers associated with the provider group are not de-registered.

Example

  begin
   wwpro_api_progrp_registry.remove
   (
       p_provider_group_id => '8C307B34BC44211FE034080020F7DA4B'
    );
  end;
 
Parameters:
p_provider_group_id - the ID of the provider group to delete
Exceptions:
PROGRP_SECURITY_EXCEPTION - if the Portal user executing this function does not have All Provider Manage or All Provider Publish rights
Since:
Oracle Portal 9.0.2

Oracle Application Server Portal PL/SQL API Reference - 904