1 PACKAGE JTF_CAL_AVLBLTY_PVT AUTHID CURRENT_USER AS
2 /* $Header: jtfvavs.pls 120.1 2005/07/02 01:37:21 appldev ship $ */
3 /*#
4 * This package provides APIs for HTML Calendar module.
5 * The use of this package is restricted to ATG Calendar Application Development.
6 * @rep:scope private
7 * @rep:product CAC
8 * @rep:lifecycle active
9 * @rep:displayname HTML Calendar Availability
10 * @rep:compatibility N
11 * @rep:category BUSINESS_ENTITY CAC_APPOINTMENT
12 */
13
14 /******************************************************************************
15 ** Record to store Resource Information. (Input)
16 ******************************************************************************/
17 TYPE RSRec IS RECORD
18 ( resourceID NUMBER
19 , resourceType VARCHAR2(30) -- 'RS_EMPLOYEE' or 'RS_GROUP' for now
20 , resourceName VARCHAR2(360)-- Resource Name
21 );
22
23 /******************************************************************************
24 ** Table to store the list of resources (Input)
25 ******************************************************************************/
26 TYPE RSTab IS TABLE OF RSRec INDEX BY BINARY_INTEGER;
27
28 /******************************************************************************
29 ** Record to store availability slots of a resource
30 ******************************************************************************/
31 TYPE AvlblRc IS RECORD
32 ( ResourceID NUMBER
33 , ResourceType VARCHAR2(30) -- 'RS_EMPLOYEE' or 'RS_GROUP' for now
34 , ResourceName VARCHAR2(360)-- 'Resource name'
35 , SlotSequence NUMBER -- 1=first slot, 2=second slot etc
36 , SlotAvailable NUMBER -- 1=Yes 0=No
37 );
38
39 /******************************************************************************
40 ** Table to store availability of all resources
41 ******************************************************************************/
42 TYPE AvlblTb IS TABLE OF AvlblRc INDEX BY BINARY_INTEGER;
43
44 /**
45 * This procedure checks the availability for all the resources given by P_RSList.
46 * This doesn't support free_busy_type and a function to check the availability.
47 * for all the resources assigned to task_id.
48 * @param p_api_version API version number
49 * @param p_init_msg_list a flag to indicate if message list is initialized
50 * @param x_return_status return status
51 * @param x_msg_count the number of message
52 * @param x_msg_data message data
53 * @param p_RSList A list of resource
54 * @param p_StartDateTime Start datetime of the period to check the availability
55 * @param p_EndDateTime End datetime of the period to check the availability
56 * @param p_SlotSize The slot size in minute
57 * @param x_NumberOfSlots The number of slots
58 * @param x_AvailbltyList List of resources and their availability
59 * @param x_TotalAvailbltyList Total availability List
60 * @rep:displayname Availability
61 * @rep:lifecycle active
62 * @rep:compatibility N
63 */
64 PROCEDURE availability
65 ( p_api_version IN NUMBER
66 , p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
67 , x_return_status OUT NOCOPY VARCHAR2
68 , x_msg_count OUT NOCOPY NUMBER
69 , x_msg_data OUT NOCOPY VARCHAR2
70 , p_RSList IN RSTab
71 , p_StartDateTime IN DATE -- Start DateTime of the period to check
72 , p_EndDateTime IN DATE -- End DateTime of the period to check
73 , p_SlotSize IN NUMBER -- The slot size in minutes
74 , x_NumberOfSlots OUT NOCOPY NUMBER
75 , x_AvailbltyList OUT NOCOPY AvlblTb -- list of resources and their availability
76 , x_TotalAvailbltyList OUT NOCOPY AvlblTb -- Total availability
77 );
78 END JTF_CAL_AVLBLTY_PVT;