Replaced Access_Controls with APEX_AUTHORISATION Created POSTCODES, ERROR_LOGS and SYSTEM_CONFIGURATION. Added missing columns to ENQUIRIES, REGULATORS, etc. Added views V_PROFILE_RT_CODE_FOR_ENRO.vw, V_PARTY_RELATIONSHIPS.vw, V_LATEST_RT_CODE_FOR_ENRO.vw. Modules: Added cout_err.pck, cout_system_configuration.pck. Data: Added Data/Demo files Added Data/Seed files for postcodes, regions and DatabaseItemToFunctionalSpecificationReference.csv Documentation: Added Documentation/pldoc for plsqldoc-generated files. Added Documentation/SupportingDocumentation/Regions to hold region definition information. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2890 248e525c-4dfb-0310-94bc-949c084e9493
122 lines
4.4 KiB
Plaintext
122 lines
4.4 KiB
Plaintext
CREATE OR REPLACE PACKAGE cout_system_configuration IS
|
|
|
|
/**
|
|
-- Package containing the common utility system configuration routines used by the Access Manager application
|
|
-- #version $Revision: $
|
|
-- #author Andy Hardy
|
|
*/
|
|
|
|
/*
|
|
$Header: $ Logfile, Revision, Date, Author
|
|
|
|
$Modtime: $ Date and time of last modification
|
|
|
|
$History: $
|
|
*/
|
|
|
|
/** Default date format for stored configuration items*/
|
|
g_date_format CONSTANT VARCHAR2(80) := 'DD/MM/YYYY HH24:MI:SS';
|
|
|
|
/** Add a date configuration item
|
|
#param p_parameter The name of the configuration item
|
|
#param p_value The value to be given to the configuration item
|
|
#param p_description The description of the configuration item
|
|
*/
|
|
PROCEDURE add_configuration_item_date(p_parameter IN system_configuration.parameter%TYPE
|
|
,p_value IN DATE
|
|
,p_description IN system_configuration.description%TYPE := NULL);
|
|
/** Add a non-date configuration item
|
|
#param p_parameter The name of the configuration item
|
|
#param p_value The value to be given to the configuration item
|
|
#param p_description The description of the configuration item
|
|
*/
|
|
PROCEDURE add_configuration_item(p_parameter IN system_configuration.parameter%TYPE
|
|
,p_value IN system_configuration.VALUE%TYPE DEFAULT NULL
|
|
,p_description IN system_configuration.description%TYPE := NULL);
|
|
|
|
/** Get a date configuration item
|
|
#param p_parameter The name of the configuration item to be retrieved
|
|
#return Value of the configuration item as a date
|
|
*/
|
|
FUNCTION get_configuration_item_date(p_parameter IN system_configuration.parameter%TYPE)
|
|
RETURN DATE;
|
|
/** Get a configuration item
|
|
#param p_parameter The name of the configuration item to be retrieved
|
|
#return Value of the configuration item
|
|
*/
|
|
FUNCTION get_configuration_item(p_parameter IN system_configuration.parameter%TYPE)
|
|
RETURN system_configuration.VALUE%TYPE;
|
|
|
|
END cout_system_configuration;
|
|
/
|
|
CREATE OR REPLACE PACKAGE BODY cout_system_configuration IS
|
|
|
|
-- Author : HARDYA
|
|
-- Created : 25/08/2004 14:22:59
|
|
-- Purpose : Enter default system configuration details into the SYSTEM_CONFIGURATION table
|
|
|
|
/*
|
|
$Header: $ Logfile, Revision, Date, Author
|
|
|
|
25/08/2004: $ Date and time of last checkin
|
|
$Modtime: $ Date and time of last modification
|
|
|
|
$History: $
|
|
*/
|
|
|
|
PROCEDURE add_configuration_item(p_parameter IN system_configuration.parameter%TYPE
|
|
,p_value IN system_configuration.VALUE%TYPE DEFAULT NULL
|
|
,p_description IN system_configuration.description%TYPE := NULL) IS
|
|
BEGIN
|
|
INSERT INTO system_configuration
|
|
(parameter
|
|
,VALUE
|
|
,description)
|
|
VALUES
|
|
(upper(p_parameter)
|
|
,p_value
|
|
,p_description);
|
|
EXCEPTION
|
|
WHEN dup_val_on_index THEN
|
|
UPDATE system_configuration
|
|
SET VALUE = p_value
|
|
WHERE parameter = p_parameter;
|
|
END add_configuration_item;
|
|
|
|
PROCEDURE add_configuration_item_date(p_parameter IN system_configuration.parameter%TYPE
|
|
,p_value IN DATE
|
|
,p_description IN system_configuration.description%TYPE := NULL) IS
|
|
BEGIN
|
|
add_configuration_item(p_parameter => p_parameter
|
|
,p_value => to_char(p_value
|
|
,g_date_format)
|
|
,p_description => p_description);
|
|
END add_configuration_item_date;
|
|
|
|
FUNCTION get_configuration_item(p_parameter IN system_configuration.parameter%TYPE)
|
|
RETURN system_configuration.VALUE%TYPE IS
|
|
l_value system_configuration.VALUE%TYPE;
|
|
BEGIN
|
|
SELECT VALUE
|
|
INTO l_value
|
|
FROM system_configuration
|
|
WHERE parameter = upper(p_parameter);
|
|
RETURN l_value;
|
|
EXCEPTION
|
|
WHEN no_data_found THEN
|
|
RETURN NULL;
|
|
END get_configuration_item;
|
|
|
|
FUNCTION get_configuration_item_date(p_parameter IN system_configuration.parameter%TYPE)
|
|
RETURN DATE IS
|
|
l_value system_configuration.VALUE%TYPE;
|
|
BEGIN
|
|
l_value := get_configuration_item(p_parameter);
|
|
RETURN to_date(l_value
|
|
,g_date_format);
|
|
|
|
END get_configuration_item_date;
|
|
|
|
END cout_system_configuration;
|
|
/
|