PROMPT CREATE OR REPLACE PACKAGE PKG_CONSTANTS

CREATE OR REPLACE PACKAGE PKG_CONSTANTS IS
/******************************************************************************
*                        (c) Ultra Electronics Limited, 1998
*                       All rights reserved
*
*******************************************************************************
*
* Filename:                 pkg_constants.sql
* Module Name:              N/A
* Subsystem Name:           N/A
* Originating Author:       Peter Charalambous
* Design Reference:         FAS/DUBRS/SD/245
*
*******************************************************************************
* Description
*               This package specification contains all constant values needed
*               for the ultratrak database interface, for TETHERED Scanners.
*
*******************************************************************************
* Modification History:
*
* Rel   Date/Time       Proj/Id         CA Ref/Details of change
* _____ __________      _______         ________________________
*
******************************************************************************/

    /* User logging constants */
    SUCCESS                        CONSTANT VARCHAR2(10) DEFAULT  '0';
    LOGIN_SUCCESS                  CONSTANT VARCHAR2(10) DEFAULT  '0';
    LOGOUT_SUCCESS                 CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_USER_UNKNOWN             CONSTANT VARCHAR2(10) DEFAULT  '-102';
    ERROR_ALREADY_LOGGED_IN        CONSTANT VARCHAR2(10) DEFAULT  '-1329';
    ERROR_ALREADY_LOGGED_OUT       CONSTANT VARCHAR2(10) DEFAULT  '-1330';
    ERROR_LOGIN_DENIED             CONSTANT VARCHAR2(10) DEFAULT  '-1027';
    ERROR_LOGOUT_DENIED            CONSTANT VARCHAR2(10) DEFAULT  '-1326';
    ERROR_GENERAL_EXCEPTION        CONSTANT VARCHAR2(10) DEFAULT  '-1089';

    /* Flight constants */
    GET_ULD_DATA_SUCCESS           CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_ULD_INCOMPLETE_DATA      CONSTANT VARCHAR2(10) DEFAULT  '-1307';
    ERROR_FLIGHT_STATUS_PD         CONSTANT VARCHAR2(10) DEFAULT  '-208';
    ERROR_UNKNOWN_FLIGHT           CONSTANT VARCHAR2(10) DEFAULT  '-139';
    ERROR_FLIGHT_ACCESS_DENIED     CONSTANT VARCHAR2(10) DEFAULT  '-1031';

    /* Tag/Bag constants */
    LOAD_BAG_SUCCESS               CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_UNKNOWN_ULD              CONSTANT VARCHAR2(10) DEFAULT  '-1001';
    ERROR_UNKNOWN_BAG              CONSTANT VARCHAR2(10) DEFAULT  '-1002';
    ERROR_DUPLICATE_BAG            CONSTANT VARCHAR2(10) DEFAULT  '-1003';
    ERROR_BAG_NOT_ATL_DCS          CONSTANT VARCHAR2(10) DEFAULT  '-1004';
    ERROR_BAG_NOT_ATL_BRS          CONSTANT VARCHAR2(10) DEFAULT  '-1005';
    ERROR_WRONG_FLIGHT             CONSTANT VARCHAR2(10) DEFAULT  '-1006';
    ERROR_LOADING_STRATEGY_FAIL    CONSTANT VARCHAR2(10) DEFAULT  '-1007';
    ERROR_WRONG_CLASS              CONSTANT VARCHAR2(10) DEFAULT  '-1008';
    ERROR_WRONG_DESTINATION        CONSTANT VARCHAR2(10) DEFAULT  '-1009';
    ERROR_UNKNOWN_PASSENGER        CONSTANT VARCHAR2(10) DEFAULT  '-1010';
    ERROR_ALREADY_LOADED           CONSTANT VARCHAR2(10) DEFAULT  '-1011';
    ERROR_DELETED_BAGS             CONSTANT VARCHAR2(10) DEFAULT  '-1019';
    ERROR_UNRESOLVABLE_DUP_TAG     CONSTANT VARCHAR2(10) DEFAULT  '-1021';
    ERROR_BAG_ISSUER_NOT_KNOWN     CONSTANT VARCHAR2(10) DEFAULT  '-20041';
    ERROR_INVALID_BAG_TAG_FORMAT   CONSTANT VARCHAR2(10) DEFAULT  '-20042';
    ERROR_GEN_BAG_TAG              CONSTANT VARCHAR2(10) DEFAULT  '-1335';

    /* Pax constants */
    ERROR_STANDBY_PASSENGER        CONSTANT VARCHAR2(10) DEFAULT  '-1047';
    ERROR_NOT_CHECKED_IN           CONSTANT VARCHAR2(10) DEFAULT  '-1048';
    ERROR_UNKNOWN_PAX_STATUS       CONSTANT VARCHAR2(10) DEFAULT  '-1049';
    ERROR_INVALID_PAX_ID           CONSTANT VARCHAR2(10) DEFAULT  '-1800';

    /* ULD constants */
    ERROR_WRONG_ULD_TYPE           CONSTANT VARCHAR2(10) DEFAULT  '-1065';
    ERROR_WRONG_ONWARD_DETAILS     CONSTANT VARCHAR2(10) DEFAULT  '-1066';
    ERROR_BETTER_ULD_FOR_LOADING   CONSTANT VARCHAR2(10) DEFAULT  '-1067';
    ERROR_NOT_SECURITY_CLEARED     CONSTANT VARCHAR2(10) DEFAULT  '-1068';
	  ERROR_NOT_CONNECTED_ULD		     CONSTANT VARCHAR2(10) DEFAULT  '-1071';
    ERROR_NOT_AUTHORISED           CONSTANT VARCHAR2(10) DEFAULT  '-1337';
    ERROR_FLIGHT_CLOSED            CONSTANT VARCHAR2(10) DEFAULT  '-1081';
    ERROR_ULD_DIFF_FLIGHT          CONSTANT VARCHAR2(10) DEFAULT  '-200';
    ERROR_BAGS_LOADED_IN_ULD       CONSTANT VARCHAR2(10) DEFAULT  '-1101';

    /* User Authorisation constants */
    AUTHORISE_SUCCESS              CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_USER_NOT_AUTHORISED      CONSTANT VARCHAR2(10) DEFAULT  '-1338';

    /* Offloading Bag constants */
    OFFLOAD_SUCCESS                CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_BAG_NOT_LOADED           CONSTANT VARCHAR2(10) DEFAULT  '-1012';

    /* Register / Re-register ULD constants */
    REGISTER_ULD_SUCCESS           CONSTANT VARCHAR2(10) DEFAULT  '0';

    /* Merge ULDs constants */
    MERGE_ULDS_SUCCESS             CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_DEST_ULD_NOT_FOUND       CONSTANT VARCHAR2(10) DEFAULT  '-211';
    ERROR_GENERAL_ULD_ERROR        CONSTANT VARCHAR2(10) DEFAULT  '-1013';
    ERROR_SOURCE_ULD_NO_BAGS       CONSTANT VARCHAR2(10) DEFAULT  '-1328';
    ERROR_SRC_ULD_NOT_REG          CONSTANT VARCHAR2(10) DEFAULT  '-1334';
    ERROR_DEST_ULD_NOT_REG         CONSTANT VARCHAR2(10) DEFAULT  '-1333';
    ERROR_FAILED_TO_RENAME_ULD     CONSTANT VARCHAR2(10) DEFAULT  '-1315';
    ERROR_ULD_ID_CODE_ALREADY_SET  CONSTANT VARCHAR2(10) DEFAULT  '-1304';

    /* Pre-clear bags constants */
    BSM_FOUND                      CONSTANT VARCHAR2(10) DEFAULT  '0';
    ERROR_BSM_NOT_FOUND            CONSTANT VARCHAR2(10) DEFAULT  '-1336';
    ERROR_EXCEPTION_BAG            CONSTANT VARCHAR2(10) DEFAULT  '-1322';

    /* Miscellanous constants */
    KIT_TYPE                       CONSTANT kit.type%TYPE DEFAULT 'TETHER';
    SERIAL_NUMBER                  CONSTANT VARCHAR2(20)  DEFAULT '9999999999';
    LOGGED_ON                      CONSTANT VARCHAR2(6)   DEFAULT 'LOG-IN';
    LOGGED_OUT                     CONSTANT VARCHAR2(7)   DEFAULT 'LOG-OUT';
    TETHER_Login                   CONSTANT app_priv.app_priv_name%TYPE := 'TETHER_Login';

    /* Flight Status values */
    FLIGHT_OPEN                    CONSTANT flight.flight_status%TYPE := 'FO';
    FLIGHT_DELAYED                 CONSTANT flight.flight_status%TYPE := 'FD';
    FLIGHT_GATED                   CONSTANT flight.flight_status%TYPE := 'FG';
    FLIGHT_CLOSED                  CONSTANT flight.flight_status%TYPE := 'FC';
    FLIGHT_FINALISED               CONSTANT flight.flight_status%TYPE := 'FF';
    GATE_CLOSED                    CONSTANT flight.flight_status%TYPE := 'GC';
    POST_DEPARTURE                 CONSTANT flight.flight_status%TYPE := 'PD';


    /* ULD Assignment Statuses */
    ERROR_ULD_NOT_ASSOCIATED       CONSTANT VARCHAR2(10) DEFAULT '-1092';
    ERROR_ULD_DISASSOCIATION       CONSTANT VARCHAR2(10) DEFAULT '-1093';
    ERROR_ULD_ASSOCIATION          CONSTANT VARCHAR2(10) DEFAULT '-1094';
    ERROR_ULD_ID                   CONSTANT VARCHAR2(10) DEFAULT '-1095';
    ERROR_ULD_INVALID              CONSTANT VARCHAR2(10) DEFAULT '-1099';

    /*  added by CP    */
    ERROR_ULD_ALREADY_ASSOCIATED   CONSTANT VARCHAR2(10) DEFAULT '-1314';
    ERROR_ULD_ALREADY_EXISTS       CONSTANT VARCHAR2(10) DEFAULT '-1313';

    /* BPMs */
    ERROR_BPM_MAIL                 CONSTANT VARCHAR2(10) DEFAULT '-1015';

    /* Bag Groups and Holding Pens */
    ERROR_UNKNOWN_BAG_NO_FLIGHT    CONSTANT VARCHAR2(10) DEFAULT '-20043';
    ERROR_ULD_NAME_EXISTS          CONSTANT VARCHAR2(10) DEFAULT '-20052';
    ERROR_UNKNOWN_BAG_GROUP        CONSTANT VARCHAR2(10) DEFAULT '-20053';
    ERROR_BAG_GROUP_NOT_EMPTY      CONSTANT VARCHAR2(10) DEFAULT '-20054';
    ERROR_BAG_ALREADY_GROUPED      CONSTANT VARCHAR2(10) DEFAULT '-20055';
    ERROR_BAG_NOT_GROUPED          CONSTANT VARCHAR2(10) DEFAULT '-20056';
    ERROR_WRONG_BAG_GROUP          CONSTANT VARCHAR2(10) DEFAULT '-20057';
    ERROR_BAG_GROUP_EXISTS         CONSTANT VARCHAR2(10) DEFAULT '-20058';
    ERROR_BAG_ALREADY_LOADED       CONSTANT VARCHAR2(10) DEFAULT '-20062';
    ERROR_INVALID_HP_ACTION        CONSTANT VARCHAR2(10) DEFAULT '-20068';
     

    /* FIDS Application Error Codes */
    c_null_airport_code            CONSTANT NUMBER := -20774;
    c_null_carrier_code            CONSTANT NUMBER := -20775;
    c_null_flight_no               CONSTANT NUMBER := -20776;
    c_null_flight_date             CONSTANT NUMBER := -20777;
    c_null_schd_flight_time        CONSTANT NUMBER := -20778;
    c_null_interface_id            CONSTANT NUMBER := -20779;
    c_null_direction               CONSTANT NUMBER := -20780;
    /* Flight Event Type Error Codes */
    ERROR_EVENT_TYPE_NOT_FOUND      CONSTANT NUMBER := -1413;
    ERROR_EVENT_TYPE_ALREADY_EXIST  CONSTANT NUMBER := -1414;
    ERROR_INVALID_FLIGHT_DIRECTION  CONSTANT NUMBER := -1415;
    ERROR_INVALID_AGENT_CODE        CONSTANT NUMBER := -1416;
    ERROR_INVALID_EVENT_DURATION    CONSTANT NUMBER := -1417;
    /*MWS email module error codes*/
    --following existed in error table previously but were not a part of this package
    ERROR_DUPLICATE_ENTRY           CONSTANT NUMBER := -20027;
    ERROR_UNHANDLED_EXCEPTION       CONSTANT NUMBER := -20100;     
    ERROR_INVALID_AGENT             CONSTANT NUMBER := -20781; 
    ERROR_INVALID_LOCATION          CONSTANT NUMBER := -20782; 
    --following are new errors for MWS email module
    ERROR_RECORD_NOT_FOUND          CONSTANT NUMBER := -20784;
    ERROR_INVALID_REPORT            CONSTANT NUMBER := -20785;    
    ERROR_INVALID_EMAIL_ACCT_ID     CONSTANT NUMBER := -20786;    
    ERROR_INVALID_CONFIG_VALUE      CONSTANT NUMBER := -20787;
    
    
END pkg_constants;
/
