| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains procedures and functions to register, edit, and retrieve providers.
Database providers can be implemented as PL/SQL packages. The packages need a specific set of procedures and functions in their implementation. The name of the package is flexible since the framework uses the physical implementation name that is specified during provider registration.
To create a database provider:
A portlet is an entity that can produce output in HTML or XML/XSL. Portlets form the fundamental building blocks of a portal page. Each portal page consists of content presented through one or more portlets and links that allow the user to navigate to another page to take some action.
Portlets communicate with the portal through an entity called a provider. The provider ID uniquely identifies a provider with the portal. The portlet ID uniquely identifies the portlet within the provider. It is the responsibility of the provider to ensure that each portlet has a unique portlet ID. It is only the combination of provider ID and portlet ID that uniquely identifies a particular portlet.
| Exception Summary | |
ADD_PORTLET_EXCEPTION | |
DELETE_PORTLET_EXCEPTION | |
NODE_NOTCOMMONSSO_EXCEPTION | |
PORTLET_EXECUTION_EXCEPTION | |
PORTLET_GENERAL_EXCEPTION | |
PORTLET_NOT_FOUND_EXCEPTION | |
PORTLET_OFFLINE_EXCEPTION | |
PORTLET_PARAMETER_EXCEPTION | |
PORTLET_SECURITY_EXCEPTION | |
PORTLET_VALIDATION_EXCEPTION | |
PROVIDER_CALLAPIV_EXCEPTION | |
PROVIDER_CALLDEREG_EXCEPTION | |
PROVIDER_CALLREG_EXCEPTION | |
PROVIDER_EXECUTION_EXCEPTION | |
PROVIDER_NOT_FOUND_EXCEPTION | |
PROVIDER_NOT_LOCAL_EXCEPTION | |
PROVIDER_NOTDELETE_EXCEPTION | |
PROVIDER_REGISTRTN_EXCEPTION | |
PROVIDER_REMOVAL_EXCEPTION | |
PROVIDER_RETRIEVAL_EXCEPTION | |
PROVIDER_SECURITY_EXCEPTION | |
PROVIDER_VALIDATION_EXCEPTION | |
REFRESH_REPOSITORY_EXCEPTION | |
| Type Summary | |
cookie_record | record |
cookie_table | table |
copy_portlet_record | record |
portlet_instance_record | record |
portlet_parameter_record | record |
portlet_parameter_table | table |
portlet_record | record |
portlet_runtime_record | record |
portlet_table | table |
| Constant Summary | |
API_VERSION | integer |
API_VERSION_1 | integer |
CACHE_LEVEL_FIRST | number |
CACHE_LEVEL_LAST | number |
CACHE_LEVEL_PTL_SESSION | number |
CACHE_LEVEL_SYSTEM | number |
CACHE_LEVEL_USER | number |
CONTENT_TYPE_HTML | integer |
CONTENT_TYPE_MOBILE | integer |
CONTENT_TYPE_XML | integer |
COOKIE_DELIMITER | varchar2(10) |
COOKIE_NAME_CONTENT_DELIMITER | varchar2(10) |
CURRENCY_TYPE | varchar2(8) |
DATE_TYPE | varchar2(4) |
EXTERNAL_PORTLET | integer |
INTEGER_TYPE | varchar2(7) |
LIST_COMPONENT | integer |
LIST_PORTLET | integer |
MODE_LINK | integer |
MODE_PREVIEW | integer |
MODE_SHOW | integer |
MODE_SHOW_ABOUT | integer |
MODE_SHOW_DETAILS | integer |
MODE_SHOW_EDIT | integer |
MODE_SHOW_EDIT_DEFAULTS | integer |
MODE_SHOW_HELP | integer |
NO_INVALIDATION | integer |
NUMBER_TYPE | varchar2(6) |
PORTLET_PARM_DATAITEM | varchar2(8) |
PORTLET_PARM_DISPLAY | varchar2(11) |
PORTLET_PARM_PARAMETER | varchar2(9) |
STRING_TYPE | varchar2(6) |
USE_INVALIDATION | integer |
| Function/Procedure Summary | |
copy_portlet | |
deregister_portlet | |
deregister_provider | |
describe_portlet_parameters | portlet_parameter_table |
do_login | |
get_api_version | integer |
get_portlet | portlet_record |
get_portlet_list | portlet_table |
is_portlet_runnable | boolean |
register_portlet | |
register_provider | |
show_portlet | |
| Exception Detail |
ADD_PORTLET_EXCEPTION exception
DELETE_PORTLET_EXCEPTION exception
NODE_NOTCOMMONSSO_EXCEPTION exception
PORTLET_EXECUTION_EXCEPTION exception
PORTLET_GENERAL_EXCEPTION exception
PORTLET_NOT_FOUND_EXCEPTION exception
PORTLET_OFFLINE_EXCEPTION exception
PORTLET_PARAMETER_EXCEPTION exception
PORTLET_SECURITY_EXCEPTION exception
PORTLET_VALIDATION_EXCEPTION exception
PROVIDER_CALLAPIV_EXCEPTION exception
PROVIDER_CALLDEREG_EXCEPTION exception
PROVIDER_CALLREG_EXCEPTION exception
PROVIDER_EXECUTION_EXCEPTION exception
PROVIDER_NOT_FOUND_EXCEPTION exception
PROVIDER_NOT_LOCAL_EXCEPTION exception
PROVIDER_NOTDELETE_EXCEPTION exception
PROVIDER_REGISTRTN_EXCEPTION exception
PROVIDER_REMOVAL_EXCEPTION exception
PROVIDER_RETRIEVAL_EXCEPTION exception
PROVIDER_SECURITY_EXCEPTION exception
PROVIDER_VALIDATION_EXCEPTION exception
REFRESH_REPOSITORY_EXCEPTION exception
| Type Detail |
type cookie_record is record (
cookie_name varchar2(4096),
cookie_content varchar2(4096),
cookie_domain varchar2(200),
cookie_path varchar2(200),
cookie_expires date,
cookie_update boolean,
provider_id integer
)
A cookie is a set of data that a Web site sends to a browser when a user visits the site.
cookie_name - the name of the cookiecookie_content - the value or content of the cookiecookie_domain - the domain for which the cookie was createdcookie_path - the URL path within which the cookie is validcookie_expires - the date and time that the cookie expirescookie_update - for internal use onlyprovider_id - for internal use onlytype cookie_table is table of cookie_record index by binary_integer
type copy_portlet_record is record (
provider_id number,
portlet_id number,
srcreferencepath varchar2(100),
dstreferencepath varchar2(100)
)
provider_id - a unique identifier used to locate the providerportlet_id - a unique identifier used to locate the portlet in
the provider domainsrcReferencePath - the portlet instance ID that identifies the
source portlet instance. It is the unique
reference for a portlet in a page. This
parameter can be used to retrieve
instance-specific information for the portlet.dstReferencePath - the portlet instance ID that identifies the
destination portlet instance. It is the unique
reference for a portlet placed in a page. This
parameter can be used to store
instance-specific information for the portlet.
type portlet_instance_record is record (
provider_id number,
portlet_id number,
reference_path varchar2(100),
page_type varchar2(200)
)
A portlet_instance_record structure is passed into these provider implementation procedures:
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, OracleAS Portal 10G generates a unique portlet instance ID that is the instance's reference path.
provider_id - a unique identifier used to locate the providerportlet_id - a unique identifier used to locate the
portlet in the provider domainreference_path - identifies the portlet instance being called.
The portlet reference path specifies a unique
identifier for a portlet instance on a page.
This parameter can be used to store and retrieve
instance specific information for the portlet.page_type - for internal use only
type portlet_parameter_record is record (
name varchar2(30),
datatype varchar2(30) default STRING_TYPE,
usage_type varchar2(30) default PORTLET_PARM_PARAMETER,
description varchar2(200),
display_name varchar2(80),
language varchar2(30)
)
name - the portlet parameter namedatatype - one of five data type constants:
usage_type - an indicator for the intended use of the parameter.
description - a short description for the parameterdisplay_name - a name/title for the parameter to be displayed in the
UIlanguage - the language in which the portlet instance is called,
for example, 'AMERICAN'type portlet_parameter_table is table of portlet_parameter_record index by binary_integer
type portlet_record is record (
id integer,
provider_id integer,
name varchar2(240),
title varchar2(200),
short_title varchar2(80),
description varchar2(200),
image_url varchar2(1024),
thumbnail_image_url varchar2(1024),
help_url varchar2(1024),
timeout integer,
timeout_msg varchar2(200),
implementation_style integer,
implementation_owner varchar2(2000),
implementation_name varchar2(2000),
content_type integer,
api_version integer,
has_show_edit boolean,
has_show_edit_defaults boolean,
has_show_preview boolean,
call_is_runnable boolean,
call_get_portlet boolean,
accept_content_type varchar2(2000),
has_show_link_mode boolean,
mobile_only boolean,
show_behaviour_style integer,
language varchar2(30),
preference_store_path varchar2(2000),
created_on date,
created_by varchar2(256),
last_updated_on date,
last_updated_by varchar2(256),
pass_all_url_params boolean,
cache_level integer,
rewrite_urls boolean
)
This contains all of the details of the portlet and, for the NLS property timeout_msg, it includes both the NLS IDs and the actual translated strings (in the language requested).
A portlet provider is required to return a portlet_record or a portlet_table when either get_portlet or get_portlet_list is called.
The provider should fill in this structure with the details of portlet. Note that the provider_id parameter will be filled in by the framework during registration.
id - a unique identifier used to locate the portlet in
the provider domain. A null value is not permitted.provider_id - the ID of the provider that implements the portletname - a unique identifier used to locate the portlet in
the provider domain. The name should not contain any
spaces. A null value is not permitted.title - the title string displayed when the portlet is
displayed. This is the same as the title returned
when the list of portlets is requested. The
description returned is responsive to the language
parameter used when obtaining the
wwpro_api_provider.portlet_record. A null value is
not permitted.short_title - a shorter version of the title (above). A maximum of
80 characters is allowed. If this parameter is not
set the long title is used instead. This field is
available with Oracle9iAS Portal version 9.0.2 or
later.description - a short description of the portlet. This description
is sensitive to the language parameter used when
obtaining the wwpro_api_provider.portlet_record. This
description may be used when a list of portlets is
requested. A null value is not permitted.image_url - this field is not used by Oracle Portal 3.0 or laterhelp_url - this field is not used by Oracle Portal 3.0 or laterthumbnail_image_url - this field is not used by Oracle Portal 3.0
or latertimeout - the number of seconds that should be spent attempting
to execute the portlet before a timeout operation
occurs. This property is only used when the portlet
is executed directly inside OracleAS Portal 10G. A
null value indicates to use the timeout value of the
provider.timeout_msg - the message string to be presented when an execution
timeout occurs. The timeout message may not contain
mobile (mobileMXL) or desktop (HTML) markup. A null
value indicates that the timeout message of the
provider should be used.implementation_style - this field is not used by Oracle Portal 3.0
or laterimplementation_owner - this field is not used by Oracle Portal 3.0
or laterimplementation_name - this field is not used by Oracle Portal 3.0
or latercontent_type - the type of data the portlet produces, i.e. one of:
api_version - the version of the API to which the portlet conforms.
At present , this value must be
wwpro_api_provider.API_VERSION_1.has_show_edit - indicates if the portlet implements an Edit
(or Customize) page. See show_portlet
procedure.has_show_edit_defaults - indicates if the portlet implements an Edit
Defaults page that can be used by
administrators to establish default display
options for all users. See show_portlet
procedure.has_show_preview - indicates if the portlet implements a
Preview portlet, i.e. one that can be viewed
from the Add Portlet screen and the Portlet
Repository. See show_portlet procedure.
This field is available with Oracle Portal
version 3.0.9 or later.call_is_runnable - indicates whether the portal must make calls
to the provider's is_portlet_runnable
function for the portlet. The provider's
is_portlet_runnable function is called prior
to displaying a portlet in the Portlet
Repository. For a public portlet this
function will always return true so there is
no need to contact the provider. In this case
the provider should set the value for
call_is_runnable to false so that the
provider's is_portlet_runnable function is
not called. The default for this flag is
true. This field is available with Oracle
Portal version 3.0.9 or later.call_get_portlet - indicates whether the portal can use the
portlet record data stored in the Portlet
Metadata Repository (PMR) instead of
contacting the provider for the portlet
record. If the portlet record (specified by
provider id, portlet id, and language)
returned by a provider does not change, then
the provider should set the value for
call_get_portlet to false. This tells the
portal to use the PMR instead of making
calls to the provider's get_portlet and
get_portlet_list functions. An example of
when a provider would not want the portal to
use portlet metadata from the PMR, is when
the value of the portlet records is
different for logged on users. The default
for this flag is true. This field is
available with Oracle Portal version 3.0.9
or later.accept_content_type - this is a comma delimited list of
content_types whose values are the types of
content that the portlet produces. For
example, if a portlet can produce both HTML
and MOBILEXML the string would be:
'text/html,text/vnd.oracle.mobilexml'. This
field is available with Oracle Portal
version 3.0.9 or later.has_show_link_mode - this portlet implements show Link mode.
If the value is FALSE, the portlet uses its
short or full title to display a link label
that references the portlet content in a
mobile device. Otherwise, a customized link
can be generated in the portlet code.
Portal version 3.0.9 or later.mobile_only - indicates whether the portlet is available
only to mobile devices. If set to true, the
portlet is only available for mobile
devices, i.e. it cannot be added to standard
Web pages. If set to false (default) the
portlet can be displayed on both Web pages
and mobile devices (if the portlet can
produce at least mobilexml). This
field is available with Oracle9iAS Portal
version 9.0.2 or later.show_behaviour_style - set to one of the SHOW behavior style
constants. Currently, the only one defined
is EXTERNAL_PORTLET. When set to
EXTERNAL_PORTLET (1) this indicates that the
mobile portlet's SHOW mode links outside of
OracleAS Portal 10G, to a different
location.
This can be used in mobile devices for
existing OracleiAS Wireless applications
that have not been fully converted to
portlets. Only the LINK mode needs to be
implemented,
specifying the URL for the actual portlet
content without going via OracleAS Portal
10G. Although this is not recommended, it
does allow current OracleAS Wireless 10G
applications to be integrated with Oracle
Portal with minimum effort. Normally this
parameter is set to 0 to indicate normal
operation, i.e. that the mobile portlet has
a SHOW mode. This field is available with
Oracle9iAS Portal version 9.0.2 or later.language - the language in which the strings are
returned. A null value is not permitted.preference_store_path - the base preference store path where the
provider has stored the portlet
customization information. This path is used
when exporting portlets. When exporting a
page, the reference path for the portlet is
appended to the preference_store_path to
reconstruct the preference path for portlet
customizations. If the value of this field
is null, no preference store data is
exported.created_on - the date the record was createdcreated_by - the user who created the recordlast_updated_on - the most recent date the record was changedlast_updated_by - the user who most recently changed the
recordpass_all_url_params - indicates parameter passing behavior in the
portlet. If true, the portlet passes all
parameters on the URL to the portlet (as per
Oracle Portal 3.0.9). If false, the portlet
is only passed parameters intended for that
portlet. This is the default behavior in
Oracle9iAS Portal 9.0.2 (V2 PDK-Java). The
default value for database providers is
true, since there is no V2 provider API.
This field is available with Oracle9iAS
Portal version 9.0.2 or later.cache_level - indicates a portlet's cache level, one
of the values
null,
wwpro_portlet_metadata.CACHE_LEVEL_SYSTEM,
wwpro_portlet_metadata.CACHE_LEVEL_USER,
wwpro_portlet_metadata.CACHE_LEVEL_PTL_SESSIONrewrite_urls - indicates whether or not URL rewriting will
be performed on the output from a portlet
render request
type portlet_runtime_record is record (
portlet_id number,
provider_id number,
node_id number,
reference_path varchar2(100),
language varchar2(30),
exec_mode number,
back_page_url varchar2(32767),
page_url varchar2(32767),
refresh_url varchar2(32767),
page_type varchar2(200),
has_title_region boolean,
has_border boolean,
has_details boolean,
has_edit boolean,
has_help boolean,
has_about boolean,
has_remove boolean,
has_collapse boolean,
is_collapsed boolean,
portlet_template varchar2(32767),
caching_key varchar2(55),
caching_level varchar2(30),
caching_period number,
caching_invalidation number
)
A portlet_runtime_record structure is passed to the show_portlet procedure of provider implementations.
The provider should set the values for caching_key, caching_period, caching_level and caching_invalidation in the show_portlet procedure if caching is enabled for the portlet.
For the Shared Screen show mode in which the portlet shares the the portal page with other portlets, you should use page_url to return to the page from which you came and back_page_url is unnecessary in most cases. For customize, edit defaults, help, and about... modes, you should use page_url to redraw the customize, edit defaults, help, or about... pages and back_page_url to return to the page from which you came.
portlet_id - a unique identifier used to locate the portlet
in the provider domainprovider_id - a unique identifier used to locate the providernode_id - the provider's host node IDreference_path - the unique path (portlet instance ID) used to
identify a portlet instance. This path
information is used to store and retrieve
instance-specific information for the portlet.language - the language in which the portlet instance is
called, for example, 'AMERICAN'exec_mode - the mode in which the portlet is executedback_page_url - the URL for the calling page. The value stored
in this field is used by portlets to redirect
users back to the calling page. The value can be
null if there is no calling URL.page_url - the URL of the page containing the portlet
instance that will receive the
portlet_runtime_record.refresh_url - the URL for the calling page. The page is
reloaded/built from the database, rather than
from cache. This field is available with
Oracle9iAS Portal 9.0.2 or later.page_type - no longer usedhas_title_region - determines whether a header is displayed for the
portlet as a linkhas_border - determines whether a border is displayed around
the portlethas_details - determines whether a title is drawn as a link
for the portlet. The portlet eventually passes
this to the header rendering routine by passing
the entire portlet_runtime_record. This field is
available with Oracle9iAS Portal 9.0.2 or
later.has_edit - determines whether a Customize link is displayed
for the portlethas_help - determines whether a Help link is displayed for
the portlethas_about - determines whether an About link is displayed
for the portlethas_remove - determines whether a Remove icon is displayed
for the portlet. This field is available with
Oracle9iAS Portal 9.0.2 or later.has_collapse - determines whether a Collapse/Restore link is
displayed for the portlet. This field is
available with Oracle9iAS Portal version
9.0.2 or later.is_collapsed - indicates whether the portlet content is
collapsed. This field is available with
Oracle9iAS Portal 9.0.2 or later.portlet_template - a string, representing the HTML to render the
portlet's custom header and footer. The format
is as follows:caching_key - a unique ID (set by the portlet) to indicate
when the portlet content changes so the cache
can be updated. For example, if the portlet has
a version number and its content changes only
between versions, then the version number could
be included in the key. The mod_plsql uses
the complete URL to determine the cache hit,
therefore the caching key should not contain any
values contained in the URL as part of its
argument.caching_level - indicates the level of caching that the portlet
implements: SYSTEM or USER. It is set by the
portlet and used for both caching by key and
expiration based caching. With system-level
caching, mod_plsql checks only the URL and
the language setting for a cache hit. With
user-level caching, mod_plsql checks the
URL, language and user ID for a cache hit.caching_period - the time in minutes before the cache expires.
The value zero (0) indicates that the portlet
should never be cached. If caching_period is
specified, caching_key is ignored.caching_invalidation - determines whether Web cache is used for
invalidation. This field is available with
Oracle9iAS Portal 9.0.2 or later.type portlet_table is table of portlet_record index by binary_integer
| Constant Detail |
API_VERSION constant integer := API_VERSION_1
API_VERSION_1 constant integer := 1
CACHE_LEVEL_FIRST constant number := 0
CACHE_LEVEL_LAST constant number := CACHE_LEVEL_PTL_SESSION
CACHE_LEVEL_PTL_SESSION constant number := 2
CACHE_LEVEL_SYSTEM constant number := CACHE_LEVEL_FIRST
CACHE_LEVEL_USER constant number := 1
CONTENT_TYPE_HTML constant integer := 1
CONTENT_TYPE_MOBILE constant integer := 4
CONTENT_TYPE_XML constant integer := 2
COOKIE_DELIMITER constant varchar2(10) := '; '
COOKIE_NAME_CONTENT_DELIMITER constant varchar2(10) := '='
CURRENCY_TYPE constant varchar2(8) := 'CURRENCY'
DATE_TYPE constant varchar2(4) := 'DATE'
EXTERNAL_PORTLET constant integer := 1
INTEGER_TYPE constant varchar2(7) := 'INTEGER'
LIST_COMPONENT constant integer := 2
LIST_PORTLET constant integer := 1
MODE_LINK constant integer := 8
MODE_PREVIEW constant integer := 7
MODE_SHOW constant integer := 1
MODE_SHOW_ABOUT constant integer := 2
MODE_SHOW_DETAILS constant integer := 6
MODE_SHOW_EDIT constant integer := 3
MODE_SHOW_EDIT_DEFAULTS constant integer := 5
MODE_SHOW_HELP constant integer := 4
NO_INVALIDATION constant integer := 0
NUMBER_TYPE constant varchar2(6) := 'NUMBER'
PORTLET_PARM_DATAITEM constant varchar2(8) := 'DATAITEM'
PORTLET_PARM_DISPLAY constant varchar2(11) := 'DISPLAYITEM'
PORTLET_PARM_PARAMETER constant varchar2(9) := 'PARAMETER'
STRING_TYPE constant varchar2(6) := 'STRING'
USE_INVALIDATION constant integer := 1
| Function/Procedure Detail |
procedure copy_portlet(
p_copy_portlet_info in copy_portlet_record
) Any user can use this procedure.
Notes:
The register_portlet procedure is called prior to this procedure.
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, OracleAS Portal 10G generates a unique portlet instance ID that is the instance's reference path.
This procedure is called from the provider framework when a page containing the portlet is copied.
Example:
example_provider.copy_portlet
(
p_copy_portlet_info => copy_portlet_record
);
p_copy_portlet_info - specifies the information to be copied:
PROVIDER_EXECUTION_EXCEPTION - if the provider cannot be
executedPROVIDER_VALIDATION_EXCEPTION - if invalid information about the
provider is returnedPORTLET_EXECUTION_EXCEPTION - if there is a generic problem with
the portlet that prevents the
portlet from being executed
procedure deregister_portlet(
p_portlet_instance in portlet_instance_record
) Any user can use this procedure.
Notes:
An audit record is created each time this procedure is used.
It is the caller's responsibility to remove the provider schema, if necessary.
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, OracleAS Portal 10G generates a unique portlet instance ID that is the instance's reference path.
This procedure is called from the provider framework when a portlet is removed from a page, or when a page containing the portlet is deleted.
Example:
Calling code:
wwpro_api_provider.deregister_portlet
(
p_portlet_instance => portlet_instance_rec
);
Provider call:
example_provider.deregister_portlet
(
p_portlet_instance => portlet_instance_rec
);
p_portlet_instance - a record containing the properties of a
portlet instancePROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_SECURITY_EXCEPTION - if provider does not allow the
user to run itPORTLET_VALIDATION_EXCEPTION - if provider has given invalid
information about the portletPORTLET_SECURITY_EXCEPTION - if the portlet does not allow the
user to run itPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
procedure deregister_provider(
p_provider_id in integer
) Any user can use this procedure.
Example:
Calling code:
wwpro_api_provider.deregister_provider
(
p_provider_id => 1348
);
Provider call:
provider_owner.example_provider.deregister_provider
(
p_provider_id => 1348
);
p_provider_id - a unique identifier for the providerPROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_SECURITY_EXCEPTION - if provider does not allow the
user to run itPORTLET_VALIDATION_EXCEPTION - if provider has given invalid
information about the portletPORTLET_SECURITY_EXCEPTION - if user does not have correct
privileges to run the portletPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
function describe_portlet_parameters(
p_provider_id in integer,
p_portlet_id in integer,
p_language in varchar2
) return portlet_parameter_tableWhen called, the portlet should return a list of the parameters that it understands in the table: wwpro_api_provider.portlet_parameter_table.
Any user can use this function.
Example:
Calling code:
l_parameter_list := wwpro_api_provider.describe_portlet_parameters
(
p_provider_id => 178,
p_portlet_id => 14,
p_language => wwnls_api.AMERICAN
);
Portlet call:
l_parameter_list := example_provider.describe_portlet_parameters
(
p_provider_id => 178,
p_portlet_id => 14,
p_language => wwnls_api.AMERICAN
);
p_provider_id - a unique identifier for the providerp_portlet_id - a unique identifier used to locate the portlet
in the provider domain. A null value is not
permitted.p_language - the identifier for the native language in which
the strings are returned to OracleAS Portal 10G.
A null value is not permitted.PROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_VALIDATION_EXCEPTION - if provider has given
invalid information about the
portletPORTLET_VALIDATION_EXCEPTION - if provider has given invalid
information about the portletPORTLET_SECURITY_EXCEPTION - if the portlet does not allow the
user to run itPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
procedure do_login(
p_provider_id in integer,
p_browser_cookies in cookie_table,
p_provider_cookies out cookie_table
) For example, a provider may have a special 'login' style setup to determine whether their service has been previously used in the user's session. Depending on the outcome, some provider-specific login processing can take place, such as producing a cookie. Cookies can then be provided to each of the provider's portlets via the do_login procedure as they are executed.
Notes:
Cookies produced by this procedure are supplied to each portlet when executed.
This procedure cannot be used to produce Web output. It can only be used to access and set cookies.
OracleAS Portal 10G may call this procedure once per page request. The flag login_frequency of the provider record determines how often this procedure is called during an OracleAS Portal 10G session.
Any user can use this procedure.
Example:
Calling code:
wwpro_api_provider.do_login
(
p_provider_id => 135,
p_browser_cookies => l_browser_cookies,
p_provider_cookies => l_provider_cookies
);
Provider call:
example_provider.do_login
(
p_provider_id => 135,
p_browser_cookies => l_browser_cookies,
p_provider_cookies => l_provider_cookies
);
p_provider_id - the ID for the providerp_browser_cookies - browser cookies retrieved from the HTTP headerp_provider_cookies - provider-specific cookies created by the
providerPROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_SECURITY_EXCEPTION - if provider does not allow the
user to run it
function get_api_version(
p_provider_id in integer
) return integerNote: At the moment all pl/sql providers must return wwpro_api_provider.API_VERSION_1.
Any user can use this function.
Example:
l_version := wwpro_api_provider.get_api_version
(
p_provider_id => 19834
);
p_provider_id - a unique identifier for the provider
function get_portlet(
p_provider_id in integer,
p_portlet_id in integer,
p_language in varchar2 default null
) return portlet_recordThe provider can delegate a call to the portlet implementation to return the portlet record or directly fill in the details for the portlet record.
Any user can use this function.
Example:
Calling code:
l_portlet_record := wwpro_api_provider.get_portlet
(
p_provider_id =>178,
p_portlet_id =>14,
p_language =>wwnls_api.AMERICAN
);
Provider call:
l_portlet_record := example_provider.get_portlet
(
p_provider_id => 178,
p_portlet_id =>14,
p_language =>wnls_api.AMERICAN
);
p_provider_id - a unique identifier used to identify the
provider. A null value is not permitted.p_portlet_id - a unique identifier that locates the portlet
within the provider domain. A null value is not
permitted.p_language - the native language in which provider
translatable strings are returnedPROVIDER_VALIDATION_EXCEPTION - if invalid information about the
provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPORTLET_VALIDATION_EXCEPTION - if provider has given invalid
information about the portlet
function get_portlet_list(
p_provider_id in integer,
p_start_row in integer,
p_row_count in integer,
p_language in varchar2 default null,
p_security_level in boolean default true,
p_type in integer default list_portlet
) return portlet_tableThe value of the p_security_level parameter indicates whether security checks will be performed to determine whether a portlet will be returned in the list. When a portlet repository refresh operation retrieves the master list of portlets implemented by the provider, the parameter p_security_level has a value of false. A value of false indicates to the provider that no portlet security check is required and that a master list of all of the portlets implemented by the provider must be returned.
The master list of portlets returned is used to populate the portlet repository for that provider. If the value of p_security_level is true, then it is up to the provider implementation to decide whether portlet security should be performed. If portlet security is implemented, the provider may return a different list of portlets depending on the currently logged on user.
For example, a provider serves portlets 'A', 'B', and 'C'. Because of different user privileges, in response to a wwpro_api_provider.get_portlet_list call, the provider might return 'A' and 'B' as portlets for one user and 'A' and 'C' as portlets for another user.
Notes:
The provider can use the procedures and functions in the context package wwctx_api to get the user logged in and to determine which portlets that user can see.
The provider can call the get_portlet function to return information about individual portlets and to populate the portlet table.
Because a provider can change the security of a given portlet at any time, callers of this API that store the returned portlet ID should be prepared to receive either a PORTLET_NOT_FOUND_EXCEPTION or a PORTLET_SECURITY_EXCEPTION when attempting to invoke the procedures and functions of the portlet.
Any user can use this function.
Example:
Calling code:
l_portlet_table := wwpro_api_provider.get_portlet_list
(
p_provider_id => 137,
p_start_row => 1,
p_row_count => 100,
p_language => wwnls_api.AMERICAN,
p_security_level => false
);
Provider call:
l_portlet_table := example_provider.get_portlet_list
(
p_provider_id => 137,
p_start_row => 1,
p_row_count => 100,
p_language => wwnls_api.AMERICAN,
p_security_level => false
);
p_provider_id - a unique identifier for the portlet providerp_start_row - the number for the first row of the requested
data tablep_row_count - the maximum number of rows to be returnedp_language - the national language name in which the strings
are returned to the caller of this APIp_security_level - indicates whether user-level security is in usep_type - indicates the type of the list to be returned
(portlet or component), as specified by a list
constantPROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executed
function is_portlet_runnable(
p_portlet_instance in portlet_instance_record
) return booleanThis function may be called in two different situations:
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.
OracleAS Portal 10G may call this function to determine if links, menus, and other visual cues for the specified portlet instance should be displayed.
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, OracleAS Portal 10G generates a unique portlet instance ID that is the instance's reference path.
Any user can use this function.
Example:
Calling code:
can_run := wwpro_api_provider.is_portlet_runnable
(
p_portlet_instance => l_portlet_instance
);
Provider call:
can_run := example_provider.is_portlet_runnable
(
p_portlet_instance => portlet_instance_rec
);
p_portlet_instance - a record containing properties of a portlet
instancePROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_SECURITY_EXCEPTION - if portlet does not allow the
user to run itPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
procedure register_portlet(
p_portlet_instance in portlet_instance_record
) This procedure gives the portlet a chance to perform instance-level initialization, such as establishing defaults for end-user customization, before the portlet is displayed.
Notes:
The reference_path field of the p_portlet_instance parameter can be used as a key for instance level initializations.
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, OracleAS Portal 10G generates a unique portlet instance ID that is the instance's reference path.
Because OracleAS Portal 10G provides every portlet instance with a unique reference path to its containing page, portlet developers can use the reference_path as part of the key for storing end-user customization information.
Any user can use this procedure.
Example:
Calling code:
wwpro_api_provider.register_portlet
(
p_portlet_instance => portlet_instance_rec
);
Provider call:
example_provider.register_portlet
(
p_portlet_instance => portlet_instance_rec
);
p_portlet_instance - a record containing the properties of a
portlet instancePROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider has given invalid
information about the portletPROVIDER_SECURITY_EXCEPTION - if the portlet does not allow the
user to run itPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
procedure register_provider(
p_provider_id in integer
) The registration may be via the OracleAS Portal 10G UI or API function wwpro_api_provider_registry.register_provider.
Any user can use this procedure.
Example:
Calling code:
wwpro_api_provider.register_provider
(
p_provider_id => 1348
);
Provider call:
provider_owner.example_provider.register_provider
(
p_provider_id => 1348
);
p_provider_id - a unique identifier for the providerPROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPORTLET_VALIDATION_EXCEPTION - if provider has given invalid
information about the portletPORTLET_SECURITY_EXCEPTION - if user does not have correct
privileges to run the portletPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
procedure show_portlet(
p_portlet_record in out portlet_runtime_record
) OracleAS Portal 10G calls this procedure to render a portlet on a page. When called the portlet should produce the necessary HTML or XML/XSL to display itself on the OracleAS Portal 10G page. This procedure may be called in one of eight different modes.
The page produced should contain the restricted set of HTML markup that is legal to place inside an HTML table cell, i.e. no HEAD or BODY tags as these are applied by OracleAS Portal 10G.
Notes:
The provider may delegate calls to individual portlet implementations.
If you choose to implement multiple portlets in a single package, calls should be delegated to that package.
You are responsible for determining the appropriate level of security and auditing.
A single portlet can be placed as separate instances on many pages. Each instance is assigned its own reference path by the containing page.
The reference_path parameter can by used by the portlet as part of the key for storing end-user customization information.
More than one instance of a portlet can be displayed on the same page.
Because the portlet_id indicates each specific portlet's page and position on the page, portlet developers can use it to implement multiple portlets with a single PL/SQL package.
The page rendered must contain only HTML markup appropriate for an HTML table cell. OracleAS Portal 10G applies the HTML, HEAD, and BODY tags.
Any user can use this procedure.
Example:
Calling code:
wwpro_api_provider.show_portlet
(
l_portlet_record
);
Provider call:
example_provider.show_portlet
(
l_portlet_record
);
p_portlet_record - a portlet record structure that contains
information for the requested portletPROVIDER_VALIDATION_EXCEPTION - if invalid information about
the provider is returnedPROVIDER_NOT_FOUND_EXCEPTION - if provider cannot be locatedPROVIDER_EXECUTION_EXCEPTION - if provider cannot be
executedPROVIDER_SECURITY_EXCEPTION - if provider does not allow the
user to run itPORTLET_VALIDATION_EXCEPTION - if the provider has given
invalid information about the
portletPORTLET_EXECUTION_EXCEPTION - if there is a generic problem
with the portlet that prevents
the portlet from being executed
| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||