1 package AK_SECURITY_PVT AUTHID CURRENT_USER as
2 /* $Header: akdvsecs.pls 120.2 2005/09/15 22:27:04 tshort ship $ */
3
4 -- Global constants holding the package and file names to be used by
5 -- messaging routines in the case of an unexpected error.
6
7 G_PKG_NAME CONSTANT VARCHAR2(30) := 'AK_SECURITY_PVT';
8
9 -- Procedure specs
10
11 --=======================================================
12 -- Function EXCLUDED_ITEM_EXISTS
13 --
14 -- Usage Private API for checking for the existence of
15 -- an excluded item with the given key values. This
16 -- API should only be called by other APIs that are
17 -- owned by the Core Modules Team (AK).
18 --
19 -- Desc This API check to see if an attribute record
20 -- exists with the given key values.
21 --
22 -- Results The API returns the standard p_return_status parameter
23 -- indicating one of the standard return statuses :
24 -- * Unexpected error
25 -- * Error
26 -- * Success
27 -- This function will return TRUE if such an attribute
28 -- exists, or FALSE otherwise.
29 -- Parameters Attribute key columns
30 --
31 -- Version Initial version number = 1.0
32 -- History Current version number = 1.0
33 --=======================================================
34 function EXCLUDED_ITEM_EXISTS (
35 p_api_version_number IN NUMBER,
36 p_return_status OUT NOCOPY VARCHAR2,
37 p_responsibility_id IN NUMBER,
38 p_resp_application_id IN NUMBER,
39 p_attribute_code IN VARCHAR2,
40 p_attribute_application_id IN NUMBER
41 ) return BOOLEAN;
42
43 --=======================================================
44 -- Function RESP_SECURITY_ATTR_EXISTS
45 --
46 -- Usage Private API for checking for the existence of
47 -- an attribute with the given key values. This
48 -- API should only be called by other APIs that are
49 -- owned by the Core Modules Team (AK).
50 --
51 -- Desc This API check to see if an attribute record
52 -- exists with the given key values.
53 --
54 -- Results The API returns the standard p_return_status parameter
55 -- indicating one of the standard return statuses :
56 -- * Unexpected error
57 -- * Error
58 -- * Success
59 -- This function will return TRUE if such an attribute
60 -- exists, or FALSE otherwise.
61 -- Parameters Attribute key columns
62 --
63 -- Version Initial version number = 1.0
64 -- History Current version number = 1.0
65 --=======================================================
66 function RESP_SECURITY_ATTR_EXISTS (
67 p_api_version_number IN NUMBER,
68 p_return_status OUT NOCOPY VARCHAR2,
69 p_responsibility_id IN NUMBER,
70 p_resp_application_id IN NUMBER,
71 p_attribute_code IN VARCHAR2,
72 p_attribute_application_id IN NUMBER
73 ) return BOOLEAN;
74
75 --=======================================================
76 -- Procedure CREATE_EXCLUDED_ITEM
77 --
78 -- Usage Private API for creating an excluded item. This
79 -- API should only be called by other APIs that are
80 -- owned by the Core Modules Team (AK).
81 --
82 -- Desc Creates an attribute using the given info. This
83 -- API should only be called by other APIs that are
84 -- owned by the Core Modules Team (AK).
85 --
86 -- Results The API returns the standard p_return_status parameter
87 -- indicating one of the standard return statuses :
88 -- * Unexpected error
89 -- * Error
90 -- * Success
91 -- Parameters Attribute columns
92 -- p_loader_timestamp : IN optional
93 -- If a timestamp is passed, the API will create the
94 -- record using this timestamp. Only the upload API
95 -- should call with this parameter loaded.
96 --
97 -- Version Initial version number = 1.0
98 -- History Current version number = 1.0
99 --=======================================================
100 procedure CREATE_EXCLUDED_ITEM (
101 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
102 p_api_version_number IN NUMBER,
103 p_init_msg_tbl IN BOOLEAN := FALSE,
104 p_msg_count OUT NOCOPY NUMBER,
105 p_msg_data OUT NOCOPY VARCHAR2,
106 p_return_status OUT NOCOPY VARCHAR2,
107 p_responsibility_id IN NUMBER,
108 p_resp_application_id IN NUMBER,
109 p_attribute_code IN VARCHAR2,
110 p_attribute_application_id IN NUMBER,
111 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
112 p_creation_date IN DATE := FND_API.G_MISS_DATE,
113 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
114 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
115 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
116 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE
117 );
118
119 --=======================================================
120 -- Procedure CREATE_RESP_SECURITY_ATTR
121 --
122 -- Usage Private API for creating an attribute. This
123 -- API should only be called by other APIs that are
124 -- owned by the Core Modules Team (AK).
125 --
126 -- Desc Creates an attribute using the given info. This
127 -- API should only be called by other APIs that are
128 -- owned by the Core Modules Team (AK).
129 --
130 -- Results The API returns the standard p_return_status parameter
131 -- indicating one of the standard return statuses :
132 -- * Unexpected error
133 -- * Error
134 -- * Success
135 -- Parameters Attribute columns
136 -- p_loader_timestamp : IN optional
137 -- If a timestamp is passed, the API will create the
138 -- record using this timestamp. Only the upload API
139 -- should call with this parameter loaded.
140 --
141 -- Version Initial version number = 1.0
142 -- History Current version number = 1.0
143 --=======================================================
144 procedure CREATE_RESP_SECURITY_ATTR (
145 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
146 p_api_version_number IN NUMBER,
147 p_init_msg_tbl IN BOOLEAN := FALSE,
148 p_msg_count OUT NOCOPY NUMBER,
149 p_msg_data OUT NOCOPY VARCHAR2,
150 p_return_status OUT NOCOPY VARCHAR2,
151 p_responsibility_id IN NUMBER,
152 p_resp_application_id IN NUMBER,
153 p_attribute_code IN VARCHAR2,
154 p_attribute_application_id IN NUMBER,
155 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
156 p_creation_date IN DATE := FND_API.G_MISS_DATE,
157 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
158 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
159 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
160 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE
161 );
162
163 --=======================================================
164 -- Procedure DOWNLOAD_EXCLUDED
165 --
166 -- Usage Private API for downloading excluded_items. This
167 -- API should only be called by other APIs that are
168 -- owned by the Core Modules Team (AK).
169 --
170 -- Desc This API will extract the attributes selected
171 -- by application ID or by key values from the
172 -- database to the output file.
173 --
174 -- Results The API returns the standard p_return_status parameter
175 -- indicating one of the standard return statuses :
176 -- * Unexpected error
177 -- * Error
178 -- * Success
179 -- Parameters
180 -- p_nls_language : IN optional
181 -- NLS language for database. If none if given,
182 -- the current NLS language will be used.
183 --
184 -- One of the following parameters must be provided:
185 --
186 -- p_application_id : IN optional
187 -- If given, all attributes for this application ID
188 -- will be written to the output file.
189 -- p_application_id will be ignored if a table is
190 -- given in p_attribute_pk_tbl.
191 -- p_excluded_pk_tbl : IN optional
192 -- If given, only ICX tables whose key values are
193 -- included in this table will be written to the
194 -- output file.
195 --
196 --
197 -- Version Initial version number = 1.0
198 -- History Current version number = 1.0
199 --=======================================================
200 procedure DOWNLOAD_EXCLUDED (
201 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
202 p_api_version_number IN NUMBER,
203 p_return_status OUT NOCOPY VARCHAR2,
204 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
205 p_excluded_pk_tbl IN AK_SECURITY_PUB.Resp_PK_Tbl_Type :=
206 AK_SECURITY_PUB.G_MISS_RESP_PK_TBL,
207 p_nls_language IN VARCHAR2
208 );
209
210 --=======================================================
211 -- Procedure DOWNLOAD_RESP_SEC
212 --
213 -- Usage Private API for downloading attributes. This
214 -- API should only be called by other APIs that are
215 -- owned by the Core Modules Team (AK).
216 --
217 -- Desc This API will extract the attributes selected
218 -- by application ID or by key values from the
219 -- database to the output file.
220 --
221 -- Results The API returns the standard p_return_status parameter
222 -- indicating one of the standard return statuses :
223 -- * Unexpected error
224 -- * Error
225 -- * Success
226 -- Parameters
227 -- p_nls_language : IN optional
228 -- NLS language for database. If none if given,
229 -- the current NLS language will be used.
230 --
231 -- One of the following parameters must be provided:
232 --
233 -- p_application_id : IN optional
234 -- If given, all attributes for this application ID
235 -- will be written to the output file.
236 -- p_application_id will be ignored if a table is
237 -- given in p_attribute_pk_tbl.
238 -- p_resp_pk_tbl : IN optional
239 -- If given, only ICX tables whose key values are
240 -- included in this table will be written to the
241 -- output file.
242 --
243 --
244 -- Version Initial version number = 1.0
245 -- History Current version number = 1.0
246 --=======================================================
247 procedure DOWNLOAD_RESP_SEC (
248 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
249 p_api_version_number IN NUMBER,
250 p_return_status OUT NOCOPY VARCHAR2,
251 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
252 p_resp_pk_tbl IN AK_SECURITY_PUB.Resp_PK_Tbl_Type :=
253 AK_SECURITY_PUB.G_MISS_RESP_PK_TBL,
254 p_nls_language IN VARCHAR2
255 );
256
257 --=======================================================
258 -- Procedure INSERT_ATTRIBUTE_PK_TABLE
259 --
260 -- Usage Private API for inserting the given attribute's
261 -- primary key value into the given attribute
262 -- table.
263 -- This API should only be called by other APIs
264 -- that are owned by the Core Modules Team (AK).
265 --
266 -- Desc This API inserts the given attribute primary
267 -- key value into a given attribute table
268 -- (of type Attribute_PK_Tbl_Type) only if the
269 -- primary key does not already exist in the table.
270 --
271 -- Results The API returns the standard p_return_status parameter
272 -- indicating one of the standard return statuses :
273 -- * Unexpected error
274 -- * Error
275 -- * Success
276 -- Parameters Attribute key columns: IN required
277 -- p_attribute_pk_tbl : IN OUT
278 -- Attribute table to be updated.
279 --
280 -- Version Initial version number = 1.0
281 -- History Current version number = 1.0
282 --=======================================================
283 procedure INSERT_ATTRIBUTE_PK_TABLE (
284 p_return_status OUT NOCOPY VARCHAR2,
285 p_attribute_application_id IN NUMBER,
286 p_attribute_code IN VARCHAR2,
287 p_attribute_pk_tbl IN OUT NOCOPY AK_ATTRIBUTE_PUB.Attribute_PK_Tbl_Type
288 );
289
290 --=======================================================
291 -- Procedure UPLOAD_SECURITY
292 --
293 -- Usage Private API for loading attributes from a
294 -- loader file to the database.
295 -- This API should only be called by other APIs
296 -- that are owned by the Core Modules Team (AK).
297 --
298 -- Desc This API reads the attribute data stored in
299 -- the loader file currently being processed, parses
300 -- the data, and loads them to the database. The tables
301 -- are updated with the timestamp passed. This API
302 -- will process the file until the EOF is reached,
303 -- a parse error is encountered, or when data for
304 -- a different business object is read from the file.
305 --
306 -- Results The API returns the standard p_return_status parameter
307 -- indicating one of the standard return statuses :
308 -- * Unexpected error
309 -- * Error
310 -- * Success
311 -- Parameters p_index : IN OUT required
312 -- Index of PL/SQL file to be processed.
313 -- p_loader_timestamp : IN required
314 -- The timestamp to be used when creating or updating
315 -- records
316 -- p_line_num : IN optional
317 -- The first line number in the file to be processed.
318 -- It is used for keeping track of the line number
319 -- read so that this info can be included in the
320 -- error message when a parse error occurred.
321 -- p_buffer : IN required
322 -- The content of the first line to be processed.
323 -- The calling API has already read the first line
324 -- that needs to be parsed by this API, so this
325 -- line won't be read from the file again.
326 -- p_line_num_out : OUT
327 -- The number of the last line in the loader file
328 -- that is read by this API.
329 -- p_buffer_out : OUT
330 -- The content of the last line read by this API.
331 -- If an EOF has not reached, this line would
332 -- contain the beginning of another business object
333 -- that will need to be processed by another API.
334 --
335 -- Version Initial version number = 1.0
336 -- History Current version number = 1.0
337 --=======================================================
338 procedure UPLOAD_SECURITY (
339 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
340 p_api_version_number IN NUMBER,
341 p_return_status OUT NOCOPY VARCHAR2,
342 p_index IN OUT NOCOPY NUMBER,
343 p_loader_timestamp IN DATE,
344 p_line_num IN NUMBER := FND_API.G_MISS_NUM,
345 p_buffer IN AK_ON_OBJECTS_PUB.Buffer_Type,
346 p_line_num_out OUT NOCOPY NUMBER,
347 p_buffer_out OUT NOCOPY AK_ON_OBJECTS_PUB.Buffer_Type,
348 p_upl_loader_cur IN OUT NOCOPY AK_ON_OBJECTS_PUB.LoaderCurTyp
349 );
350
351 --=======================================================
352 -- Function VALIDATE_SECURITY
353 --
354 -- Usage Private API for validating an excluded items. This
355 -- API should only be called by other APIs that are
356 -- owned by the Core Modules Team (AK).
357 --
358 -- Desc Perform validation on an exluded items record or
359 -- resp_security_attributes record.
360 --
361 -- Results The API returns the standard p_return_status parameter
362 -- indicating one of the standard return statuses :
363 -- * Unexpected error
364 -- * Error
365 -- * Success
366 -- In addition, this function returns TRUE if all
367 -- validation tests are passed, or FALSE otherwise.
368 -- Parameters Attribute columns
369 -- p_caller : IN required
370 -- Must be one of the following values defined
371 -- in package AK_ON_OBJECTS_PVT:
372 -- - G_CREATE (if calling from the Create API)
373 -- - G_DOWNLOAD (if calling from the Download API)
374 -- - G_UPDATE (if calling from the Update API)
375 --
376 -- Note This API is intended for performing record-level
377 -- validation. It is not designed for item-level
378 -- validation.
379 --
380 -- Version Initial version number = 1.0
381 -- History Current version number = 1.0
382 --=======================================================
383 function VALIDATE_SECURITY (
384 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
385 p_api_version_number IN NUMBER,
386 p_return_status OUT NOCOPY VARCHAR2,
387 p_responsibility_appl_id IN NUMBER := FND_API.G_MISS_NUM,
388 p_responsibility_id IN NUMBER := FND_API.G_MISS_NUM,
389 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
390 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
391 p_caller IN VARCHAR2
392 ) return BOOLEAN;
393
394 end AK_SECURITY_pvt;