Package wwsrc_bulk_update_prefs
Utility package to update the search portlet preferences in bulk
with new values.
This package can be used to update all of the search portlets in
a given page group using the update_portlet_preferences() procedure.
The other procedures in this package can be used to get information
about the portal which is then used to set the parameters for the
update_portlet_preferences() procedure.
These procedures should be called via SQL*Plus after setting
serveroutput on.
For example: To set the cache expiry value to 1440 minutes for all custom
search portlets in page group 33, you would execute from sql*plus:
set serveroutput on size 1000000
begin
wwsrc_bulk_update_prefs.update_portlet_preferences(
p_page_group_id => 33,
p_portlet_instances => wwsrc_bulk_update_prefs.CUSTOM_SEARCH_PORTLETS,
p_auto_query_expiry => 1440
);
end;
- Scope:
-
Public
CATEGORY_PORTLETS
CATEGORY_PORTLETS constant varchar2(100) := 'wwsrc_bulk_update_prefs.get_category_portlets'
-
CUSTOM_SEARCH_PORTLETS
CUSTOM_SEARCH_PORTLETS constant varchar2(100) := 'wwsrc_bulk_update_prefs.get_custom_search_portlets'
ORDER_BY_AUTHOR
ORDER_BY_AUTHOR constant varchar2(15) := 'author'
-
ORDER_BY_CREATE_DATE
ORDER_BY_CREATE_DATE constant varchar2(15) := 'create_date'
ORDER_BY_CREATOR
ORDER_BY_CREATOR constant varchar2(15) := 'creator'
ORDER_BY_EXPIRE_DATE
ORDER_BY_EXPIRE_DATE constant varchar2(15) := 'expire_date'
ORDER_BY_PUBLISH_DATE
ORDER_BY_PUBLISH_DATE constant varchar2(15) := 'publish_date'
ORDER_BY_TITLE
ORDER_BY_TITLE constant varchar2(15) := 'title'
ORDER_BY_UPDATE_DATE
ORDER_BY_UPDATE_DATE constant varchar2(15) := 'update_date'
ORDER_BY_UPDATOR
ORDER_BY_UPDATOR constant varchar2(15) := 'updator'
ORDER_DIR_ASCENDING
ORDER_DIR_ASCENDING constant varchar2(3) := wwsbr_search_constants . ASCENDING
ORDER_DIR_DESCENDING
ORDER_DIR_DESCENDING constant varchar2(4) := wwsbr_search_constants . DESCENDING
PERSPECTIVE_PORTLETS
PERSPECTIVE_PORTLETS constant varchar2(100) := 'wwsrc_bulk_update_prefs.get_perspective_portlets'
g_portlet_instances
g_portlet_instances wwsbr_type.array
-
The list of portlet instances updated.
This should be left uninitialized, and will be set by the execution of
update_portlet_preferences().
| Function/Procedure Detail |
get_category_portlets
function get_category_portlets(
p_page_group in number
) return wwsbr_type.array-
Gets a list of custom search portlet instances that are on category
page tabs in a given page group.
- Parameters:
p_page_group - id of page group to examine- Returns:
- A list of portlet instance names.
get_custom_search_portlets
function get_custom_search_portlets(
p_page_group in number
) return wwsbr_type.array-
Gets a list of custom search portlet instances that are in a given
page group.
- Parameters:
p_page_group - id of page group to examine- Returns:
- A list of portlet instance names.
get_perspective_portlets
function get_perspective_portlets(
p_page_group in number
) return wwsbr_type.array-
Gets a list of custom search portlet instances that are on perspective
page tabs in a given page group.
- Parameters:
p_page_group - id of page group to examine- Returns:
- A list of portlet instance names.
invalidate_search_portlets
procedure invalidate_search_portlets(
p_inval_custom_srchs in boolean default true,
p_inval_user_srchs in boolean default true,
p_inval_basic_srchs in boolean default true,
p_inval_advanced_srchs in boolean default true
) -
Invalidate the pages on which search portlets have been placed.
This procedure is used to force the invalidatation of the pages
on which search portlets have been placed. This can be useful
after, for example, an import which should have changed the
results shown by the search results portlets.
For example, following an import, the custom search results
for a particular query may be totally different, if this portlet
has a long cache expiry time, it may not be acceptable to wait
until it expires. By running this procedure, the cached results
will be removed, and the next time the portlet is viewed, a new
set of search results will be discovered.
An example of use:
To invalidate just the custom search portlets, use
invalidate_search_portlets(
p_inval_custom_srchs => true,
p_inval_user_srchs => false,
p_inval_basic_srchs => false,
p_inval_advanced_srchs => false);
- Parameters:
p_inval_custom_srchs - true - invalidate custom search portletsp_inval_user_srchs - true - invalidate user search portletsp_inval_basic_srchs - true - invalidate basic search portletsp_inval_advanced_srchs - true - invalidate advanced search portlets
set_context
procedure set_context(
p_subscriber_name in varchar2 default null
) -
Set the VPD context for portals with multiple subscribers.
In a portal schema with multiple subscribers this procedure must be
run, passing the subscriber name. To get a list of subscribers
execute the procedure show_available_subscribers() prior to running
set_context(). In a portal schema with just one subscriber there is
no need to execute this.
- Parameters:
p_subscriber_name - the subscriber name
show_available_languages
procedure show_available_languages(
p_page_group_id in number
) -
List the available languages in the page group.
To find the page group id for the page group you require
use the show_available_page_groups() procedure.
show_available_page_groups
procedure show_available_page_groups
-
List the available page groups.
This procedure will display the list of page groups in the portal.
show_available_styles
procedure show_available_styles(
p_page_group_id in number
) -
List the available styles.
Display a list of available styles for item results display.
show_available_subscribers
procedure show_available_subscribers
-
List the available subscribers.
show_display_attributes
procedure show_display_attributes
-
Displays a list of available item display attributes.
update_portlet_preferences
procedure update_portlet_preferences(
p_page_group_id in number,
p_portlet_instances in varchar2 default custom_search_portlets,
p_subscriber_name in varchar2 default null,
p_item_display_attributes in varchar2 default null,
p_item_results_style in varchar2 default null,
p_search_results_summary in boolean default null,
p_save_search_link in boolean default null,
p_saved_search_text in varchar2 default null,
p_search_submission_criteria in boolean default null,
p_bulk_action_link in boolean default null,
p_hits_per_page in number default null,
p_order_results_by in varchar2 default null,
p_order_results_dir in varchar2 default null,
p_auto_query_expiry in number default null
) -
Update the portlet preferences with new values.
Update the portlet preferences in the given page group using
the list of portlets defined using the mode parameter with
the new preference values specified in the rest of the
parameters. Search portlet preferences should be updated separately
for each page group.
- Parameters:
p_page_group_id - Page Group ID (Mandatory)p_portlet_instances - This setting defines the list of search
portlets that will be operated upon. Use the constants
defined above to choose which list of portlets will be used, these
are CATEGORY_PORTLETS, PERSPECTIVE_PORTLETS, CUSTOM_SEARCH_PORTLETS
. You can also supply your own function which should return a
wwsbr_type.arrayp_subscriber_name - The current subscriber (if VPD enabled)p_item_display_attributes - A list of attributes that should be
displayed with search results of type ITEM. The list should
be in the format: id,siteid[;id,siteid]*
e.g. p_item_display_attributes => '15,0;19,0;1001,53;36,0'p_item_results_style - Use this setting to choose the style for
search results of type ITEM. The format should be
id,siteidp_search_results_summary - Decide whether to display the next /
previous links and results summary for the search portlet.p_save_search_link - Decide whether to display the Save search
link with the search results.p_saved_search_text - Choose the text that should be displayed for
the Saved Search Link for each installed language. The format of
the list is: language,Link Text[;language,Link Text]* e.g.
p_saved_search_text=>'us,Save Search;f,Enregistrer la recherche'p_search_submission_criteria - Decide whether to display the search
submission criteria underneath the search results.p_bulk_action_link - Decide whether to display the Bulk Action link
with the search results.p_hits_per_page - Choose the number of search results to display in
a single page. Valid values are 0 - 9999p_order_results_by - Choose the the order in which results should
appear. Valid values are: author, create_date, creator,
expire_date, publish_date, title, update_date, updator. Constants
for these values are defined in this package.p_order_results_dir - Choose the order by direction. Valid values
'desc' or 'asc'. Constants for these values are defined in this
package.p_auto_query_expiry - How long to cache the results in minutes.
Valid values are 1 to 1440, or zero to switch the
caching of auto query results off.
For example:
wwsrc_bulk_update_prefs.update_portlet_preferences(
p_page_group_id => 33,
p_portlet_instances => wwsrc_bulk_update_prefs.CUSTOM_SEARCH_PORTLETS,
p_subscriber_name => 'us',
p_item_display_attributes => '15,0;19,0;1001,53;36,0',
p_item_results_style => '1,0',
p_search_results_summary => true,
p_save_search_link => false,
p_saved_search_text => 'us,Save Search;f,Enregistrer la recherche',
p_search_submission_criteria => true,
p_bulk_action_link => false,
p_hits_per_page => 25,
p_order_results_by => wwsrc_bulk_update_prefs.ORDER_BY_CREATOR,
p_order_results_dir => wwsrc_bulk_update_prefs.ORDER_DIR_ASCENDING,
p_auto_query_expiry => 1440
);