prompt Package wsg_generic_provider... create or replace package WSG_GENERIC_PROVIDER is /** * Get the specification version that this provider adheres to. * * For the initial release, this function will need to return * wwpro_api_provider.API_VERSION_1. The framework calls * this method to determine the way in which it should * interact with the provider. * * @param p_provider_id A unique identifier for the provider. * @returns The API version that this provider adheres to. */ function get_api_version ( p_provider_id in integer ) return integer; /** * This procedure is called when a provider is registered using * the provider registry UI or APIs. This provides the provider * an opportunity to perform provider level initializations. * * @param p_provider_id A unique identifier for the provider. */ procedure register_provider ( p_provider_id in integer ); /** * This procedure is called when a provider is deregistered using * the provider registry UI or APIs. This provides the * providers an opportunity to perform provider level cleanup. * * @param p_provider_id A unique identifier for the provider. */ procedure deregister_provider ( p_provider_id in integer ); /** * Permit the provider to perform Login-based processing before any * portlets are executed. * * @param p_provider_id A unique identifier for the provider. * @param p_browser_cookies The cookies that exist at the current * browser session. * @param p_provider_cookies The cookies that this provider generates. */ procedure do_login ( p_provider_id in integer ,p_browser_cookies in wwpro_api_provider.cookie_table ,p_provider_cookies out wwpro_api_provider.cookie_table ); /** * Get the properties for a portlet. * * This function returns, in a wwpro_api_provider.portlet_record * structure, the details of a specific portlet. * * @param p_provider_id A unique identifier for the provider. * @param p_portlet_id A unique identifier within the provider * domain for the portlet. * @param p_language The language in which to return the * translatable strings of the portlet. * @returns A portlet record (wwpro_api_provider.portlet_record) * that contains the properties of the portlet. */ function get_portlet ( p_provider_id in integer ,p_portlet_id in integer ,p_language in varchar2 ) return wwpro_api_provider.portlet_record; /** * Return a list of portlets. * * This function returns, in a wwpro_api_provider.portlet_table * structure, a list of portlets and their properties that * are available from this provider. * * This function may be called in 2 modes. These 2 modes are * determined by the value of the p_security_level parameter. * * If p_security_level is false this method should generate a * list of portlets implemented by this provider without * respect to any portlet security checks. The framework will * call this method with p_security_level set to false when * it performs a refresh of the portlet repository in order to * get the complete list of portlets for this provider that * will be made available in the portal. * If p_security_level is true this method should generate a * list of portlets in which a security check is performed * for the portlets. Such a call may be performed by the * framework to retrieve the list of portlets to display * on the Add Portlets screen. When generating this * list the currently logged on user may be taken into account * so that only the portlets that the user can access are * returned. * * @param p_provider_id A unique identifier for the provider. * @param p_start_row The starting index of the table in which the * portlets are returned into. * @param p_rowcount The number of portlets returned by this call. * @param p_language The language in which the return the * translatable strings into. * @param p_security_level * @param p_type * @returns A table of portlets in a portlet table structure * (wwpro_api_provider.portlet_table). */ function get_portlet_list ( p_provider_id in integer ,p_start_row in integer ,p_rowcount in integer ,p_language in varchar2 ,p_security_level in boolean ,p_type in integer ) return wwpro_api_provider.portlet_table; /** * Return whether this portlet can be viewed by the current user. * * This method may be called in one of the following 2 situations: * 1 - When a request is made to display the portlet in any of the * show modes. In this case the reference_path field of the * p_portlet_instance record is not null. This is a situation * in which portlet instance security check should be made. * 2 - When the portlet repository is displayed a call is made to * the provider (i.e. is_portlet_runnable) for each portlet * to check whether this portlet should be shown to the user. * This is the situation in which general portlet security * check is performed. In this case the reference_path field * of the p_portlet_instance record is null. * * The portlet may use the context package wwctx_api in the * implementation of the portlet-specific security mechanism for * each situation described above. * * @param p_portlet_instance A portlet instance record that contains * information for the portlet instance. * @returns A boolean value indicating whether the portlet can * be run or not. */ function is_portlet_runnable ( p_portlet_instance in wwpro_api_provider.portlet_instance_record ) return boolean; /** * Register the usage of a portlet on a page. * * The framework will call upon this function when the portlet is * put on a page. This provides the portlet an opportunity to perform * instance-level initialization such as the establishment of defaults * for end-user customization. * * @param p_portlet_instance A portlet instance record that contains * information for the portlet instance. */ procedure register_portlet ( p_portlet_instance in wwpro_api_provider.portlet_instance_record ); /** * Deregister a usage of a portlet on a page. * * The framework will call upon this function when a portlet is * removed from a page. This provides the portlet an opportunity to * perform instance-level cleanup such as the removal of end-user * and default customizations. * * @param p_portlet_instance A portlet instance record that contains * information for the portlet instance. */ procedure deregister_portlet ( p_portlet_instance in wwpro_api_provider.portlet_instance_record ); /** * Show the portlet. * * When called, the portlet should produce the necessary HTML or * XML/XSL to render itself for the selected mode. The page * produced should contain the restricted set of HTML Markup that * would be legal to place within a cell of a HTML Table (TD * element). For example, it should not have the HEAD or BODY * html tags since these will be applied by the Portal framework. * * The content generated by the portlet should use the tags from * the cascading style sheet (CSS). * * The following are the valid show modes for a portlet: * * MODE_SHOW - Shows the portlet's content on a page * MODE_SHOW_ABOUT - Shows the about content of the portlet on * a page. The about content may contain * the portlet's version number, date, etc. * MODE_SHOW_EDIT - Shows the Edit (i.e. Customize) UI * MODE_SHOW_HELP - Shows the Help for the portlet * MODE_SHOW_EDIT_DEFAULTS - Shows the UI to edit the default * customizations for the portlet * MODE_SHOW_DETAILS - Shows the details page for the portlet * MODE_PREVIEW - Shows the preview of the portlet * * @param p_portlet_record A portlet runtime record that contains * information passed by the framework and * is used by the portlet. */ procedure show_portlet ( p_portlet_record in out wwpro_api_provider.portlet_runtime_record ); /** * Copy a portlets customization and defaults from one portlet * to another. * * This procedure is called when a page is copied and the page * contains a portlet implemented by this provider. * It is the responsibility of this API to copy the appropriate * portlet customizations. The register_portlet API is called * prior to this one. * * @param p_copy_portlet_info Source and destination portlet info. */ procedure copy_portlet ( p_copy_portlet_info in wwpro_api_provider.copy_portlet_record ); /** * Describe the parameters that the portlet understands. * * The framework will call upon this function if it needs * descriptive information about the parameters to the portlet. * * @param p_provider_id A unique identifier for the provider. * @param p_portlet_id The id of the portlet. * @param p_language The language in which to return the * translatable strings into. */ function describe_portlet_parameters ( p_provider_id in integer ,p_portlet_id in integer ,p_language in varchar2 ) return wwpro_api_provider.portlet_parameter_table; end WSG_GENERIC_PROVIDER; / show errors