register_provider function

Contained in package wwpro_api_provider_registry.

Call this function to register a portlet provider with Oracle Portal and return the provider's ID.

When a provider is added to the provider repository, its associated portlets are also added to the portlet repository.

Note: If a timeout message ID passed into the provider record is null but the message field has a value, the value is used as the timeout message.

When this API is executed as the Portal schema owner, the Portal user is assumed to be the Portal schema owner who has the necessary privileges to register a provider. However, when the API is executed in a provider schema the Portal user is assumed to be PUBLIC and does not have the necessary privileges to register a provider. In this case, you must first call wwctx_api.set_context to establish an authenticated session within the current SQLPLUS session. You must provide a valid username/password as authentication takes place with the Single Sign-On Server.

function register_provider

  (

p_provider_rec in provider_record

   )
return integer;

A user must have the All Provider Manage or All Provider Publish privilege to register the provider.

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_provider_rec

The record for the provider to be registered.

Datatype: in provider_record

Returns:

This function returns a provider ID and stores the timeout message string in the NLS subsystem in the specified language.

Exceptions:

  • If implementation_style is not wwpro_api_provider_registry.PLSQL_IMPL, wwpro_api_provider_registry.DATABASE_IMPL, wwpro_api_provider_registry.HTTP_IMPL or wwpro_api_provider_registry.WEB_IMPL, PROVIDER_VALIDATION_EXCEPTION is raised.
  • If the implementation style is PLSQL_IMPL and the implementation_owner is not a valid database user, PROVIDER_VALIDATION_EXCEPTION is raised.
  • If the implementation style is PLSQL_IMPL and the implementation_name is not the name of a database package in the implementation_owner schema, PROVIDER_VALIDATION_EXCEPTION is raised.
  • If the status of the implementation package is invalid, PROVIDER_VALIDATION_EXCEPTION is raised.
  • If the user does not have the appropriate privilege to register a provider, wpro_api_provider.PROVIDER_SECURITY_EXCEPTION is raised.
  • If the passed values fail validation or if an unexpected error occurs, wpro_api_provider.PROVIDER_VALIDATION_EXCEPTION is raised. Query the error stack to determine why the validation failed.
  • If an unexpected error occurs while calling the providers registration method, wwpro_api_provider.PROVIDER_CALLREG_EXCEPTION is raised.
  • If an unexpected error occurs while attempting to register the provider, wwpro_api_provider.PROVIDER_REGISTRTN_EXCEPTION is raised.

Example:

declare
  l_provider_id integer;
  l_provider_rec wwpro_api_provider_registry.provider_record;

begin
  l_provider_rec.name := 'Portal Provider';
  l_provider_rec.node_id := null;
  l_provider_rec.timeout := 1 ;
  l_provider_rec.timeout_msg := 'This is component took too long to execute';
  l_provider_rec.implementation_style := wwpro_api_provider_registry.PLSQL_IMPL;
  l_provider_rec.implementation_owner  := PORTAL;
  l_provider_rec.implementation_name := 'PORTAL_DEMO_PROVIDER';
  l_provider.language := wwnls_api.AMERICAN;
  l_provider_rec.enable_distribution   := wwpro_api_provider_registry.ENABLE_DISTRIBUTION_NO;
  l_provider_rec.login_frequency := wwpro_api_provider_registry.LOGIN_FREQUENCY_ALWAYS;

  l_provider_id  := wwpro_api_provider_registry.register_provider
  (p_provider_rec => l_provider_rec);

  wwpro_api_provider_registry.print_provider(
  l_provider_id,wwnls_api.AMERICAN);
end;

Note

You can determine the current language settings with the wwnls_api.get_language function.

Implementation Name and Implementation Owner are only valid for PL/SQL implementations.

HTTP URL, Require Proxy, HTTP Application Type, Provider Key, Encryption Key and HTTP Application ID are only valid for HTTP implementations.

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio