| Oracle Application Server Portal PL/SQL API Reference - 10.1.2 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains a set of procedures and functions that can be used to resove preference paths, retrieve preference path IDs and retrieve the preference name record.
| Type Summary | |
name_record | subtype |
names_table | subtype |
value_record | subtype |
values_table | subtype |
| Constant Summary | |
PRE_PATH_DELIMITER | varchar2(10) |
| Function/Procedure Summary | |
copy | |
get_name | name_record |
get_names_table | names_table |
get_path_id | integer |
get_values_table | values_table |
| Type Detail |
subtype name_record is wwpre_utl.name_record
type name_record is record (
id number, --ID of preference name
path_id number, --ID of path associated with preference name
name varchar2(255), --preference name
description long, --description of preference name
description_id number, --NLS string ID for the description
type_name varchar2(200) --type associated with this preference
);
subtype names_table is wwpre_utl.names_table
subtype value_record is wwpre_utl.value_record
type value_record is record (
name_id number, --preference name ID of value record
level_type varchar2(4), --USER_LEVEL_TYPE, GROUP_LEVEL_TYPE,
--or SYSTEM_LEVEL_TYPE
level_id number, --User ID or Group ID
varchar2_value varchar2(4000), --varchar2 value
number_value number, --number value
date_value date --date value
);
subtype values_table is wwpre_utl.values_table
| Constant Detail |
PRE_PATH_DELIMITER constant varchar2(10) := wwpre_utl . PRE_PATH_DELIMITER
| Function/Procedure Detail |
procedure copy(
p_source_path in varchar2,
p_destination_path in varchar2 default null
) Note: For database providers, this function can be used by the provider's copy_portlet procedure to copy preferences related to a portlet. For example, when a page is copied the copy_portlet function is called. The provider can use this function to copy the preferences associated with the portlet.
Example:
wwpre_api_util.copy
(
p_source_path => 'company.portal.portlet.'||l_source_portlet_id,
p_destination_path => 'company.portal.portlet.'||l_destination_portlet_id
);
p_source_path - the path name to be exportedp_destination_path - the new path name to be used when importing
function get_name(
p_path in varchar2,
p_name in varchar2
) return name_recordThe function returns the record for the preference name based on the path.
Example:
declare
l_name_record wwpre_api_util.name_record;
begin
l_name_record := wwpre_api_util.get_name
(
p_path => 'ORACLE.TOOLS.PORTAL.STYLE',
p_name => 'BGCOLOR'
);
end;
p_path - the path for the preference namep_name - the preference nameNAME_NOT_FOUND_EXCEPTION - if the path is not foundDUPLICATE_NAME_EXCEPTION - if a duplicate path is found
function get_names_table(
p_path in varchar2
) return names_tableThis function returns the table of all the records for a given preference path.
Example:
declare
l_names_table wwpre_api_util.names_table;
begin
l_names_table := wwpre_api_util.get_names_table
(
p_path => 'ORACLE.TOOLS.PORTAL.STYLE'
);
end;
p_path - the path for the preference nameNAME_NOT_FOUND_EXCEPTION - if the name is not foundPATH_NOT_FOUND_EXCEPTION - if the path is not found
function get_path_id(
p_path in varchar2
) return integerThe ID corresponds to the last name in the preference path, e.g. if the preference path is 'Oracle.Tools.Portal.Style', then the ID for the name 'Style' is returned.
Example:
l_path_id := wwpre_api_util.get_path_id
(
p_path => 'ORACLE.TOOLS.PORTAL.STYLE'
);
p_path - the path for the preference namePATH_NOT_FOUND_EXCEPTION - if the path is not foundDUPLICATE_PATH_EXCEPTION - if a duplicate path is found
function get_values_table(
p_name_id in number
) return values_tableThis function returns a table of all the records for a given name ID.
Example:
declare
l_name_record wwpre_api_util.name_record;
l_values_table wwpre_api_util.values_table;
begin
l_name_record := wwpre_api_util.get_name
(
p_path => 'ORACLE.TOOLS.PORTAL.STYLE',
p_name => 'BGCOLOR'
);
l_values_table := wwpre_api_util.get_values_table
(
p_name_id => l_name_record.id
);
end;
p_name_id - the name ID
| Oracle Application Server Portal PL/SQL API Reference - 10.1.2 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||