Overview | Package | Object Type | Deprecated | Index | Help
| Oracle Application Server Portal PL/SQL API Reference - 10.1.4
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE

## 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

Constant Summary
`CATEGORY_PORTLETS` | `varchar2(100)`
`CUSTOM_SEARCH_PORTLETS` | `varchar2(100)`
`ORDER_BY_AUTHOR` | `varchar2(15)`
`ORDER_BY_CREATE_DATE` | `varchar2(15)`
`ORDER_BY_CREATOR` | `varchar2(15)`
`ORDER_BY_EXPIRE_DATE` | `varchar2(15)`
`ORDER_BY_PUBLISH_DATE` | `varchar2(15)`
`ORDER_BY_TITLE` | `varchar2(15)`
`ORDER_BY_UPDATE_DATE` | `varchar2(15)`
`ORDER_BY_UPDATOR` | `varchar2(15)`
`ORDER_DIR_ASCENDING` | `varchar2(3)`
`ORDER_DIR_DESCENDING` | `varchar2(4)`
`PERSPECTIVE_PORTLETS` | `varchar2(100)`

Variable Summary
`g_portlet_instances` The list of portlet instances updated. | `wwsbr_type.array`

Function/Procedure Summary
`get_category_portlets` Gets a list of custom search portlet instances that are on category page tabs in a given page group. | `wwsbr_type.array`
`get_custom_search_portlets` Gets a list of custom search portlet instances that are in a given page group. | `wwsbr_type.array`
`get_perspective_portlets` Gets a list of custom search portlet instances that are on perspective page tabs in a given page group. | `wwsbr_type.array`
`invalidate_search_portlets` Invalidate the pages on which search portlets have been placed. | ``
`set_context` Set the VPD context for portals with multiple subscribers. | ``
`show_available_languages` List the available languages in the page group. | ``
`show_available_page_groups` List the available page groups. | ``
`show_available_styles` List the available styles. | ``
`show_available_subscribers` List the available subscribers. | ``
`show_display_attributes` Displays a list of available item display attributes. | ``
`update_portlet_preferences` Update the portlet preferences with new values. | ``

Constant Detail

### 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'

Variable Detail

### 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 portlets
    `p_inval_user_srchs` - true - invalidate user search portlets
    `p_inval_basic_srchs` - true - invalidate basic search portlets
    `p_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.array
    `p_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,siteid
    `p_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 - 9999
    `p_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
            );

Overview | Package | Object Type | Deprecated | Index | Help
| Oracle Application Server Portal PL/SQL API Reference - 10.1.4
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE