DBA Data[Home] [Help]

PACKAGE: APPS.JTF_TASK_UTL_EXT

Source


1 PACKAGE jtf_task_utl_ext AUTHID CURRENT_USER AS
2 /* $Header: jtfptkxs.pls 120.3 2006/09/29 22:24:05 twan ship $ */
3 /*#
4  * This is an ext. package contains commonly used task utilities.
5  *
6  * @rep:scope private
7  * @rep:product CAC
8  * @rep:lifecycle active
9  * @rep:displayname Jtf Task Dependency
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY CAC_CAL_TASK
12  */
13 
14 
15 /**
16  * This method is for date adjustment if there is time offset and time offset uom
17  *
18  * @param p_original_date       the date to be adjusted
19  * @param p_adjustment_time     the time offset to be used for adjustment
20  * @param p_adjustment_time_uom the time offset uom to be used for adjustment
21  * @return adjusted date
22  *
23  * @rep:scope private
24  * @rep:product JTF
25  * @rep:lifecycle active
26  * @rep:displayname Validate Task Dependency
27  * @rep:compatibility S
28  */
29     function adjust_date(p_original_date in date,
30                          p_adjustment_time in number,
31                          p_adjustment_time_uom in varchar2)
32     return date;
33 
34     pragma restrict_references (adjust_date, WNDS);
35 
36 /**
37  * Returns implicit booking start date. This function is used only for migration of implicit bookings and is not created to be used by any other way. It is called by scrpit: <code>cacbkgmg.sql</code>.
38  *
39  * @param p_calendar_start_date the calendar start date.
40  * @param p_calendar_end_date the calendar end date.
41  * @param p_actual_start_date the actual start date (source: the assignment).
42  * @param p_actual_end_date the actual end date (source: the assignment).
43  * @param p_actaul_travel_duration the actual travel duration.
44  * @param p_actaul_travel_duration_uom the actual travel duration UOM.
45  * @param p_planned_effort the planned effort UOM.
46  * @param p_planned_effort_uom the planned effort UOM.
47  * @param p_actual_effort the actual effort UOM.
48  * @param p_actual_effort_uom the actual effort UOM.
49  * @return booking start date
50  *
51  * @rep:scope private
52  * @rep:product JTF
53  * @rep:lifecycle active
54  * @rep:displayname Get Booking Start Date
55  * @rep:compatibility S
56  */
57  FUNCTION get_bsd
58     (
59       p_calendar_start_date        IN	DATE,
60       p_calendar_end_date          IN	DATE,
61       p_actual_start_date          IN	DATE,
62       p_actual_end_date            IN	DATE,
63       p_actual_travel_duration     IN NUMBER,
64       p_actual_travel_duration_uom IN VARCHAR2,
65       p_planned_effort             IN NUMBER,
66       p_planned_effort_uom         IN VARCHAR2,
67       p_actual_effort              IN NUMBER,
68       p_actual_effort_uom          IN VARCHAR2
69     ) RETURN DATE;
70 
71     pragma restrict_references (get_bsd, WNDS);
72 
73 /**
74  * Returns implicit booking end date. This function is used only for migration of implicit bookings and is not created to be used by any other way. It is called by scrpit: <code>cacbkgmg.sql</code>.
75  *
76  * @param p_calendar_start_date the calendar start date.
77  * @param p_calendar_end_date the calendar end date.
78  * @param p_actual_start_date the actual start date (source: the assignment).
79  * @param p_actual_end_date the actual end date (source: the assignment).
80  * @param p_actaul_travel_duration the actual travel duration.
81  * @param p_actaul_travel_duration_uom the actual travel duration UOM.
82  * @param p_planned_effort the planned effort UOM.
83  * @param p_planned_effort_uom the planned effort UOM.
84  * @param p_actual_effort the actual effort UOM.
85  * @param p_actual_effort_uom the actual effort UOM.
86  * @return booking start date
87  *
88  * @rep:scope private
89  * @rep:product JTF
90  * @rep:lifecycle active
91  * @rep:displayname Get Booking End Date
92  * @rep:compatibility S
93  */
94  FUNCTION get_bed
95     (
96       p_calendar_start_date        IN	DATE,
97       p_calendar_end_date          IN	DATE,
98       p_actual_start_date          IN	DATE,
99       p_actual_end_date            IN	DATE,
100       p_actual_travel_duration     IN NUMBER,
101       p_actual_travel_duration_uom IN VARCHAR2,
102       p_planned_effort             IN NUMBER,
103       p_planned_effort_uom         IN VARCHAR2,
104       p_actual_effort              IN NUMBER,
105       p_actual_effort_uom          IN VARCHAR2
106     ) RETURN DATE;
107 
108     pragma restrict_references (get_bed, WNDS);
109 
110     ------------------------------------------------------
111     -- For enhancement 2666995
112     ------------------------------------------------------
113     FUNCTION get_open_flag (p_task_status_id IN NUMBER)
114     RETURN VARCHAR2;
115 
116     ------------------------------------------------------
117     -- For enhancement 2683868
118     ------------------------------------------------------
119    PROCEDURE set_calendar_dates (
120      p_show_on_calendar in varchar2 default null,
121      p_date_selected in varchar2 default null,
122      p_planned_start_date in date default null,
123      p_planned_end_date in date default null,
124      p_scheduled_start_date in date default null,
125      p_scheduled_end_date in date default null,
126      p_actual_start_date in date default null,
127      p_actual_end_date in date default null,
128      x_show_on_calendar in out NOCOPY varchar2, -- Fixed from OUT to IN OUT
129      x_date_selected in out NOCOPY varchar2, -- Fixed from OUT to IN OUT
130      x_calendar_start_date out NOCOPY date,
131      x_calendar_end_date out NOCOPY date,
132      x_return_status out NOCOPY varchar2,
133      p_task_status_id IN NUMBER, -- Enhancement 2683868: new parameter
134      p_creation_date IN DATE     -- Enhancement 2683868: new parameter
135    );
136 
137     PROCEDURE set_start_n_due_date (
138         p_task_status_id        IN NUMBER,
139         p_planned_start_date    IN DATE,
140         p_planned_end_date      IN DATE,
141         p_scheduled_start_date  IN DATE,
142         p_scheduled_end_date    IN DATE,
143         p_actual_start_date     IN DATE,
144         p_actual_end_date       IN DATE,
145         p_creation_date         IN DATE,
146         x_calendar_start_date   OUT NOCOPY DATE,
147         x_calendar_end_date     OUT NOCOPY DATE,
148         x_return_status         OUT NOCOPY VARCHAR2
149     );
150     ------------------------------------------------------
151 
152     ------------------------------------------------------
153     -- For enhancement 2734020
154     ------------------------------------------------------
155     FUNCTION get_last_number(p_sequence_name IN VARCHAR2)
156     RETURN NUMBER;
157 
158     -- For Bug 2786689 (CYCLIC TASK) ..
159     PROCEDURE validate_cyclic_task (
160         p_task_id              IN              NUMBER,
161         p_parent_task_id       IN              NUMBER,
162         x_return_status        OUT NOCOPY      VARCHAR2
163     );
164 
165     ------------------------------------------------------
166     -- For bug 2891531
167     ------------------------------------------------------
168     PROCEDURE update_object_code (
169          p_task_id           IN NUMBER
170         ,p_old_object_code   IN VARCHAR2
171         ,p_new_object_code   IN VARCHAR2
172         ,p_old_object_id     IN NUMBER
173         ,p_new_object_id     IN NUMBER
174         ,p_new_object_name   IN VARCHAR2
175         ,x_return_status     OUT NOCOPY VARCHAR2
176         ,x_msg_count         OUT NOCOPY NUMBER
177         ,x_msg_data          OUT NOCOPY VARCHAR2
178     );
179 
180     ------------------------------------------------------
181     -- For bug 2896532
182     ------------------------------------------------------
183     FUNCTION get_object_details (p_object_code IN VARCHAR2
184                                 ,p_object_id   IN NUMBER)
185     RETURN VARCHAR2;
186 
187     --Bug 2786689
188 	FUNCTION get_task_name (p_task_id IN NUMBER)
189     RETURN VARCHAR2;
190 
191 /*
192    Added for Bug # 3360228
193    extended from jtf_task_utl.check_duplicate_reference.
194    this validation function should be called for reference update only.
195 */
196    FUNCTION check_dup_reference_for_update(
197                p_task_reference_id jtf_task_references_b.task_reference_id%type,
198                p_task_id jtf_tasks_b.task_id%type,
199                p_object_id hz_relationships.object_id%type,
200                p_object_type_code jtf_task_references_b.object_type_code%type)
201    return boolean;
202 
203 
204 
205 END jtf_task_utl_ext;