Translations of this page:

Forum_context Package

This package is added in version 0.7.0. This is the first unwrapped package. It will allow developers to decide if they want to use Portal SSO as the session manager, or if they want to use another one.

The goal of this package is to get a uniform specification for the session management. But the body can be customized has needed.

Here is the description of each functions, procedure that are available in this package.

get_current_sessionid

This function return the current session id for the connected user.

Return
  • NUMBER : current session id.
Definition

FUNCTION get_current_sessionid RETURN NUMBER;

get_current_user

This function return the user login that is connected to the system.

Return
  • VARCHAR2 : current user login.
Definition

FUNCTION get_current_user RETURN VARCHAR2;

get_current_userid

This function return the user id that is connected to the system.

Return
  • NUMBER : current user id.
Definition

FUNCTION get_current_userid RETURN NUMBER;

get_user_name

This function return the user login for a specific user id.

Parameter
  • p_user_id : user id.
Returns
  • VARCHAR2 : user name.
Definition

FUNCTION get_user_name (p_user_id IN INTEGER) RETURN VARCHAR2;

get_user_id

This function return the user id for a specific user login.

Parameter
  • p_user_name : user login.
Return
  • NUMBER : user id.
Definition

FUNCTION get_user_id (p_user_name IN VARCHAR2) RETURN NUMBER;

get_current_language

This function return the current browser language (us,fr,…)

Returns
  • VARCHAR2 : current language tag.
Definition

FUNCTION get_current_language RETURN VARCHAR2;

is_logged_on

This function return TRUE if the user is authenticated on the system

Returns
  • BOOLEAN : authentication status.
    • TRUE : the current user is authenticated on the system.
    • FALSE : the current user is not authenticated on the system.
Definition

FUNCTION is_logged_on RETURN BOOLEAN;

set_context

This proceddure can be used to set the session context for a lightweight user for use in a context that is not in a web session through modplsql.

Parameters
  • p_user_name : user login.
  • p_password : user password.
  • p_company : user company.
Definition

FUNCTION set_context (p_user_name IN VARCHAR2,
                                p_password IN VARCHAR2 DEFAULT NULL,
                                p_company IN VARCHAR2 DEFAULT NULL);

get_user_infos

This function is used to retrieve user profile details like first_name, last_name, known_as and email.

Parameters
  • p_user_id : user id.
Returns
  • USER_INFOS
Definition

FUNCTION get_user_infos (p_user_id INTEGER) RETURN user_infos;

get_language

This function returns the NLS language name cosntant that indicates the default language for the domain.

Parameters
  • p_language : The domain language.
Returns
  • VARCHAR2 : the NLS language
Definition

FUNCTION get_language (p_language VARCHAR2) RETURN VARCHAR2;

get_translation_language

This function returns the languages available for user data translation (for Portal this is corresponding to the installed languages list).

Returns
  • OWA_TEXT.VC_ARR : an array of available languages
Definition

FUNCTION get_translation_language RETURN owa_text.vc_arr;

nls_to_http

This function maps a NLS language name to the corresponding HTTP language abbreviation.

Parameters
  • p_nls_language : an NLS language abbreviation
Returns
  • VARCHAR2 : a mapped HTTP abbreviation constant for the NLS language name constant specified.
Definition

FUNCTION nls_to_http (p_nls_language IN VARCHAR2) RETURN VARCHAR2;

territory_from_http_language

This function determines the default territory corresponding to a given HTTP language abbreviation

Parameters
  • p_http_language : an HTTP language abbreviation
Returns
  • VARCHAR2 : a territory code.
Definition

FUNCTION territory_from_http_language (p_http_language IN VARCHAR2) RETURN VARCHAR2;

set_language

This procedure set the persistent cookie for the nls language

Parameters
  • p_http_language : the HTTP language abbreviation to set
  • p_nls_language : the database language abbreviation to set
  • p_nls_territory : the territory code to set
  • p_requested_url : the url to redirect to after setting language
Definition

PROCEDURE set_language (p_http_language IN VARCHAR2 DEFAULT NULL,
                                  p_nls_language IN VARCHAR2 DEFAULT NULL,
                                  p_nls_territory IN VARCHAR2 DEFAULT NULL,
                                  p_requested_url IN VARCHAR2);

logout

This proceddure is used when a user log off the system.

Parameters
  • p_done_url : user login.
Definition

PROCEDURE logout(p_done_url IN VARCHAR2);

build_login_form

search_user

This function search users in the database user (for Portal this is an ldap search)

Parameters
  • p_user_search : the text to search in user informations
Returns
  • OWA_TEXT.VC_ARR : a list of user ids that are matching the search criteria
Definition

FUNCTION search_user (p_user_search IN VARCHAR2) RETURN OWA_TEXT.VC_ARR;

 
forum/forum_context.txt · Last modified: 2009/08/12 15:16 by helyos
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported