Oracle9iAS Portal Developer Kit

create_name procedure

Contained in package wwwpre_api_name.

Call this procedure to create a preference name used to store preference values.

Constraints:

  • The preference path under which this name is being created must exist.
  • The preference name must be unique for the preference path.
  • The names in the path must be delimited with a period (.).
  • The length of each name in a preference path may not exceed 255 characters.
  • The type associated with the preference should exist and be based on one of the dynamic data types. The base types are: NUMBER, DATE and STRING.

Note: If the path does not exist, create it with the create_path procedure.

procedure create_name

(

p_path in varchar2,

p_name in varchar2,

p_description in varchar2,

p_type_name in varchar2,

p_language in varchar2

);

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_path

The preference path under which the name will be created.

Datatype: in varchar2

p_name

The preference name to be created.

Note: The length of each name in a preference path may not exceed 255 characters.

Datatype: in varchar2

p_description

A description or explanation of the preference name.

Datatype: in varchar2

p_type_name

The name of the type to be associated with this preference.

Datatype: in varchar2

p_language

The language in which the description should be stored.

Datatype: in varchar2

Exceptions:

  • If the name already exists, a DUPLICATE_NAME_EXCEPTION is raised.
  • If the type is not valid, a VALUE_ERROR_EXCEPTION is raised.
  • If the name has not been created, a GENERAL_PREFERENCE_EXCEPTION is raised.
  • If the path for the name does not exist, then a PATH_NOT_FOUND_EXCEPTION is raised.
  • If more than one preference path exists for the name, a DUPLICATE_PATH_EXCEPTION is raised.

Example:

wwpre_api_name.create_name

(

p_path => 'ORACLE.PORTAL.TEST.STYLE.DEFAULT',

p_name => 'FONT_SIZE',

p_type_name => 'NUMBER',

p_description => 'Font Size for the Style',

p_language => wwctx_api.get_nls_language

);

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio