DBA Data[Home] [Help]

PACKAGE: APPS.JTF_UM_WF_DELEGATION_PVT

Source


1 PACKAGE JTF_UM_WF_DELEGATION_PVT AUTHID CURRENT_USER as
2 /* $Header: JTFVDELS.pls 115.5 2002/11/21 22:57:59 kching ship $ */
3 
4  NO_CHECKBOX           CONSTANT NUMBER := 0;
5  CHECKED_UPDATE        CONSTANT NUMBER := 1;
6  NOT_CHECKED_UPDATE    CONSTANT NUMBER := 2;
7  CHECKED_NO_UPDATE     CONSTANT NUMBER := 3;
8  NOT_CHECKED_NO_UPDATE CONSTANT NUMBER := 4;
9 
10 /**
11   * Procedure   :  can_delegate
12   * Type        :  Private
13   * Pre_reqs    :  None
14   * Description :  Will determine if an approver can delegate
15   * Parameters  :
16   * input parameters
17   * @param     p_subscription_id
18   *     description:  The subscription_id of an enrollment
19   *     required   :  Y
20   *     validation :  Must be a valid subscription_id
21   *   p_user_id:
22   *     description:  The user_id of an approver
23   *     required   :  Y
24   *     validation :  Must be a valid user_id
25   * output parameters
26   * x_result: The value indicating whether an approver can delegate or not
27  */
28 procedure can_delegate(
29                        p_subscription_id  in number,
30                        p_user_id          in number,
31                        x_result           out NOCOPY boolean
32                        );
33 
34 /**
35   * Procedure   :  can_enrollment_delegate
36   * Type        :  Private
37   * Pre_reqs    :  None
38   * Description :  Will determine if an enrollment can delegate
39   * Parameters  :
40   * input parameters
41   * @param     p_subscription_id
42   *     description:  The subscription_id of an enrollment
43   *     required   :  Y
44   *     validation :  Must be a valid subscription_id
45   *   p_usertype_id:
46   *     description:  The usertype_id of the user
47   *     required   :  Y
48   *     validation :  Must be a valid usertype_id
49   * output parameters
50   * x_result: The value indicating whether an enrollment can delegate or not.
51   *           This API will return true, if no delegation role has been
52   *           defined for an enrollment
53   *
54   * Note:
55  */
56 procedure can_enrollment_delegate (p_subscription_id in number,
57                                    p_usertype_id     in number,
58                                    x_result          out NOCOPY boolean);
59 
60 /**
61   * Procedure   :  can_delegate_int
62   * Type        :  Private
63   * Pre_reqs    :  None
64   * Description :  Will determine if an approver can delegate
65   * Parameters  :
66   * input parameters
67   * @param     p_subscription_id
68   *     description:  The subscription_id of an enrollment
69   *     required   :  Y
70   *     validation :  Must be a valid subscription_id
71   *   p_user_id:
72   *     description:  The user_id of an approver
73   *     required   :  Y
74   *     validation :  Must be a valid user_id
75   * output parameters
76   * x_result: The boolean value in number, 0 or 1 indicating whether
77   *           an approver can delegate or not. This API has been created
78   *           as JDBC does not support boolean!!!!
79  */
80 procedure can_delegate_int(
81                        p_subscription_id  in number,
82                        p_user_id          in number,
83                        x_result           out NOCOPY number
84                        );
85 
86 
87 /**
88   * Procedure   :  has_delegation_role
89   * Type        :  Private
90   * Pre_reqs    :  None
91   * Description :  Will determine if an approver has a delegation role
92   * Parameters  :
93   * input parameters
94   * @param     p_subscription_id
95   *     description:  The subscription_id of an enrollment
96   *     required   :  Y
97   *     validation :  Must be a valid subscription_id
98   *   p_user_id:
99   *     description:  The user_id of an approver
100   *     required   :  Y
101   *     validation :  Must be a valid user_id
102   * output parameters
103   * x_result: The value indicating whether an approver has a delegation role or not
104   *
105  */
106 
107 procedure has_delegation_role (
108                                          p_subscription_id  in number,
109                                          p_user_id          in number,
110                                          x_result           out NOCOPY boolean
111                                         );
112 
113 /**
114   * Procedure   :  get_checkbox_status
115   * Type        :  Private
116   * Pre_reqs    :  None
117   * Description :  Will determine the status of the checkbox for granting delegation role
118   * Parameters  :
119   * input parameters
120   * @param     p_reg_id
121   *     description:  The usertype_reg_id or subscription_reg_id
122   *     required   :  Y
123   *     validation :  Must be a usertype_reg_id or subscription_reg_id
124   *   p_user_id:
125   *     description:  The user_id of a logged in user
126   *     required   :  Y
127   *     validation :  Must be a valid user_id
128   *   p_ignore_del_flag:
129   *     description: If set to yes, it will ignore the value of the grant delegation flag
130   * output parameters
131   * x_result: Following int values
132   *     0 - NO_CHECKBOX
133   *     1 - CHECKED_UPDATE
134   *     2 - NOT_CHECKED_UPDATE
135   *     3 - CHECKED_NO_UPDATE
136   *     4 - NOT_CHECKED_NO_UPDATE
137   *
138   *
139  */
140 
141 procedure get_checkbox_status (
142                                    p_reg_id  in number,
143                                    p_user_id in number,
144                                    p_ignore_del_flag in boolean,
145                                    p_enrl_owner_user_id in number := FND_API.G_MISS_NUM,
146                                    x_result  out NOCOPY number
147                                );
148 
149 
150 /**
151   * Procedure   :  get_checkbox_status
152   * Type        :  Private
153   * Pre_reqs    :  None
154   * Description :  Will determine the status of the checkbox for granting delegation role
155   * Parameters  :
156   * input parameters
157   * @param     p_reg_id
158   *     description:  The usertype_reg_id or subscription_reg_id
159   *     required   :  Y
160   *     validation :  Must be a usertype_reg_id or subscription_reg_id
161   *   p_user_id:
162   *     description:  The user_id of a logged in user
163   *     required   :  Y
164   *     validation :  Must be a valid user_id
165   * output parameters
166   * x_result: Following int values
167   *     0 - NO_CHECKBOX
168   *     1 - CHECKED_UPDATE
169   *     2 - NOT_CHECKED_UPDATE
170   *     3 - CHECKED_NO_UPDATE
171   *     4 - NOT_CHECKED_NO_UPDATE
172   *
173   *
174  */
175 
176 procedure get_checkbox_status (
177                                    p_reg_id  in number,
178                                    p_user_id in number,
179                                    x_result  out NOCOPY number
180                                );
181 
182 
183 
184 /**
185   * Procedure   :  get_checkbox_status_reg
186   * Type        :  Private
187   * Pre_reqs    :  None
188   * Description :  Will determine the status of the checkbox for
189   * granting delegation role
190   * Parameters  :
191   * input parameters
192   * @param     p_subscription_id
193   *     description:  The subscription_id of an enrollment
194   *     required   :  Y
195   *     validation :  Must be a valid subscription_id
196   * @param     p_user_id:
197   *     description:  The user_id of a logged in user
198   *     required   :  Y
199   *     validation :  Must be a valid user_id
200   * output parameters
201   * x_result: Following int values
202   *     1 - CHECKED_UPDATE
203   *     2 - NOT_CHECKED_UPDATE
204   *     3 - CHECKED_NO_UPDATE
205   *     4 - NOT_CHECKED_NO_UPDATE
206   *
207   *
208  */
209 
210 procedure get_checkbox_status_reg (
211                                    p_subscription_id       in number,
212                                    p_user_id               in number,
213                                    p_usertype_id           in number,
214                                    x_result                out NOCOPY number
215                                );
216 
217 /**
218   * Procedure   :  get_enrollment_avail
219   * Type        :  Private
220   * Pre_reqs    :  None
221   * Description :  Will determine if an admin can assign this enrollment
222   *                to a user or not and it will also determine the
223   *                checkbox status
224   * granting delegation role
225   * Parameters  :
226   * input parameters
227   * @param     p_subscription_id
228   *     description:  The subscription_id of an enrollment
229   *     required   :  Y
230   *     validation :  Must be a valid subscription_id
231   * @param     p_user_id:
232   *     description:  The user_id of a logged in user
233   *     required   :  Y
234   *     validation :  Must be a valid user_id
235   * output parameters
236   * x_checkbox_code: Following int values
237   *     1 - CHECKED_UPDATE
238   *     2 - NOT_CHECKED_UPDATE
239   *     3 - CHECKED_NO_UPDATE
240   *     4 - NOT_CHECKED_NO_UPDATE
241   * x_can_assign
242   *     0 - if admin cannot assign
243   *     1 - if admin can assign
244   *
245  */
246 
247 procedure get_enrollment_avail (
248                                    p_subscription_id       in number,
249                                    p_user_id               in number,
250                                    p_usertype_id           in number,
251                                    x_checkbox_code         out NOCOPY number,
252                                    x_can_assign            out NOCOPY number
253                                );
254 
255 /**
256   * Procedure   :  has_admin_enrollment
257   * Type        :  Private
258   * Pre_reqs    :  None
259   * Description :  Will determine if an admin has all the roles
260   *                for an enrollment or not
261   * granting delegation role
262   * Parameters  :
263   * input parameters
264   * @param     p_subscription_id
265   *     description:  The subscription_id of an enrollment
266   *     required   :  Y
267   *     validation :  Must be a valid subscription_id
268   * @param     p_user_id:
269   *     description:  The user_id of a logged in user
270   *     required   :  Y
271   *     validation :  Must be a valid user_id
272   * output parameters
273   * x_has_enrollment
274   *     0 - if admin does not have all the roles
275   *     1 - if admin has all the roles
276   *
277  */
278 
279 procedure has_admin_enrollment (
280                                    p_subscription_id       in number,
281                                    p_user_id               in number,
282                                    x_has_enrollment        out NOCOPY number
283                                ) ;
284 /**
285   * Function    :  is_approval_required
286   * Type        :  Private
287   * Pre_reqs    :  None
288   * Description :  Will determine if an approval is required
289   *                for an enrollment or not
290   * Parameters  :
291   * input parameters
292   * @param     p_subscription_id
293   *     description:  The subscription_id of an enrollment
294   *     required   :  Y
295   *     validation :  Must be a valid subscription_id
296   * @param     p_approval_id:
297   *     description:  The p_approval_id of an enrollment
298   *     required   :  Y
299   *     validation :  Must be a valid approval_id
300   * @param     p_activation_mode:
301   *     description:  The p_activation_mode of an enrollment
302   *     required   :  Y
303   *     validation :  Must be a valid activation mode
304   * @param     p_is_admin:
305   *     description:  To determine, if a user is an admin or not
306   *     required   :  Y
307   *     validation :  Must be 0 or 1
308   * @return
309   *     0 - if approval is not required
310   *     1 - if approval is required
311   *
312  */
313 
314 function is_approval_required(
315                          p_subscription_id  in number,
316                          p_approval_id      in number,
317                          p_activation_mode  in varchar2,
318                          p_is_admin         in number,
319                          p_can_assign       in number
320                                  ) return number;
321 
322 end JTF_UM_WF_DELEGATION_PVT;