DBA Data[Home] [Help]

PACKAGE: APPS.JTF_NOTES_PUB

Source


1 PACKAGE JTF_NOTES_PUB  as
2 /* $Header: jtfnotes.pls 120.9 2006/06/28 09:55:13 mpadhiar ship $ */
3 /*#
4  * A public interface that can be used to create, update, and delete notes for various business entities such as Service Request, Task, Customer, etc.
5  *
6  * @rep:scope public
7  * @rep:product CAC
8  * @rep:displayname Notes Management
9  * @rep:lifecycle active
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY CAC_NOTE
12  * @rep:category BUSINESS_ENTITY CS_SERVICE_REQUEST
13  * @rep:category BUSINESS_ENTITY AS_OPPORTUNITY
14  * @rep:category BUSINESS_ENTITY AMS_LEAD
15  */
16 
17 
18 TYPE jtf_note_contexts_rec_type IS
19 RECORD( NOTE_CONTEXT_ID        NUMBER
20       , JTF_NOTE_ID            NUMBER
21       , NOTE_CONTEXT_TYPE      VARCHAR2(240)
22       , NOTE_CONTEXT_TYPE_ID   NUMBER
23       , LAST_UPDATE_DATE       DATE
24       , LAST_UPDATED_BY        NUMBER(15)
25       , CREATION_DATE          DATE
26       , CREATED_BY             NUMBER
27       , LAST_UPDATE_LOGIN      NUMBER
28       );
29 
30 TYPE jtf_note_contexts_tbl_type IS
31 TABLE of jtf_note_contexts_rec_type
32 INDEX BY BINARY_INTEGER;
33 
34 jtf_note_contexts_tab      jtf_note_contexts_tbl_type;
35 jtf_note_contexts_tab_dflt jtf_note_contexts_tbl_type;
36 
37 
38 PROCEDURE Create_note
39 -- --------------------------------------------------------------------------
40 -- Start of notes
41 --  API Name    : Create_Note
42 --  Type        : Public
43 --  Description : Insert a Note into JTF_NOTES table
44 --  Pre-reqs    :
45 --  Parameters  :
46 --     p_parent_note_id           IN     NUMBER     Optional Default = FND_API.G_MISS_NUM
47 --     p_jtf_note_id              IN     NUMBER     Optional Default = FND_API.G_MISS_NUM
48 --     p_api_version              IN     NUMBER     Required
49 --     p_init_msg_list            IN     VARCHAR2   Optional Default = FND_API.G_FALSE
50 --     p_commit                   IN     VARCHAR2   Optional Default = FND_API.G_FALSE
51 --     p_validation_level         IN     NUMBER     Optional Default = FND_API.G_VALID_LEVEL_FULL
52 --                                                  This parameter should always be
53 --                                                  FND_API.G_VALID_LEVEL_FULL if the api is called from external apis
54 --     p_return_status               OUT VARCHAR2   Required Length  = 1
55 --     p_msg_count                   OUT NUMBER     Required
56 --     p_msg_data                    OUT VARCHAR2   Required Length  = 2000
57 --     p_source_object_id         IN     NUMBER     (eg  request_id for Service Request)
58 --     p_source_object_code       IN     VARCHAR2   (eg  INC for Service Request)
59 --     p_notes                    IN     VARCHAR2   Required
60 --     p_notes_detail             IN     VARCHAR2   Optional Default NULL
61 --     p_note_status              IN     VARCHAR2   Default 'I'
62 --     p_entered_by               IN     NUMBER     Required
63 --     p_entered_date             IN     DATE       Required
64 --     p_jtf_note_id                 OUT NUMBER     Required
65 --     p_last_update_date         IN     DATE       Required
66 --     p_last_updated_by          IN     NUMBER     Optional Default fnd_global.user_id
67 --     p_creation_date            IN     DATE       Required
68 --     p_created_by               IN     NUMBER     Optional Default fnd_global.user_id
69 --     p_last_update_login        IN     NUMBER     Optional Default fnd_global.login_id
70 --     p_attribute1               IN     VARCHAR2   Optional Default NULL
71 --     p_attribute2               IN     VARCHAR2   Optional Default NULL
72 --     p_attribute3               IN     VARCHAR2   Optional Default NULL
73 --     p_attribute4               IN     VARCHAR2   Optional Default NULL
74 --     p_attribute5               IN     VARCHAR2   Optional Default NULL
75 --     p_attribute6               IN     VARCHAR2   Optional Default NULL
76 --     p_attribute7               IN     VARCHAR2   Optional Default NULL
77 --     p_attribute8               IN     VARCHAR2   Optional Default NULL
78 --     p_attribute9               IN     VARCHAR2   Optional Default NULL
79 --     p_attribute10              IN     VARCHAR2   Optional Default NULL
80 --     p_attribute11              IN     VARCHAR2   Optional Default NULL
81 --     p_attribute12              IN     VARCHAR2   Optional Default NULL
82 --     p_attribute13              IN     VARCHAR2   Optional Default NULL
83 --     p_attribute14              IN     VARCHAR2   Optional Default NULL
84 --     p_attribute15              IN     VARCHAR2   Optional Default NULL
85 --     p_context                  IN     VARCHAR2   Optional Default NULL
86 --
87 --  Version     : Initial Version     1.0
88 --
89 --  Notes       :
90 --
91 -- p_note_type      IN VARCHAR2 Optional Default = NULL
92 --
93 -- Version : Revision   1.1
94 --
95 --  Notes       :
96 --
97 --  Added the context table as a PL/SQL table type
98 --
99 -- End of notes
100 -- --------------------------------------------------------------------------
101 
102 ( p_parent_note_id        IN            NUMBER   DEFAULT 9.99E125
103 , p_jtf_note_id           IN            NUMBER   DEFAULT 9.99E125
104 , p_api_version           IN            NUMBER
105 , p_init_msg_list         IN            VARCHAR2 DEFAULT 'F'
106 , p_commit                IN            VARCHAR2 DEFAULT 'F'
107 , p_validation_level      IN            NUMBER   DEFAULT 100
108 , x_return_status            OUT NOCOPY VARCHAR2
109 , x_msg_count                OUT NOCOPY NUMBER
110 , x_msg_data                 OUT NOCOPY VARCHAR2
111 , p_org_id                IN            NUMBER   DEFAULT NULL
112 , p_source_object_id      IN            NUMBER   DEFAULT 9.99E125
113 , p_source_object_code    IN            VARCHAR2 DEFAULT CHR(0)
114 , p_notes                 IN            VARCHAR2 DEFAULT CHR(0)
115 , p_notes_detail          IN            VARCHAR2 DEFAULT NULL
116 , p_note_status           IN            VARCHAR2 DEFAULT 'I'
117 , p_entered_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
118 , p_entered_date          IN            DATE     DEFAULT TO_DATE('1','j')
119 , x_jtf_note_id              OUT NOCOPY NUMBER
120 , p_last_update_date      IN            DATE     DEFAULT TO_DATE('1','j')
121 , p_last_updated_by       IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
122 , p_creation_date         IN            DATE     DEFAULT TO_DATE('1','j')
123 , p_created_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
124 , p_last_update_login     IN            NUMBER   DEFAULT FND_GLOBAL.LOGIN_ID
125 , p_attribute1            IN            VARCHAR2 DEFAULT NULL
126 , p_attribute2            IN            VARCHAR2 DEFAULT NULL
127 , p_attribute3            IN            VARCHAR2 DEFAULT NULL
128 , p_attribute4            IN            VARCHAR2 DEFAULT NULL
129 , p_attribute5            IN            VARCHAR2 DEFAULT NULL
130 , p_attribute6            IN            VARCHAR2 DEFAULT NULL
131 , p_attribute7            IN            VARCHAR2 DEFAULT NULL
132 , p_attribute8            IN            VARCHAR2 DEFAULT NULL
133 , p_attribute9            IN            VARCHAR2 DEFAULT NULL
134 , p_attribute10           IN            VARCHAR2 DEFAULT NULL
135 , p_attribute11           IN            VARCHAR2 DEFAULT NULL
136 , p_attribute12           IN            VARCHAR2 DEFAULT NULL
137 , p_attribute13           IN            VARCHAR2 DEFAULT NULL
138 , p_attribute14           IN            VARCHAR2 DEFAULT NULL
139 , p_attribute15           IN            VARCHAR2 DEFAULT NULL
140 , p_context               IN            VARCHAR2 DEFAULT NULL
141 , p_note_type             IN            VARCHAR2 DEFAULT NULL
142 , p_jtf_note_contexts_tab IN            jtf_note_contexts_tbl_type
143                                            DEFAULT jtf_note_contexts_tab_dflt
144 );
145 
146 
147 PROCEDURE Update_note
148 -- --------------------------------------------------------------------------
149 -- Start of notes
150 --  API Name  : Update_Note
151 --  Type      : Public
152 --  Usage     : Updates a note record in the table JTF_NOTES
153 --  Pre-reqs  : None
154 --  Parameters  :
155 --    p_api_version           IN    NUMBER     Required
156 --    p_init_msg_list         IN    VARCHAR2   Optional Default = FND_API.G_FALSE
157 --    p_commit                IN    VARCHAR2   Optional Default = FND_API.G_FALSE
158 --    p_validation_level      IN    NUMBER     Optional Default = FND_API.G_VALID_LEVEL_FULL
159 --    x_return_status           OUT VARCHAR2   Required
160 --    x_msg_count               OUT NUMBER     Required
161 --    x_msg_data                OUT VARCHAR2   Required
162 --    p_jtf_note_id           IN    NUMBER     Required Primary key of the note record
163 --    p_last_updated_by       IN    NUMBER     Required Corresponds to the column USER_ID in the table FND_USER, and
164 --                                                      identifies the Oracle Applications user who updated this record
165 --    p_last_update_date      IN    DATE       Optional Date on which this record is updated
166 --    p_last_update_login     IN    NUMBER     Optional Corresponds to the column LOGIN_ID in the table FND_LOGINS,
167 --                                                      and identifies the login session of the user
168 --    p_notes                 IN    VARCHAR2   Optional Updated note max 2000 Characters
169 --    p_notes_detail          IN    VARCHAR2   Optional Updated note detail max 32Kb
170 --    p_append_flag           IN    VARCHAR2   Optional DEFAULT 'F'
171 --    p_note_status           IN    VARCHAR2   Optional Indicates the status of the note.
172 --                                                      Whether it is 'P'rivate/'I'Public/'P'ublish
173 --                                                      'I' Public is the default
174 --    p_note_type             IN    VARCHAR2   Optional Type of the Note
175 --    p_jtf_note_contexts_tab IN    jtf_note_contexts_tbl_type
176 --                                             Optional Default  jtf_note_contexts_tab_dflt
177 --
178 --  Version     : Initial version        1.0
179 --
180 --
181 -- End of notes
182 -- --------------------------------------------------------------------------
183 ( p_api_version           IN            NUMBER
184 , p_init_msg_list         IN            VARCHAR2 DEFAULT 'F'
185 , p_commit                IN            VARCHAR2 DEFAULT 'F'
186 , p_validation_level      IN            NUMBER   DEFAULT 100
187 , x_return_status            OUT NOCOPY VARCHAR2
188 , x_msg_count                OUT NOCOPY NUMBER
189 , x_msg_data                 OUT NOCOPY VARCHAR2
190 , p_jtf_note_id           IN            NUMBER
191 , p_entered_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
192 , p_last_updated_by       IN            NUMBER
193 , p_last_update_date      IN            DATE     DEFAULT SYSDATE
194 , p_last_update_login     IN            NUMBER   DEFAULT NULL
195 , p_notes                 IN            VARCHAR2 DEFAULT CHR(0)
196 , p_notes_detail          IN            VARCHAR2 DEFAULT CHR(0)
197 , p_append_flag           IN            VARCHAR2 DEFAULT CHR(0)
198 , p_note_status           IN            VARCHAR2 DEFAULT 'I'
199 , p_note_type             IN            VARCHAR2 DEFAULT CHR(0)
200 , p_jtf_note_contexts_tab IN            jtf_note_contexts_tbl_type
201                                           DEFAULT jtf_note_contexts_tab_dflt
202 );
203 
204 
205 PROCEDURE Validate_note_type
206 -- --------------------------------------------------------------------------
207 -- Start of notes
208 --  API Name  : Validate_note_type
209 --  Type      : Private
210 --  Usage     : This procedure accepts the note_type as input and checks
211 --              whether it is present at the fnd_LOOKUPS table for the
212 --              lookup_type of 'JTF_note_type'
213 -- --------------------------------------------------------------------------
214 ( p_api_name        IN            VARCHAR2
215 , p_parameter_name  IN            VARCHAR2
216 , p_note_type       IN            VARCHAR2
217 , x_return_status      OUT NOCOPY VARCHAR2
218 );
219 
220 
221 PROCEDURE Create_note_context
222 -- --------------------------------------------------------------------------
223 -- Start of notes
224 --  API Name  : Create_note_context
225 --  Type      : Private
226 --  Usage     : This procedure will create a record in the jtf_note_contexts
227 --              table. If the context record already exists it will not be
228 --              created.
229 -- --------------------------------------------------------------------------
230 ( p_validation_level     IN            NUMBER   DEFAULT 100
231 , x_return_status           OUT NOCOPY VARCHAR2
232 , p_jtf_note_id          IN            NUMBER
233 , p_last_update_date     IN            DATE
234 , p_last_updated_by      IN            NUMBER
235 , p_creation_date        IN            DATE
236 , p_created_by           IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
237 , p_last_update_login    IN            NUMBER   DEFAULT FND_GLOBAL.LOGIN_ID
238 , p_note_context_type_id IN            NUMBER   DEFAULT 9.99E125
239 , p_note_context_type    IN            VARCHAR2 DEFAULT CHR(0)
240 , x_note_context_id         OUT NOCOPY NUMBER
241 );
242 
243 PROCEDURE Update_note_context
244 -- --------------------------------------------------------------------------
245 -- Start of notes
246 --  API Name  : Update_note_context
247 --  Type      : Private
248 --  Usage     : This procedure will update a record in the jtf_note_contexts
249 --              table.
250 -- --------------------------------------------------------------------------
251 ( p_validation_level     IN            NUMBER   DEFAULT FND_API.G_VALID_LEVEL_FULL
252 , x_return_status           OUT NOCOPY VARCHAR2
253 , p_note_context_id      IN            NUMBER
254 , p_jtf_note_id          IN            NUMBER
255 , p_note_context_type_id IN            NUMBER
256 , p_note_context_type    IN            VARCHAR2
257 , p_last_updated_by      IN            NUMBER
258 , p_last_update_date     IN            DATE     DEFAULT SYSDATE
259 , p_last_update_login    IN            NUMBER   DEFAULT NULL
260 );
261 
262 PROCEDURE Add_Invalid_Argument_Msg
263 -- --------------------------------------------------------------------------
264 -- Start of notes
265 --  API Name  : Add_Invalid_Argument_Msg
266 --  Type      : Private
267 --  Usage     : do not use
268 -- --------------------------------------------------------------------------
269 ( p_token_an  IN   VARCHAR2
270 , p_token_v   IN   VARCHAR2
271 , p_token_p   IN   VARCHAR2
272 );
273 
274 
275 PROCEDURE Add_Missing_Param_Msg
276 -- --------------------------------------------------------------------------
277 -- Start of notes
278 --  API Name  : Add_Missing_Param_Msg
279 --  Type      : Private
280 --  Usage     : do not use
281 -- --------------------------------------------------------------------------
282 ( p_token_an  IN  VARCHAR2
283 , p_token_mp  IN  VARCHAR2
284 );
285 
286 
287 PROCEDURE Add_Null_Parameter_Msg
288 -- --------------------------------------------------------------------------
289 -- Start of notes
290 --  API Name  : Add_Null_Parameter_Msg
291 --  Type      : Private
292 --  Usage     : do not use
293 -- --------------------------------------------------------------------------
294 ( p_token_an  IN  VARCHAR2
295 , p_token_np  IN  VARCHAR2
296 );
297 
298 
299 PROCEDURE Trunc_String_length
300 -- --------------------------------------------------------------------------
301 -- Start of notes
302 --  API Name  : Trunc_String_length
303 --  Type      : Private
304 --  Usage     : do not use
305 -- --------------------------------------------------------------------------
306 ( p_api_name       IN            VARCHAR2
307 , p_parameter_name IN            VARCHAR2
308 , p_str            IN            VARCHAR2
309 , p_len            IN            NUMBER
310 , x_str               OUT NOCOPY VARCHAR2
311 );
312 
313 PROCEDURE Validate_object
314 -- --------------------------------------------------------------------------
315 -- Start of notes
316 --  API Name  : Validate_object
317 --  Type      : Private
318 --  Usage     : do not use
319 -- --------------------------------------------------------------------------
320 ( p_api_name         IN            VARCHAR2
321 , p_object_type_code IN            VARCHAR2
322 , p_object_type_id   IN            NUMBER
323 , x_return_status       OUT NOCOPY VARCHAR2
324 );
325 
326 PROCEDURE writeLobToData
327 -- --------------------------------------------------------------------------
328 -- Start of notes
329 --  API Name  : writeLobToData
330 --  Type      : Private
331 --  Usage     : do not use
335 );
332 -- --------------------------------------------------------------------------
333 ( x_jtf_note_id               NUMBER
334 , x_buffer         OUT NOCOPY VARCHAR2
336 
337 PROCEDURE writeDatatoLob
338 -- --------------------------------------------------------------------------
339 -- Start of notes
340 --  API Name  : writeDatatoLob
341 --  Type      : Private
342 --  Usage     : do not use
343 -- --------------------------------------------------------------------------
344 ( x_jtf_note_id       NUMBER
345 , x_buffer            VARCHAR2
346 );
347 
348 PROCEDURE validate_entered_by
349 -- --------------------------------------------------------------------------
350 -- Start of notes
351 --  API Name  : validate_entered_by
352 --  Type      : Private
353 --  Usage     : do not use
354 -- --------------------------------------------------------------------------
355 ( p_entered_by      IN            NUMBER
356 , x_return_status      OUT NOCOPY VARCHAR2
357 , x_entered_by         OUT NOCOPY NUMBER
358 );
359 
360 /*#
361  * Deletes an existing note while applying appropriate security policies.
362  *
363  * @param p_jtf_note_id Unique note identifier, identifies which note record is to be deleted.
364  * @param p_api_version Standard API version number.
365  * @param p_init_msg_list Standard API flag allows API callers to request that the API does the initialization of the message list on their behalf. By default, the message list will not be initialized.
366  * @param p_commit Optional Standard API flag is used by API callers to ask the API to commit on their behalf after performing its function. By default, the commit will not be performed.
367  * @param p_validation_level This value determines whether validation should occur or not. This variable is checked against FND_API.G_VALID_LEVEL_NONE and if it is greater than the latter, validation occurs.
368  * @param x_return_status Result of all the operations performed by the API. This will have one of the following values:
369  * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code> - If the API processed the data successfully.
370  * <LI><Code>FND_API.G_RET_STS_ERROR</Code> - If there was an expected error in API processing.
371  * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code> If there was an unexpected error in API processing.
372  * @param x_msg_count Number of messages returned in the API message list.
373  * @param x_msg_data Returned message data in an encoded format if <code>x_msg_count</code> returns non-zero value.
374  * @param p_use_AOL_security AOL Security Flag, Optional Default FND_API.G_TRUE.
375  * @rep:scope public
376  * @rep:lifecycle active
377  * @rep:displayname Delete Note
378  * @rep:metalink 249665.1 Oracle Common Application Calendar - API Reference Guide
379  * @rep:category BUSINESS_ENTITY CS_SERVICE_REQUEST
380  * @rep:category BUSINESS_ENTITY AS_OPPORTUNITY
381  * @rep:category BUSINESS_ENTITY AMS_LEAD
382  */
383 
384 PROCEDURE Secure_Delete_note
385 -- --------------------------------------------------------------------------
386 -- Start of notes
387 --  API Name  : Delete_Note will only work when the user is granted the
388 --              JTF_NOTE_DELETE privilege through AOL security framework
389 --  Type      : Public
390 --  Usage     : Deletes a note record in the table JTF_NOTES_B/JTF_NOTES_TL and JTF_NOTE_CONTEXTS
391 --  Pre-reqs  : None
392 --  Parameters  :
393 --    p_api_version           IN    NUMBER     Required
394 --    p_init_msg_list         IN    VARCHAR2   Optional Default = FND_API.G_FALSE
395 --    p_commit                IN    VARCHAR2   Optional Default = FND_API.G_FALSE
396 --    p_validation_level      IN    NUMBER     Optional Default = FND_API.G_VALID_LEVEL_FULL
397 --    x_return_status           OUT VARCHAR2   Required
398 --    x_msg_count               OUT NUMBER     Required
399 --    x_msg_data                OUT VARCHAR2   Required
400 --    p_jtf_note_id           IN    NUMBER     Required Primary key of the note record
401 --    p_use_AOL_security      IN    VARCHAR2   Optional Default FND_API.G_TRUE
402 --
403 --  Version     : Initial version        1.0
404 --
405 --
406 -- End of notes
407 -- --------------------------------------------------------------------------
408 ( p_api_version           IN            NUMBER
409 , p_init_msg_list         IN            VARCHAR2 DEFAULT 'F'
410 , p_commit                IN            VARCHAR2 DEFAULT 'F'
411 , p_validation_level      IN            NUMBER   DEFAULT 100
412 , x_return_status            OUT NOCOPY VARCHAR2
413 , x_msg_count                OUT NOCOPY NUMBER
414 , x_msg_data                 OUT NOCOPY VARCHAR2
415 , p_jtf_note_id           IN            NUMBER
416 , p_use_AOL_security      IN            VARCHAR2 DEFAULT 'T'
417 );
418 
419 /*#
420  * Creates a note for a given business entity while applying appropriate security policies.
421  *
422  * @param p_parent_note_id This parameter is Obsolete.
423  * @param p_jtf_note_id Unique note identifier. It will be generated from the sequence <code>JTF_NOTES_S</code> when not passed.
424  * @param p_api_version Standard API version number.
425  * @param p_init_msg_list Standard API flag allows API callers to request that the API does the initialization of the message list on their behalf. By default, the message list will not be initialized.
426  * @param p_commit Optional Standard API flag is used by API callers to ask the API to commit on their behalf after performing its function. By default, the commit will not be performed.
427  * @param x_return_status Result of all the operations performed by the API. This will have one of the following values:
428  * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code> - If the API processed the data successfully.
432  * @param x_msg_count Number of messages returned in the API message list.
429  * <LI><Code>FND_API.G_RET_STS_ERROR</Code> - If there was an expected error in API processing.
430  * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code> If there was an unexpected error in API processing.
431  * @param p_validation_level This value determines whether validation should occur or not. This variable is checked against FND_API.G_VALID_LEVEL_NONE and if it is greater than the latter, validation occurs.
433  * @param x_msg_data Returned message data in an encoded format if <code>x_msg_count</code> returns non-zero value.
434  * @param p_org_id An identifier for the organization.
435  * @param p_source_object_id Dependent on parameter p_source_object_code; for example, if the source business object is a service request, this is the service request number.
436  * @param p_source_object_code The source business object for the note; for example, this could be TASK if the source object is a task, or ESC if the source object is an escalated document.
437  * @param p_notes The actual note text, passed from the source application.
438  * @param p_notes_detail This parameter is used to store larger notes of up to 32k.
439  * @param p_note_status Indicates the status of the note. Choices are:
440  * <LI><Code>Private (E)</Code>
441  * <LI><Code>Public  (I)</Code>
442  * <LI><Code>Publish (P)</Code>
443  * This value must be either E, I, or P. If it is not, an error is raised. If none is provided, I is used.
444  * @param p_entered_by Identifies the Oracle Applications user who entered this record. If a valid user identifier is not provided, an error is raised.
445  * @param p_entered_date The date that the record was entered. If not provided, SYSDATE is used.
446  * @param x_jtf_note_id The unique note identifier. This value is the same as p_jtf_note_id.
447  * @param p_last_update_date The date that this record was last updated. If not provided, SYSDATE is used.
448  * @param p_last_updated_by Identifies the Oracle Applications user who last updated this record.
449  * @param p_creation_date The date on which this note was first created. If not provided, SYSDATE is used.
450  * @param p_created_by Identifies the Oracle Applications user who first created this record.
451  * @param p_last_update_login Identifies the login session of the Oracle Applications user that last updated the note.
452  * @param p_attribute1 Descriptive Flexfield Segment.
453  * @param p_attribute2 Descriptive Flexfield Segment.
454  * @param p_attribute3 Descriptive Flexfield Segment.
455  * @param p_attribute4 Descriptive Flexfield Segment.
456  * @param p_attribute5 Descriptive Flexfield Segment.
457  * @param p_attribute6 Descriptive Flexfield Segment.
458  * @param p_attribute7 Descriptive Flexfield Segment.
459  * @param p_attribute8 Descriptive Flexfield Segment.
460  * @param p_attribute9 Descriptive Flexfield Segment.
461  * @param p_attribute10 Descriptive Flexfield Segment.
462  * @param p_attribute11 Descriptive Flexfield Segment.
463  * @param p_attribute12 Descriptive Flexfield Segment.
464  * @param p_attribute13 Descriptive Flexfield Segment.
465  * @param p_attribute14 Descriptive Flexfield Segment.
466  * @param p_attribute15 Descriptive Flexfield Segment.
467  * @param p_context This is a short description field.
468  * @param p_note_type The type of note, based on the source business object; for example, this could be SR_PROBLEM, if the note concerns a service request problem. If this value is not valid, an error is raised.
469  * @param p_jtf_note_contexts_tab Table of PL/SQL records used to specify the note context. For details see: Oracle Common Application Calendar - API Reference Guide.
470  * @param p_use_AOL_security AOL Security Flag, Optional Default FND_API.G_TRUE.
471  * @rep:scope public
472  * @rep:lifecycle active
473  * @rep:displayname Create Note
474  * @rep:metalink 249665.1 Oracle Common Application Calendar - API Reference Guide
475  * @rep:category BUSINESS_ENTITY CS_SERVICE_REQUEST
476  * @rep:category BUSINESS_ENTITY AS_OPPORTUNITY
477  * @rep:category BUSINESS_ENTITY AMS_LEAD
478  */
479 
480 PROCEDURE Secure_Create_note
481 -- --------------------------------------------------------------------------
482 -- Start of notes
483 --  API Name    : Create_Note (Overloaded version with AOL security support)
484 --  Type        : Public
485 --  Description : Insert a Note into JTF_NOTES table
486 --  Pre-reqs    :
487 --  Parameters  :
488 --     p_parent_note_id           IN     NUMBER     Optional Default = FND_API.G_MISS_NUM
489 --     p_jtf_note_id              IN     NUMBER     Optional Default = FND_API.G_MISS_NUM
490 --     p_api_version              IN     NUMBER     Required
491 --     p_init_msg_list            IN     VARCHAR2   Optional Default = FND_API.G_FALSE
492 --     p_commit                   IN     VARCHAR2   Optional Default = FND_API.G_FALSE
493 --     p_validation_level         IN     NUMBER     Optional Default = FND_API.G_VALID_LEVEL_FULL
494 --                                                  This parameter should always be
495 --                                                  FND_API.G_VALID_LEVEL_FULL if the api is called from external apis
496 --     p_return_status               OUT VARCHAR2   Required Length  = 1
497 --     p_msg_count                   OUT NUMBER     Required
498 --     p_msg_data                    OUT VARCHAR2   Required Length  = 2000
499 --     p_source_object_id         IN     NUMBER     (eg  request_id for Service Request)
500 --     p_source_object_code       IN     VARCHAR2   (eg  INC for Service Request)
501 --     p_notes                    IN     VARCHAR2   Required
502 --     p_notes_detail             IN     VARCHAR2   Optional Default NULL
503 --     p_note_status              IN     VARCHAR2   Default 'I'
504 --     p_entered_by               IN     NUMBER     Required
505 --     p_entered_date             IN     DATE       Required
509 --     p_creation_date            IN     DATE       Required
506 --     p_jtf_note_id                 OUT NUMBER     Required
507 --     p_last_update_date         IN     DATE       Required
508 --     p_last_updated_by          IN     NUMBER     Optional Default fnd_global.user_id
510 --     p_created_by               IN     NUMBER     Optional Default fnd_global.user_id
511 --     p_last_update_login        IN     NUMBER     Optional Default fnd_global.login_id
512 --     p_attribute1               IN     VARCHAR2   Optional Default NULL
513 --     p_attribute2               IN     VARCHAR2   Optional Default NULL
514 --     p_attribute3               IN     VARCHAR2   Optional Default NULL
515 --     p_attribute4               IN     VARCHAR2   Optional Default NULL
516 --     p_attribute5               IN     VARCHAR2   Optional Default NULL
517 --     p_attribute6               IN     VARCHAR2   Optional Default NULL
518 --     p_attribute7               IN     VARCHAR2   Optional Default NULL
519 --     p_attribute8               IN     VARCHAR2   Optional Default NULL
520 --     p_attribute9               IN     VARCHAR2   Optional Default NULL
521 --     p_attribute10              IN     VARCHAR2   Optional Default NULL
522 --     p_attribute11              IN     VARCHAR2   Optional Default NULL
523 --     p_attribute12              IN     VARCHAR2   Optional Default NULL
524 --     p_attribute13              IN     VARCHAR2   Optional Default NULL
525 --     p_attribute14              IN     VARCHAR2   Optional Default NULL
526 --     p_attribute15              IN     VARCHAR2   Optional Default NULL
527 --     p_context                  IN     VARCHAR2   Optional Default NULL
528 --     p_use_AOL_security         IN     VARCHAR2   Optional Default FND_API.G_TRUE
529 --
530 --  Version     : Initial Version     1.0
531 --
532 --  Notes       :
533 --
534 -- p_note_type      IN VARCHAR2 Optional Default = NULL
535 --
536 -- Version : Revision   1.1
537 --
538 --  Notes       :
539 --  - Added AOL security parameter
540 --
541 -- End of notes
542 -- --------------------------------------------------------------------------
543 ( p_parent_note_id        IN            NUMBER   DEFAULT 9.99E125
544 , p_jtf_note_id           IN            NUMBER   DEFAULT 9.99E125
545 , p_api_version           IN            NUMBER
546 , p_init_msg_list         IN            VARCHAR2 DEFAULT 'F'
547 , p_commit                IN            VARCHAR2 DEFAULT 'F'
548 , p_validation_level      IN            NUMBER   DEFAULT 100
549 , x_return_status            OUT NOCOPY VARCHAR2
550 , x_msg_count                OUT NOCOPY NUMBER
551 , x_msg_data                 OUT NOCOPY VARCHAR2
552 , p_org_id                IN            NUMBER   DEFAULT NULL
553 , p_source_object_id      IN            NUMBER   DEFAULT 9.99E125
554 , p_source_object_code    IN            VARCHAR2 DEFAULT CHR(0)
555 , p_notes                 IN            VARCHAR2 DEFAULT CHR(0)
556 , p_notes_detail          IN            VARCHAR2 DEFAULT NULL
557 , p_note_status           IN            VARCHAR2 DEFAULT 'I'
558 , p_entered_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
559 , p_entered_date          IN            DATE     DEFAULT TO_DATE('1','j')
560 , x_jtf_note_id              OUT NOCOPY NUMBER
561 , p_last_update_date      IN            DATE     DEFAULT TO_DATE('1','j')
562 , p_last_updated_by       IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
563 , p_creation_date         IN            DATE     DEFAULT TO_DATE('1','j')
564 , p_created_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
565 , p_last_update_login     IN            NUMBER   DEFAULT FND_GLOBAL.LOGIN_ID
566 , p_attribute1            IN            VARCHAR2 DEFAULT NULL
567 , p_attribute2            IN            VARCHAR2 DEFAULT NULL
568 , p_attribute3            IN            VARCHAR2 DEFAULT NULL
569 , p_attribute4            IN            VARCHAR2 DEFAULT NULL
570 , p_attribute5            IN            VARCHAR2 DEFAULT NULL
571 , p_attribute6            IN            VARCHAR2 DEFAULT NULL
572 , p_attribute7            IN            VARCHAR2 DEFAULT NULL
573 , p_attribute8            IN            VARCHAR2 DEFAULT NULL
574 , p_attribute9            IN            VARCHAR2 DEFAULT NULL
575 , p_attribute10           IN            VARCHAR2 DEFAULT NULL
576 , p_attribute11           IN            VARCHAR2 DEFAULT NULL
577 , p_attribute12           IN            VARCHAR2 DEFAULT NULL
578 , p_attribute13           IN            VARCHAR2 DEFAULT NULL
579 , p_attribute14           IN            VARCHAR2 DEFAULT NULL
580 , p_attribute15           IN            VARCHAR2 DEFAULT NULL
581 , p_context               IN            VARCHAR2 DEFAULT NULL
582 , p_note_type             IN            VARCHAR2 DEFAULT NULL
583 , p_jtf_note_contexts_tab IN            jtf_note_contexts_tbl_type
584                                            DEFAULT jtf_note_contexts_tab_dflt
585 , p_use_AOL_security      IN            VARCHAR2 DEFAULT 'T'
586 );
587 
588 /*#
589  * Updates an existing note while applying appropriate security policies.
590  *
591  * @param p_jtf_note_id Unique note identifier, identifies which note record is to be updated.
592  * @param p_api_version Standard API version number.
593  * @param p_init_msg_list Standard API flag allows API callers to request that the API does the initialization of the message list on their behalf. By default, the message list will not be initialized.
594  * @param p_commit Optional Standard API flag is used by API callers to ask the API to commit on their behalf after performing its function. By default, the commit will not be performed.
595  * @param p_validation_level This value determines whether validation should occur or not. This variable is checked against FND_API.G_VALID_LEVEL_NONE and if it is greater than the latter, validation occurs.
596  * @param x_return_status Result of all the operations performed by the API. This will have one of the following values:
597  * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code> - If the API processed the data successfully.
598  * <LI><Code>FND_API.G_RET_STS_ERROR</Code> - If there was an expected error in API processing.
599  * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code> If there was an unexpected error in API processing.
600  * @param x_msg_count Number of messages returned in the API message list.
601  * @param x_msg_data Returned message data in an encoded format if <code>x_msg_count</code> returns non-zero value.
602  * @param p_notes The updated note text.
603  * @param p_notes_detail Used to create larger notes of up to 32K. If p_append_flag is set to Yes, then p_notes_detail is appended to p_notes.
604  * @param p_note_status Indicates the status of the note. Choices are:
605  * <LI><Code>Private (E)</Code>
606  * <LI><Code>Public  (I)</Code>
607  * <LI><Code>Publish (P)</Code>
608  * This value must be either E, I, or P. If it is not, an error is raised. If none is provided, I is used.
609  * @param p_entered_by Identifies the Oracle Applications user who entered this record. If a valid user identifier is not provided, an error is raised.
610  * @param p_last_update_date The date that this record was last updated. If not provided, SYSDATE is used.
611  * @param p_last_updated_by Identifies the Oracle Applications user who last updated this record.
612  * @param p_last_update_login Identifies the login session of the Oracle Applications user that last updated the note.
613  * @param p_append_flag  Boolean value: Used to specify if p_notes_detail is to be appended to the existing p_notes_detail:
617  * @param p_jtf_note_contexts_tab Table of PL/SQL records used to specify the note context. For details see: Oracle Common Application Calendar - API Reference Guide.
614  * <LI><Code>TRUE: Append p_notes_detail to p_notes_detail.</Code>
615  * <LI><Code>FALSE: Do not append p_notes_detail to p_notes_detail.</Code>
616  * @param p_note_type The type of note, based on the source business object; for example, this could be SR_PROBLEM, if the note concerns a service request problem. If this value is not valid, an error is raised.
618  * @param p_attribute1 Descriptive Flexfield Segment.
619  * @param p_attribute2 Descriptive Flexfield Segment.
620  * @param p_attribute3 Descriptive Flexfield Segment.
621  * @param p_attribute4 Descriptive Flexfield Segment.
622  * @param p_attribute5 Descriptive Flexfield Segment.
623  * @param p_attribute6 Descriptive Flexfield Segment.
624  * @param p_attribute7 Descriptive Flexfield Segment.
625  * @param p_attribute8 Descriptive Flexfield Segment.
626  * @param p_attribute9 Descriptive Flexfield Segment.
627  * @param p_attribute10 Descriptive Flexfield Segment.
628  * @param p_attribute11 Descriptive Flexfield Segment.
629  * @param p_attribute12 Descriptive Flexfield Segment.
630  * @param p_attribute13 Descriptive Flexfield Segment.
631  * @param p_attribute14 Descriptive Flexfield Segment.
632  * @param p_attribute15 Descriptive Flexfield Segment.
633  * @param p_context This is a short description field.
634  * @param p_use_AOL_security AOL Security Flag.
635  * @rep:scope public
636  * @rep:lifecycle active
637  * @rep:displayname Update Note
638  * @rep:metalink 249665.1 Oracle Common Application Calendar - API Reference Guide
639  * @rep:category BUSINESS_ENTITY CS_SERVICE_REQUEST
640  * @rep:category BUSINESS_ENTITY AS_OPPORTUNITY
641  * @rep:category BUSINESS_ENTITY AMS_LEAD
642  */
643 
644 PROCEDURE Secure_Update_note
645 -- --------------------------------------------------------------------------
646 -- Start of notes
647 --  API Name  : Secure_Update_Note
648 --  Type      : Public
649 --  Usage     : Updates a note record in the table JTF_NOTES
650 --  Pre-reqs  : None
651 --  Parameters  :
652 --    p_api_version           IN    NUMBER     Required
653 --    p_init_msg_list         IN    VARCHAR2   Optional Default = FND_API.G_FALSE
654 --    p_commit                IN    VARCHAR2   Optional Default = FND_API.G_FALSE
655 --    p_validation_level      IN    NUMBER     Optional Default = FND_API.G_VALID_LEVEL_FULL
656 --    x_return_status           OUT VARCHAR2   Required
657 --    x_msg_count               OUT NUMBER     Required
658 --    x_msg_data                OUT VARCHAR2   Required
659 --    p_jtf_note_id           IN    NUMBER     Required Primary key of the note record
660 --    p_last_updated_by       IN    NUMBER     Required Corresponds to the column USER_ID in the table FND_USER, and
661 --                                                      identifies the Oracle Applications user who updated this record
662 --    p_last_update_date      IN    DATE       Optional Date on which this record is updated
663 --    p_last_update_login     IN    NUMBER     Optional Corresponds to the column LOGIN_ID in the table FND_LOGINS,
664 --                                                      and identifies the login session of the user
665 --    p_notes                 IN    VARCHAR2   Optional Updated note max 2000 Characters
666 --    p_notes_detail          IN    VARCHAR2   Optional Updated note detail max 32Kb
667 --    p_append_flag           IN    VARCHAR2   Optional DEFAULT 'F'
668 --    p_note_status           IN    VARCHAR2   Optional Indicates the status of the note.
669 --                                                      Whether it is 'P'rivate/'I'Public/'P'ublish
670 --                                                      'I' Public is the default
671 --    p_attribute1            IN     VARCHAR2           DEFAULT CHR(0)
672 --    p_attribute2            IN     VARCHAR2           DEFAULT CHR(0)
673 --    p_attribute3            IN     VARCHAR2           DEFAULT CHR(0)
674 --    p_attribute4            IN     VARCHAR2           DEFAULT CHR(0)
675 --    p_attribute5            IN     VARCHAR2           DEFAULT CHR(0)
676 --    p_attribute6            IN     VARCHAR2           DEFAULT CHR(0)
677 --    p_attribute7            IN     VARCHAR2           DEFAULT CHR(0)
678 --    p_attribute8            IN     VARCHAR2           DEFAULT CHR(0)
679 --    p_attribute9            IN     VARCHAR2           DEFAULT CHR(0)
680 --    p_attribute10           IN     VARCHAR2           DEFAULT CHR(0)
681 --    p_attribute11           IN     VARCHAR2           DEFAULT CHR(0)
682 --    p_attribute12           IN     VARCHAR2           DEFAULT CHR(0)
683 --    p_attribute13           IN     VARCHAR2           DEFAULT CHR(0)
684 --    p_attribute14           IN     VARCHAR2           DEFAULT CHR(0)
685 --    p_attribute15           IN     VARCHAR2           DEFAULT CHR(0)
686 --    p_context               IN     VARCHAR2           DEFAULT CHR(0)
687 --    p_note_type             IN     VARCHAR2   Optional Type of the Note
688 --    p_jtf_note_contexts_tab IN    jtf_note_contexts_tbl_type
689 --                                             Optional Default  jtf_note_contexts_tab_dflt
690 --    p_use_AOL_security      IN     VARCHAR2   Optional Default FND_API.G_TRUE
691 --
692 --  Version     : Initial version        1.0
693 --
694 --  Notes       :
695 --  - Added AOL security parameter
696 --
697 -- End of notes
698 -- --------------------------------------------------------------------------
699 ( p_api_version           IN            NUMBER
700 , p_init_msg_list         IN            VARCHAR2 DEFAULT 'F'
701 , p_commit                IN            VARCHAR2 DEFAULT 'F'
702 , p_validation_level      IN            NUMBER   DEFAULT 100
703 , x_return_status            OUT NOCOPY VARCHAR2
704 , x_msg_count                OUT NOCOPY NUMBER
705 , x_msg_data                 OUT NOCOPY VARCHAR2
706 , p_jtf_note_id           IN            NUMBER
707 , p_entered_by            IN            NUMBER   DEFAULT FND_GLOBAL.USER_ID
708 , p_last_updated_by       IN            NUMBER
709 , p_last_update_date      IN            DATE     DEFAULT SYSDATE
710 , p_last_update_login     IN            NUMBER   DEFAULT NULL
711 , p_notes                 IN            VARCHAR2 DEFAULT CHR(0)
712 , p_notes_detail          IN            VARCHAR2 DEFAULT CHR(0)
713 , p_append_flag           IN            VARCHAR2 DEFAULT CHR(0)
714 , p_note_status           IN            VARCHAR2 DEFAULT 'I'
715 , p_note_type             IN            VARCHAR2 DEFAULT CHR(0)
716 , p_jtf_note_contexts_tab IN            jtf_note_contexts_tbl_type
717                                           DEFAULT jtf_note_contexts_tab_dflt
718 , p_attribute1            IN            VARCHAR2 DEFAULT CHR(0)
719 , p_attribute2            IN            VARCHAR2 DEFAULT CHR(0)
720 , p_attribute3            IN            VARCHAR2 DEFAULT CHR(0)
721 , p_attribute4            IN            VARCHAR2 DEFAULT CHR(0)
722 , p_attribute5            IN            VARCHAR2 DEFAULT CHR(0)
723 , p_attribute6            IN            VARCHAR2 DEFAULT CHR(0)
724 , p_attribute7            IN            VARCHAR2 DEFAULT CHR(0)
725 , p_attribute8            IN            VARCHAR2 DEFAULT CHR(0)
726 , p_attribute9            IN            VARCHAR2 DEFAULT CHR(0)
727 , p_attribute10           IN            VARCHAR2 DEFAULT CHR(0)
728 , p_attribute11           IN            VARCHAR2 DEFAULT CHR(0)
729 , p_attribute12           IN            VARCHAR2 DEFAULT CHR(0)
730 , p_attribute13           IN            VARCHAR2 DEFAULT CHR(0)
731 , p_attribute14           IN            VARCHAR2 DEFAULT CHR(0)
732 , p_attribute15           IN            VARCHAR2 DEFAULT CHR(0)
733 , p_context               IN            VARCHAR2 DEFAULT CHR(0)
734 , p_use_AOL_security      IN            VARCHAR2 DEFAULT 'T'
735 );
736 
737 END JTF_NOTES_PUB;