[Home] [Help]
PACKAGE BODY: APPS.EGO_GLOBALS
Source
1 PACKAGE BODY EGO_Globals AS
2 /* $Header: EGOSGLBB.pls 120.1 2005/06/02 05:40:41 lkapoor noship $ */
3 /**********************************************************************
4 --
5 -- Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA
6 -- All rights reserved.
7 --
8 -- FILENAME
9 --
10 -- EGOSGLBB.pls
11 --
12 -- DESCRIPTION
13 --
14 -- Body of package EGO_Globals
15 --
16 -- NOTES
17 --
18 -- HISTORY
19 --
20 -- 19-SEPT-2002 Rahul Chitko Initial Creation
21 --
22 **********************************************************************/
23
24 G_PKG_NAME CONSTANT VARCHAR2(30) := 'EGO_Globals';
25
26
27 PROCEDURE Set_Language_Code(p_language_code VARCHAR2)
28 IS
29 BEGIN
30 G_System_Information.Language_Code := p_Language_Code;
31 END;
32
33 FUNCTION Get_Language_Code RETURN VARCHAR2
34 IS
35 BEGIN
36 return G_System_Information.Language_Code;
37 END;
38
39 /*****************************************************************************
40 * Procedure : Set_User_Id
41 * Returns : None
42 * Parameters IN : User ID
43 * Parameters OUT: None
44 * Purpose : Will set the user ID attribute of the
45 * system_information_record
46 *****************************************************************************/
47 PROCEDURE Set_User_Id
48 ( p_user_id IN NUMBER)
49 IS
50 BEGIN
51 G_System_Information.user_id := p_user_id;
52
53 END Set_User_Id;
54
55 /***************************************************************************
56 * Function : Get_user_Id
57 * Returns : Number
58 * Parameters IN : None
59 * Parameters OUT: None
60 * Purpose : Will return the user_id attribute from the
61 * system_information_record
62 *****************************************************************************/
63 FUNCTION Get_User_ID RETURN NUMBER
64 IS
65 BEGIN
66 RETURN G_System_Information.User_id;
67
68 END Get_User_id;
69
70 /***************************************************************************
71 * Procedure : Set_BO_Identifier
72 * Returns : None
73 * Parameters IN : p_bo_identifier
74 * Parameters OUT: None
75 * Purpose : Procedure will set the Business object identifier attribute
76 * BO_Identifier of the system information record.
77 *****************************************************************************/
78 PROCEDURE Set_BO_Identifier
79 ( p_bo_identifier IN VARCHAR2 )
80 IS
81 BEGIN
82 G_System_Information.bo_identifier := p_bo_identifier;
83
84 END Set_BO_Identifier;
85
86 /***************************************************************************
87 * Function : Get_BO_Identifier
88 * Returns : VARCHAR2
89 * Parameters IN : None
90 * Parameters OUT: None
91 * Purpose : Function will return the value of the business object
92 * identifier attribute BO_Identifier from the system
93 * information record.
94 *****************************************************************************/
95 FUNCTION Get_BO_Identifier RETURN VARCHAR2
96 IS
97 BEGIN
98 RETURN G_System_Information.bo_identifier;
99
100 END Get_BO_Identifier;
101
102 /**************************************************************************
103 * Procedure : Transaction_Type_Validity
104 * Parameters IN : Transaction Type
105 * Entity Name
106 * Entity ID, so that it can be used in a meaningful message
107 * Parameters OUT: Valid flag
108 * Message Token Table
109 * Purpose : This procedure will check if the transaction type is valid
110 * for a particular entity.
111 **************************************************************************/
112 PROCEDURE Transaction_Type_Validity
113 ( p_transaction_type IN VARCHAR2
114 , p_entity IN VARCHAR2
115 , p_entity_id IN VARCHAR2
116 , x_valid OUT NOCOPY BOOLEAN
117 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
118 )
119 IS
120 l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
121 l_Token_Tbl Error_Handler.Token_Tbl_Type;
122 BEGIN
123 l_token_tbl(1).token_name := 'ENTITY_ID';
124 l_token_tbl(1).token_value := p_entity_id;
125
126 IF (p_Entity_ID = EGO_Globals.G_ITEM_CATALOG_GROUP AND
127 p_transaction_type NOT IN (EGO_Globals.G_OPR_CREATE, EGO_GLOBALS.G_OPR_UPDATE,
128 EGO_GLOBALS.G_OPR_DELETE, 'SYNC')
129 )
130 THEN
131 Error_Handler.Add_Error_Token( p_Message_Name => 'EGO_INVALID_TRANS_TYPE'
132 , p_token_tbl => l_token_tbl
133 , x_Mesg_Token_Tbl => x_mesg_token_tbl
134 );
135
136 x_valid := false;
137 END IF;
138
139 x_valid := TRUE;
140
141 END Transaction_Type_Validity;
142
143 END EGO_Globals;