is_portlet_runnable function

Contained in package wwpro_api_provider.

Call this function to perform a security check for a portlet, i.e. whether or not it can be run. It may be called in two different situations:

  • When the reference_path field in the portlet_instance_record is null, is_portlet_runnable checks if a user can view a portlet in the Portlet Repository.
  • When the reference_path field in the portlet_instance_record is not null, is_portlet_runnable is called for a portlet instance. This is the case when a portlet is displayed on a page. The call is made by the show_portlet method in MODE_SHOW.

Notes:

  • The portlet may use the context package wwctx_api to get the current user, then determine if the user can execute the portlet using a portlet-specific security mechanism.
  • Oracle Portal may call this function to determine if links, menus, and other visual cues for the specified portlet instance should be displayed.

function is_portlet_runnable

(

p_portlet_instance in portlet_instance record

)

return boolean;

Any user can use this function.

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_portlet_
instance

A record containing properties of a portlet instance.

Datatype: in portlet_instance record

Returns:

This function returns TRUE if the portlet can be run or viewed. Otherwise, it returns FALSE.

Exceptions:

  • If invalid information about the provider is returned, a PROVIDER_VALIDATION_EXCEPTION is raised.

  • If the provider cannot be located, a PROVIDER_NOT_FOUND_EXCEPTION is raised.
  • If the provider cannot be executed, a PROVIDER_EXECUTION_EXCEPTION is raised.
  • If the provider has given invalid information about the portlet, a PORTLET_VALIDATION_EXCEPTION is raised.
  • If the portlet does not allow the user to run it, a PORTLET_SECURITY_EXCEPTION is raised.
  • If there is a generic problem with the portlet that prevents the portlet from being executed, a PORTLET_EXECUTION_EXCEPTION is raised.

Examples:

Calling code:

can_run := wwpro_api_provider.is_portlet_runnable

(

p_portlet_instance => l_portlet_instance

);

Call to the provider:

can_run := example_provider.is_portlet_runnable

(

p_portlet_instance => portlet_instance_rec

);

Note

A portlet instance is the display of a portlet on a single page. The same portlet may be displayed multiple times on the same page. Each time a portlet is added to a page, Oracle Portal generates a unique portlet instance ID that is the instance's reference path.

Related topics

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