DBA Data[Home] [Help]

PACKAGE: APPS.CAC_VIEW_AVAIL_PVT

Source


1 PACKAGE CAC_VIEW_AVAIL_PVT AUTHID CURRENT_USER AS
2 /* $Header: cacvavs.pls 120.1 2005/07/02 02:19:58 appldev noship $ */
3 /*#
4  * This package provides APIs to check resource availability.
5  * The use of this package is restricted to ATG Calendar Application Development.
6  * This is a replica of JTF_CAL_AVLBLTY_PVT.
7  * The new functions are added to check free_busy_type and perform with task_id.
8  * @rep:scope private
9  * @rep:product CAC
10  * @rep:lifecycle active
11  * @rep:displayname Calendar View Availability
12  * @rep:compatibility N
13  * @rep:category BUSINESS_ENTITY CAC_APPOINTMENT
14  */
15 
16 /******************************************************************************
17 ** Record to store Resource Information. (Input)
18 ******************************************************************************/
19 TYPE RSRec IS RECORD
20 ( resourceID       NUMBER
21 , resourceType     VARCHAR2(30) -- 'RS_EMPLOYEE' or 'RS_GROUP' for now
22 , resourceName     VARCHAR2(360)-- Resource Name
23 );
24 
25 /******************************************************************************
26 ** Table to store the list of resources (Input)
27 ******************************************************************************/
28 TYPE RSTab IS TABLE OF RSRec INDEX BY BINARY_INTEGER;
29 
30 /******************************************************************************
31 ** Record to store availability slots of a resource
32 ******************************************************************************/
33 TYPE AvlblRc IS RECORD
34 ( ResourceID      NUMBER
35 , ResourceType    VARCHAR2(30) -- 'RS_EMPLOYEE' or 'RS_GROUP' for now
36 , ResourceName    VARCHAR2(360)-- 'Resource name'
37 , SlotSequence    NUMBER       -- 1=first slot, 2=second slot etc
38 , SlotAvailable   NUMBER       -- 1=Yes 0=No
39 );
40 
41 /******************************************************************************
42 ** Table to store availability of all resources
43 ******************************************************************************/
44 TYPE AvlblTb IS TABLE OF AvlblRc INDEX BY BINARY_INTEGER;
45 
46 /**
47  * This procedure checks the availability for all the resources given by P_RSList.
48  * This doesn't support free_busy_type and a function to check the availability.
49  * for all the resources assigned to task_id.
50  * @param p_api_version API version number
51  * @param p_init_msg_list a flag to indicate if message list is initialized
52  * @param x_return_status return status
53  * @param x_msg_count the number of message
54  * @param x_msg_data message data
55  * @param p_RSList A list of resource
56  * @param p_StartDateTime Start datetime of the period to check the availability
57  * @param p_EndDateTime End datetime of the period to check the availability
58  * @param p_SlotSize The slot size in minute
59  * @param x_NumberOfSlots The number of slots
60  * @param x_AvailbltyList List of resources and their availability
61  * @param x_TotalAvailbltyList Total availability List
62  * @rep:displayname Availability
63  * @rep:lifecycle active
64  * @rep:compatibility N
65  */
66 PROCEDURE availability
67 ( p_api_version         IN     NUMBER
68 , p_init_msg_list       IN     VARCHAR2 DEFAULT fnd_api.g_false
69 , x_return_status       OUT    NOCOPY   VARCHAR2
70 , x_msg_count           OUT    NOCOPY   NUMBER
71 , x_msg_data            OUT    NOCOPY   VARCHAR2
72 , p_RSList              IN     RSTab
73 , p_StartDateTime       IN     DATE          -- Start DateTime of the period to check
74 , p_EndDateTime         IN     DATE          -- End DateTime of the period to check
75 , p_SlotSize            IN     NUMBER        -- The slot size in minutes
76 , x_NumberOfSlots       OUT    NOCOPY   NUMBER
77 , x_AvailbltyList       OUT    NOCOPY   AvlblTb  -- list of resources and their availability
78 , x_TotalAvailbltyList  OUT    NOCOPY   AvlblTb  -- Total availability
79 );
80 
81 /**
82  * This procedure checks the availability for all the resources given by P_RSList.
83  * This considers free_busy_type for the decision of availability.
84  * @param p_api_version API version number
85  * @param p_init_msg_list a flag to indicate if message list is initialized
86  * @param x_return_status return status
87  * @param x_msg_count the number of message
88  * @param x_msg_data message data
89  * @param p_RSList A list of resource
90  * @param p_StartDateTime Start datetime of the period to check the availability
91  * @param p_EndDateTime End datetime of the period to check the availability
92  * @param p_SlotSize The slot size in minute
93  * @param x_NumberOfSlots The number of slots
94  * @param x_AvailbltyList List of resources and their availability
95  * @param x_TotalAvailbltyList Total availability List
96  * @rep:displayname Check Availability
97  * @rep:lifecycle active
98  * @rep:compatibility N
99  */
100 PROCEDURE CHECK_AVAILABILITY
101 ( p_api_version         IN     NUMBER
102 , p_init_msg_list       IN     VARCHAR2
103 , p_RSList              IN     RSTab
104 , p_StartDateTime       IN     DATE     -- Start DateTime of the period to check
105 , p_EndDateTime         IN     DATE     -- End DateTime of the period to check
106 , p_SlotSize            IN     NUMBER   -- The slot size in minutes
107 , x_NumberOfSlots       OUT    NOCOPY NUMBER
108 , x_AvailbltyList       OUT    NOCOPY AvlblTb  -- list of resources and their availability
109 , x_TotalAvailbltyList  OUT    NOCOPY AvlblTb  -- Total availability
110 , x_return_status       OUT    NOCOPY VARCHAR2
111 , x_msg_count           OUT    NOCOPY NUMBER
112 , x_msg_data            OUT    NOCOPY VARCHAR2
113 );
114 
115 /**
116  * This procedure checks the availability for all the resources given by task_id
117  * This considers free_busy_type for the decision of availability.
118  * @param p_api_version API version number
119  * @param p_init_msg_list a flag to indicate if message list is initialized
120  * @param x_return_status return status
121  * @param x_msg_count the number of message
122  * @param x_msg_data message data
123  * @param p_task_id Task Id
124  * @param p_StartDateTime Start datetime of the period to check the availability
125  * @param p_EndDateTime End datetime of the period to check the availability
126  * @param p_SlotSize The slot size in minute
127  * @param x_NumberOfSlots The number of slots
128  * @param x_AvailbltyList List of resources and their availability
129  * @param x_TotalAvailbltyList Total availability List
130  * @rep:displayname Check Availability
131  * @rep:lifecycle active
132  * @rep:compatibility N
133  */
134 PROCEDURE CHECK_AVAILABILITY
135 ( p_api_version         IN     NUMBER
136 , p_init_msg_list       IN     VARCHAR2
137 , p_task_id             IN     NUMBER
138 , p_StartDateTime       IN     DATE     -- Start DateTime of the period to check
139 , p_EndDateTime         IN     DATE     -- End DateTime of the period to check
140 , p_SlotSize            IN     NUMBER   -- The slot size in minutes
141 , x_NumberOfSlots       OUT    NOCOPY NUMBER
142 , x_AvailbltyList       OUT    NOCOPY AvlblTb  -- list of resources and their availability
143 , x_TotalAvailbltyList  OUT    NOCOPY AvlblTb  -- Total availability
144 , x_return_status       OUT    NOCOPY VARCHAR2
145 , x_msg_count           OUT    NOCOPY NUMBER
146 , x_msg_data            OUT    NOCOPY VARCHAR2
147 );
148 
149 
150 
151 END CAC_VIEW_AVAIL_PVT;