DBA Data[Home] [Help]

PACKAGE: APPS.JTF_TASK_RESOURCES_PUB

Source


1 PACKAGE JTF_TASK_RESOURCES_PUB   AS
2 /* $Header: jtfptkrs.pls 120.2 2006/09/29 22:22:12 twan ship $ */
3 /*#
4  * This is the public package to crete, update, and delete task resources.
5  *
6  * @rep:scope internal
7  * @rep:product CAC
8  * @rep:lifecycle active
9  * @rep:displayname Task Resource
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY CAC_CAL_TASK
12  */
13 
14 
15 
16 ---------------------------------------------------------------------------
17 --Define Global Variables
18 ---------------------------------------------------------------------------
19     G_PKG_NAME	CONSTANT	VARCHAR2(30):='JTF_TASK_RESOURCES_PUB';
20     G_USER		CONSTANT	VARCHAR2(30):=FND_GLOBAL.USER_ID;
21     G_FALSE		CONSTANT	VARCHAR2(30):=FND_API.G_FALSE;
22     G_TRUE		CONSTANT	VARCHAR2(30):=FND_API.G_TRUE;
23 ---------------------------------------------------------------------------
24 
25 --Define RECORD and TABLE types
26 
27 Type TASK_RSC_REQ_REC  is RECORD(
28     RESOURCE_REQ_ID      jtf_task_rsc_reqs.resource_req_id%type,
29     TASK_TYPE_ID         jtf_task_rsc_reqs.task_type_id%type,
30     TASK_ID              jtf_task_rsc_reqs.task_id%type,
31     TASK_TEMPLATE_ID     jtf_task_rsc_reqs.task_template_id%type,
32     RESOURCE_TYPE_CODE   jtf_task_rsc_reqs.resource_type_code%type,
33     REQUIRED_UNITS       jtf_task_rsc_reqs.required_units%type,
34     ENABLED_FLAG         jtf_task_rsc_reqs.enabled_flag%type,
35     ATTRIBUTE1           jtf_task_rsc_reqs.attribute1%type,
36     ATTRIBUTE2           jtf_task_rsc_reqs.attribute2%type,
37     ATTRIBUTE3           jtf_task_rsc_reqs.attribute3%type,
38     ATTRIBUTE4           jtf_task_rsc_reqs.attribute4%type,
39     ATTRIBUTE5           jtf_task_rsc_reqs.attribute5%type,
40     ATTRIBUTE6           jtf_task_rsc_reqs.attribute6%type,
41     ATTRIBUTE7           jtf_task_rsc_reqs.attribute7%type,
42     ATTRIBUTE8           jtf_task_rsc_reqs.attribute8%type,
43     ATTRIBUTE9           jtf_task_rsc_reqs.attribute9%type,
44     ATTRIBUTE10          jtf_task_rsc_reqs.attribute10%type,
45     ATTRIBUTE11          jtf_task_rsc_reqs.attribute11%type,
46     ATTRIBUTE12          jtf_task_rsc_reqs.attribute12%type,
47     ATTRIBUTE13          jtf_task_rsc_reqs.attribute13%type,
48     ATTRIBUTE14          jtf_task_rsc_reqs.attribute14%type,
49     ATTRIBUTE15          jtf_task_rsc_reqs.attribute15%type,
50     ATTRIBUTE_CATEGORY   jtf_task_rsc_reqs.attribute_category%type
51 );
52 
53 Type task_rsc_req_tbl is table of TASK_RSC_REQ_REC
54 index by binary_integer;
55 
56 type sort_rec is record(
57     field_name      varchar2(30),
58     asc_dsc_flag    char(1)        default 'A'
59 );
60 
61 Type sort_data is table of sort_rec
62 index by binary_integer;
63 
64 
65 TYPE  TASK_RSRC_REQ_REC is RECORD(
66     RESOURCE_REQ_ID      NUMBER,
67     TASK_ID              NUMBER,
68     TASK_NAME            VARCHAR2(80),
69     TASK_TYPE_ID         NUMBER,
70     TASK_TYPE_NAME       VARCHAR2(30),
71     TASK_TEMPLATE_ID     NUMBER,
72     TASK_TEMPLATE_NAME   VARCHAR2(80),
73     RESOURCE_TYPE_CODE   VARCHAR2(30),
74     REQUIRED_UNITS       NUMBER,
75     ENABLED_FLAG         VARCHAR2(1)
76 );
77 
78 /*#
79  * Procedure to create task resource requirements.
80  * @param p_api_version the standard API version number
81  * @param p_init_msg_list the standard API flag allows API callers to request
82  * that the API does the initialization of the message list on their behalf.
83  * By default, the message list will not be initialized.
84  * @param p_commit the standard API flag is used by API callers to ask
85  * the API to commit on their behalf after performing its function
86  * By default, the commit will not be performed.
87  * @param p_task_id the task id to create the resource requirements
88  * @param p_task_name the task name to create the resource requirements
89  * @param p_task_number the task number to create the resource requirements
90  * @param p_task_type_id the task type id to create the resource requirements
91  * @param p_task_type_name the task type name to create the resource requirements
92  * @param p_task_template_id the task template id to create the resource requirements
93  * @param p_task_template_name the task template name to create the resource requirements
94  * @param p_resource_type_code the resource type code to create the resource requirements
95  * @param p_required_units the required units to create the resource requirements
96  * @param p_enabled_flag the enabled flag to create the resource requirements
97  * @param x_return_status returns the result of all the operations performed
98  * by the API and must have one of the following values:
99  *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
100  *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
101  *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
102  * @param x_msg_count returns the number of messages in the API message list
103  * @param x_msg_data returns the message in an encoded format if
104  * <code>x_msg_count</code> returns number one.
105  * @param x_resource_req_id returns the resource requirements id
106  * @param p_attribute1 attribute1 for flexfield
107  * @param p_attribute2 attribute2 for flexfield
108  * @param p_attribute3 attribute3 for flexfield
109  * @param p_attribute4 attribute4 for flexfield
110  * @param p_attribute5 attribute5 for flexfield
111  * @param p_attribute6 attribute6 for flexfield
112  * @param p_attribute7 attribute7 for flexfield
113  * @param p_attribute8 attribute8 for flexfield
114  * @param p_attribute9 attribute9 for flexfield
115  * @param p_attribute10 attribute10 for flexfield
116  * @param p_attribute11 attribute11 for flexfield
117  * @param p_attribute12 attribute12 for flexfield
118  * @param p_attribute13 attribute13 for flexfield
119  * @param p_attribute14 attribute14 for flexfield
120  * @param p_attribute15 attribute15 for flexfield
121  * @param p_attribute_category attribute category
122  * @paraminfo {@rep:precision 6000}
123  * @rep:scope internal
124  * @rep:lifecycle active
125  * @rep:displayname Create Task Resource Requirement
126  * @rep:compatibility S
127  */
128 Procedure CREATE_TASK_RSRC_REQ(
129     P_API_VERSION            IN	NUMBER,
130     P_INIT_MSG_LIST          IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
131     P_COMMIT                 IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
132     P_TASK_ID                IN	NUMBER	  DEFAULT fnd_api.g_miss_num,
133     P_TASK_NAME              IN	VARCHAR2  DEFAULT fnd_api.g_miss_char,
134     P_TASK_NUMBER            IN	VARCHAR2  DEFAULT fnd_api.g_miss_char,
135     P_TASK_TYPE_ID           IN	NUMBER 	  DEFAULT fnd_api.g_miss_num,
136     P_TASK_TYPE_NAME         IN	VARCHAR2  DEFAULT fnd_api.g_miss_char,
137     P_TASK_TEMPLATE_ID       IN	NUMBER	  DEFAULT fnd_api.g_miss_num,
138     P_TASK_TEMPLATE_NAME     IN	VARCHAR2  DEFAULT fnd_api.g_miss_char,
139     P_RESOURCE_TYPE_CODE     IN	VARCHAR2,
140     P_REQUIRED_UNITS         IN	NUMBER,
141     P_ENABLED_FLAG           IN	VARCHAR2  DEFAULT jtf_task_utl.g_no,
142     X_RETURN_STATUS          OUT NOCOPY	VARCHAR2,
143     X_MSG_COUNT              OUT NOCOPY	NUMBER,
144     X_MSG_DATA               OUT NOCOPY	VARCHAR2,
145     X_RESOURCE_REQ_ID        OUT NOCOPY	NUMBER,
146     p_attribute1             IN VARCHAR2 DEFAULT null,
147     p_attribute2             IN VARCHAR2 DEFAULT null,
148     p_attribute3             IN VARCHAR2 DEFAULT null,
149     p_attribute4             IN VARCHAR2 DEFAULT null,
150     p_attribute5             IN VARCHAR2 DEFAULT null,
151     p_attribute6             IN VARCHAR2 DEFAULT null,
152     p_attribute7             IN VARCHAR2 DEFAULT null,
153     p_attribute8             IN VARCHAR2 DEFAULT null,
154     p_attribute9             IN VARCHAR2 DEFAULT null,
155     p_attribute10            IN VARCHAR2 DEFAULT null,
156     p_attribute11            IN VARCHAR2 DEFAULT null,
157     p_attribute12            IN VARCHAR2 DEFAULT null,
158     p_attribute13            IN VARCHAR2 DEFAULT null,
159     p_attribute14            IN VARCHAR2 DEFAULT null,
160     p_attribute15            IN VARCHAR2 DEFAULT null,
161     p_attribute_category     IN VARCHAR2 DEFAULT null
162 );
163 
164 
165 
166 
167 /*#
168  * Procedure to update task resource requirements.
169  * @param p_api_version the standard API version number
170  * @param p_object_version_number the object version number
171  * @param p_init_msg_list the standard API flag allows API callers to request
172  * that the API does the initialization of the message list on their behalf.
173  * By default, the message list will not be initialized.
174  * @param p_commit the standard API flag is used by API callers to ask
175  * the API to commit on their behalf after performing its function
176  * By default, the commit will not be performed.
177  * @param p_resource_req_id the resource request id to update the resource requirements
178  * @param p_task_id the task id to update the resource requirements
179  * @param p_task_name the task name to update the resource requirements
180  * @param p_task_number the task number to update the resource requirements
181  * @param p_task_type_id the task type id to update the resource requirements
182  * @param p_task_type_name the task type name to update the resource requirements
183  * @param p_task_template_id the task template id to update the resource requirements
184  * @param p_task_template_name the task template name to update the resource requirements
185  * @param p_resource_type_code the resource type code to update the resource requirements
186  * @param p_required_units the required units to update the resource requirements
187  * @param p_enabled_flag the enabled flag to update the resource requirements
188  * @param x_return_status returns the result of all the operations performed
189  * by the API and must have one of the following values:
190  *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
191  *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
192  *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
193  * @param x_msg_count returns the number of messages in the API message list
194  * <code>x_msg_count</code> returns number one.
195  * @param x_msg_data returns the message in an encoded format if
196  * @param p_attribute1 attribute1 for flexfield
197  * @param p_attribute2 attribute2 for flexfield
198  * @param p_attribute3 attribute3 for flexfield
199  * @param p_attribute4 attribute4 for flexfield
200  * @param p_attribute5 attribute5 for flexfield
201  * @param p_attribute6 attribute6 for flexfield
202  * @param p_attribute7 attribute7 for flexfield
203  * @param p_attribute8 attribute8 for flexfield
204  * @param p_attribute9 attribute9 for flexfield
205  * @param p_attribute10 attribute10 for flexfield
206  * @param p_attribute11 attribute11 for flexfield
207  * @param p_attribute12 attribute12 for flexfield
208  * @param p_attribute13 attribute13 for flexfield
209  * @param p_attribute14 attribute14 for flexfield
210  * @param p_attribute15 attribute15 for flexfield
211  * @param p_attribute_category attribute category
212  * @paraminfo {@rep:precision 6000}
213  * @rep:scope internal
214  * @rep:lifecycle active
215  * @rep:displayname Update Task Resource Requirement
216  * @rep:compatibility S
217  */
218 Procedure UPDATE_TASK_RSCR_REQ(
219     P_API_VERSION            IN	NUMBER,
220     P_OBJECT_VERSION_NUMBER  IN OUT NOCOPY	NUMBER,
221     P_INIT_MSG_LIST          IN	VARCHAR2 DEFAULT FND_API.G_FALSE,
222     P_COMMIT                 IN	VARCHAR2 DEFAULT FND_API.G_FALSE,
223     P_RESOURCE_REQ_ID        IN	NUMBER,
224     P_TASK_ID                IN	NUMBER 	 default fnd_api.g_miss_num,
225     P_TASK_NAME	             IN	VARCHAR2 default null,
226     P_TASK_NUMBER            IN	VARCHAR2 default null,
227     P_TASK_TYPE_ID           IN	NUMBER 	 default fnd_api.g_miss_num,
228     P_TASK_TYPE_NAME         IN	VARCHAR2 default null,
229     P_TASK_TEMPLATE_ID       IN	NUMBER   default fnd_api.g_miss_num,
230     P_TASK_TEMPLATE_NAME     IN	VARCHAR2 default null,
231     P_RESOURCE_TYPE_CODE     IN	VARCHAR2,
232     P_REQUIRED_UNITS         IN	NUMBER,
233     P_ENABLED_FLAG           IN	VARCHAR2 DEFAULT jtf_task_utl.g_no,
234     X_RETURN_STATUS          OUT NOCOPY	VARCHAR2,
235     X_MSG_COUNT              OUT NOCOPY	NUMBER,
236     X_MSG_DATA               OUT NOCOPY	VARCHAR2,
237     p_attribute1             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
238     p_attribute2             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
239     p_attribute3             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
240     p_attribute4             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
241     p_attribute5             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
242     p_attribute6             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
243     p_attribute7             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
244     p_attribute8             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
245     p_attribute9             IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
246     p_attribute10            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
247     p_attribute11            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
248     p_attribute12            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
249     p_attribute13            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
250     p_attribute14            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
251     p_attribute15            IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
252     p_attribute_category     IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char
253 );
254 
255 
256 /*#
257  * Procedure to delete task resource requirements.
258  * @param p_api_version the standard API version number
259  * @param p_object_version_number the object version number
260  * @param p_init_msg_list the standard API flag allows API callers to request
261  * that the API does the initialization of the message list on their behalf.
262  * By default, the message list will not be initialized.
263  * @param p_commit the standard API flag is used by API callers to ask
264  * the API to commit on their behalf after performing its function
265  * @param p_resource_req_id the resource requirements id for delete
266  * @param x_return_status returns the result of all the operations performed
267  * by the API and must have one of the following values:
268  *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
269  *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
270  *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
271  * @param x_msg_count returns the number of messages in the API message list
272  * @param x_msg_data returns the message in an encoded format if
273  * <code>x_msg_count</code> returns number one.
274  * @paraminfo {@rep:precision 6000}
275  * @rep:scope internal
276  * @rep:lifecycle active
277  * @rep:displayname Delete Task Resource Requirement
278  * @rep:compatibility S
279  */
280 procedure DELETE_TASK_RSRC_REQ(
281     P_API_VERSION            IN NUMBER,
282     P_OBJECT_VERSION_NUMBER  IN NUMBER,
283     P_INIT_MSG_LIST          IN	VARCHAR2 DEFAULT FND_API.G_FALSE,
284     P_COMMIT	 	     IN VARCHAR2 DEFAULT FND_API.G_FALSE,
285     P_RESOURCE_REQ_ID	     IN	NUMBER,
286     X_RETURN_STATUS	     OUT NOCOPY VARCHAR2,
287     X_MSG_COUNT	             OUT NOCOPY NUMBER,
288     X_MSG_DATA	             OUT NOCOPY VARCHAR2
289 );
290 
291 
292 /*#
293  * Procedure to get the task resource requirements.
294  * @param p_api_version the standard API version number
295  * @param p_init_msg_list the standard API flag allows API callers to request
296  * that the API does the initialization of the message list on their behalf.
297  * By default, the message list will not be initialized.
298  * @param p_commit the standard API flag is used by API callers to ask
299  * the API to commit on their behalf after performing its function
300  * By default, the commit will not be performed.
301  * @param p_resource_req_id the resource request id to be queried
302  * @param p_resource_req_name the resource request name to be queried
303  * @param p_task_id the task id to be queried
304  * @param p_task_name the task name to be queried
305  * @param p_task_type_id the task type id to be queried
306  * @param p_task_type_name the task type name to be queried
307  * @param p_task_template_id the task template id to be queried
308  * @param p_task_template_name the task template name to be queried
309  * @param p_sort_data the sort data to be queried
310  * @param p_query_or_next_code flag to build the sql query statement
311  * @param p_start_pointer row data start pointer to be queried
312  * @param p_rec_wanted row data end pointer to be queried
313  * @param p_show_all flag to show all data to be queried
314  * @param p_resource_type_code the resource type code to be queried
315  * @param p_required_units the required units to be queried
316  * @param p_enabled_flag the enabled flag to be queried
317  * @param x_return_status returns the result of all the operations performed
318  * by the API and must have one of the following values:
319  *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
320  *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
321  *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
322  * @param x_msg_count returns the number of messages in the API message list
323  * @param x_msg_data returns the message in an encoded format if
324  * <code>x_msg_count</code> returns number one.
325  * @param x_task_rsc_req_rec returns the task resource requirements
326  * @param x_total_retrieved returns the total number of data retrieved
327  * @param x_total_returned returns the total number of data
328  * @paraminfo {@rep:precision 6000}
329  * @rep:scope internal
330  * @rep:lifecycle active
331  * @rep:displayname Get Task Resource Requirement
332  * @rep:compatibility S
333  */
334 Procedure GET_TASK_RSRC_REQ(
335     P_API_VERSION	     IN	NUMBER,
336     P_INIT_MSG_LIST	     IN	VARCHAR2 DEFAULT G_FALSE,
337     P_COMMIT		     IN	VARCHAR2 DEFAULT G_FALSE,
338     P_RESOURCE_REQ_ID	     IN	NUMBER,
339     P_RESOURCE_REQ_NAME	     IN	VARCHAR2 DEFAULT NULL,
340     P_TASK_ID		     IN	NUMBER DEFAULT NULL,
341     P_TASK_NAME		     IN	VARCHAR2 DEFAULT NULL,
342     P_TASK_TYPE_ID	     IN	NUMBER DEFAULT NULL,
343     P_TASK_TYPE_NAME	     IN	VARCHAR2 DEFAULT NULL,
344     P_TASK_TEMPLATE_ID	     IN	NUMBER DEFAULT NULL,
345     P_TASK_TEMPLATE_NAME     IN	VARCHAR2 DEFAULT NULL,
346     P_SORT_DATA              IN JTF_TASK_RESOURCES_PUB.SORT_DATA,
347     P_QUERY_OR_NEXT_CODE     IN	VARCHAR2 DEFAULT 'Q',
348     P_START_POINTER          IN	NUMBER,
349     P_REC_WANTED             IN	NUMBER,
350     P_SHOW_ALL               IN VARCHAR2 DEFAULT 'Y',
351     P_RESOURCE_TYPE_CODE     IN	VARCHAR2,
352     P_REQUIRED_UNITS	     IN	NUMBER,
353     P_ENABLED_FLAG	     IN	VARCHAR2 DEFAULT jtf_task_utl.g_no,
354     X_RETURN_STATUS	     OUT NOCOPY	VARCHAR2,
355     X_MSG_COUNT		     OUT NOCOPY	NUMBER,
356     X_MSG_DATA		     OUT NOCOPY	VARCHAR2,
357     X_TASK_RSC_REQ_REC	     OUT NOCOPY	JTF_TASK_RESOURCES_PUB.TASK_RSC_REQ_TBL,
358     X_TOTAL_RETRIEVED        OUT NOCOPY NUMBER,
359     X_TOTAL_RETURNED         OUT NOCOPY	NUMBER
360 );
361 
362 
363 
364 /*#
365  * Procedure to lock the row of task resource requirements.
366  * @param p_api_version the standard API version number
367  * @param p_init_msg_list the standard API flag allows API callers to request
368  * that the API does the initialization of the message list on their behalf.
369  * By default, the message list will not be initialized.
370  * @param p_commit the standard API flag is used by API callers to ask
371  * the API to commit on their behalf after performing its function
372  * By default, the commit will not be performed.
373  * @param p_resource_requirement_id the resource requirement id to be locked
374  * @param p_object_version_number the object version number
375  * @param x_return_status returns the result of all the operations performed
376  * by the API and must have one of the following values:
377  *   <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
378  *   <LI><Code>FND_API.G_RET_STS_ERROR</Code>
379  *   <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
380  * @param x_msg_count returns the number of messages in the API message list
381  * @param x_msg_data returns the message in an encoded format if
382  * <code>x_msg_count</code> returns number one.
383  * @paraminfo {@rep:precision 6000}
384  * @rep:scope private
385  * @rep:lifecycle active
386  * @rep:displayname Lock Task Resource
387  * @rep:compatibility S
388  */
389 PROCEDURE LOCK_TASK_RESOURCES(
390      P_API_VERSION           IN NUMBER,
391      P_INIT_MSG_LIST         IN VARCHAR2 DEFAULT fnd_api.g_false,
392      P_COMMIT                IN VARCHAR2 DEFAULT fnd_api.g_false,
393      P_RESOURCE_REQUIREMENT_ID IN NUMBER,
394      P_OBJECT_VERSION_NUMBER IN NUMBER,
395      X_RETURN_STATUS         OUT NOCOPY VARCHAR2,
396      X_MSG_DATA              OUT NOCOPY VARCHAR2,
397      X_MSG_COUNT             OUT NOCOPY NUMBER
398 );
399 
400 End;