1 PACKAGE AS_UTILITY_PUB AUTHID CURRENT_USER as
2 /* $Header: asxputls.pls 120.1 2005/06/05 22:52:41 appldev $ */
3
4 -- Start of Comments
5 --
6 -- NAME
7 -- AS_UTILITY_PUB
8 --
9 -- PURPOSE
10 -- This package is a public utility API developed from Sales Core group
11 --
12 -- Constants:
13 -- G_VALID_LEVEL_ITEM
14 -- G_VALID_LEVEL_RECORD
15 -- G_VALID_LEVEL_INTER_RECORD
16 -- G_VALID_LEVEL_INTER_ENTITY
17 --
18 -- NOTES
19 --
20 --
21 -- HISTORY
22
23 -- 08/11/99 AWU CREATED(as AS_UTILITY)
24 -- 09/09/99 SOLIN UPDATED(change to JTF_PLSQL_API)
25 --
26 --
27 -- End of Comments
28
29 --------------------------------------------------------------------
30 --
31 -- PUBLIC CONSTANTS
32 --
33 --------------------------------------------------------------------
34
35 -- ************************************************************
36 -- The following constants are for validation levels.
37 -- ************************************************************
38 --
39 -- There are four types of validation APIs need to be provided:
40 -- Item level validation, Record level validation, Inter-record
41 -- level validation and Inter-entity level validation.
42 --
43 -- 1. Item level validation:
44 -- Validation of an individual item needs to be checked.
45 -- 2. Record level validation:
46 -- Missing-field and cross-field dependencies should be checked
47 -- 3. Inter-record(table) level validation:
48 -- Cross-record dependencies should be checked
49 -- 4. Inter- entity(among different records) level validation:
50 -- For multi-instance child entities, cross entity validation
51 -- should be performed. The order of execution depends on business
52 -- logic.
53 --
54 -- Public APIs by definition have to perform FULL validation on all
55 -- data passed to them; Accordingly, there should be no validation
56 -- levels defined for public APIs. Private APIs should include
57 -- p_validation_level parameter. Therefore, private APIs have more
58 -- flexibility when it comes to validation.
59 --
60
61 -- In our API coding, we need to handle those validation levels . Please
62 -- do the following check in your API:
63 --
64 -- IF (p_validation_level >= AS_UTILITY_PVT.G_VALID_LEVEL_ITEM
65 -- THEN
66 -- Perform item level validation;
67 -- END IF;
68 --
69 -- IF (p_validation_level >= AS_UTILITY_PVT.G_VALID_LEVEL_INTER_FIELD)
70 -- THEN
71 -- Perform record level validation;
72 -- END IF;
73 --
74 -- IF (p_validation_level >= AS_UTILITY_PVT.G_VALID_LEVEL_INTER_RECORD)
75 -- THEN
76 -- Perform inter-record level validation;
77 -- END IF;
78 --
79 -- IF (p_validation_level >= AS_UTILITY_PVT.G_VALID_LEVEL_INTER_ENTITY)
80 -- THEN
81 -- Perform inter-entity level validation;
82 -- END IF;
83 --
84 -- If you pass in JTF_PL_SQL_API.G_VALID_LEVEL_INTER_FIELD for
85 -- p_validation_level, item level validation will be bypassed. Record
86 -- level validation, inter-record level validation and inter-entity
87 -- level validation will be executed. For item level validation, form
88 -- interface can either use LOV or validation procedures to validate
89 -- data. If pass in validation level is FULL, all of the validations
90 -- above will be executed automatically. As for get_currentUser and
91 -- access check, we should do the following:
92 --
93 -- if (p_validation_level > FND_API.G_VALID_LEVEL_NONE)
94 -- then
95 -- Call get_currentUser;
96 -- Call has_xxxAccess;
97 -- end if;
98 -- Access API can be bypassed by Form since form will use business view
99 -- to handle access privilege check.
100 --
101
102 -- Perform item level validation only
103 G_VALID_LEVEL_ITEM CONSTANT NUMBER:= 90;
104
105 -- Perform record level(inter-field) validation only
106 G_VALID_LEVEL_RECORD CONSTANT NUMBER:= 80;
107
108 -- Perform inter-record level validation only
109 G_VALID_LEVEL_INTER_RECORD CONSTANT NUMBER:= 70;
110
111 -- Perform inter-entity level validation only
112 G_VALID_LEVEL_INTER_ENTITY CONSTANT NUMBER:= 60;
113
114
115 -- Start of Comments
116 --
117 -- Profile record: profile_rec_type
118 --
119 -- Notes:
120 -- This record type is the record type for profile values
121 --
122 -- End of Comments
123
124 TYPE profile_rec_type IS RECORD
125 (
126 profile_name VARCHAR2(80) := FND_API.G_MISS_CHAR,
127 profile_value VARCHAR2(240) := FND_API.G_MISS_CHAR
128 );
129
130 G_MISS_PROFILE_REC profile_rec_type;
131
132 TYPE profile_tbl_type IS TABLE OF profile_rec_type
133 INDEX BY BINARY_INTEGER;
134
135 G_MISS_PROFILE_TBL profile_tbl_type;
136
137 -- Start of Comments
138 --
139 -- Item property record: item_property_rec_type
140 --
141 -- Notes:
142 -- This record type is the record type for item level validation
143 --
144 -- End of Comments
145
146 TYPE item_property_rec_type IS RECORD
147 (
148 column_name VARCHAR2(30) := NULL,
149 required_flag VARCHAR2(1) := 'N',
150 alterable_flag VARCHAR2(1) := 'Y',
151 default_char_val VARCHAR2(320) := NULL,
152 default_num_val NUMBER := NULL,
153 default_date_val DATE := NULL
154 );
155
156 G_MISS_ITEM_PROPERTY_REC item_property_rec_type;
157
158 TYPE item_property_tbl_type IS TABLE OF item_property_rec_type
159 INDEX BY BINARY_INTEGER;
160
161 -- Start of Comments
162 --
163 -- API name : Get_Messages
164 -- Type : Public
165 -- Function : Get messages from message dictionary
166 --
167 --
168 -- Parameters :
169 -- IN :
170 -- p_message_count IN NUMBER,
171 -- OUT NOCOPY /* file.sql.39 change */ :
172 -- x_msgs OUT NOCOPY /* file.sql.39 change */ VARCHAR2
173 --
174 -- Version : Current version 1.0
175 -- Initial version 1.0
176 --
177 --
178 -- End of Comments
179 PROCEDURE Get_Messages(
180 p_message_count IN NUMBER,
181 x_msgs OUT NOCOPY /* file.sql.39 change */ VARCHAR2
182 );
183
184
185 END AS_UTILITY_PUB;