DBA Data[Home] [Help]

PACKAGE: APPS.JTF_UM_PASSWORD_PVT

Source


1 PACKAGE JTF_UM_PASSWORD_PVT AUTHID CURRENT_USER as
2 /* $Header: JTFVUMPS.pls 115.12 2002/11/21 22:57:51 kching ship $ */
3 -- Start of Comments
4 -- Package name     : JTF_UM_PASSWORD_PVT
5 -- Purpose          : generate password and send email to user with the password.
6 -- History          :
7 
8 -- KCHERVEL  12/03/01  Created
9 -- NOTE             :
10 -- End of Comments
11 
12 /**
13  * Procedure   :  generate_password
14  * Type        :  Private
15  * Pre_reqs    :
16  * Description : Creates a password. The length of the password is obtained from the profile
17  *               SIGNON_PASSWORD_LENGTH.
18  * Parameters
19  * input parameters : None
20  * output parameters
21  * @return   returns a String that can be used as the password
22   * Errors      :
23  * Other Comments :
24  */
25 procedure generate_password (p_api_version_number  in number,
26                  p_init_msg_list               in varchar2 := FND_API.G_FALSE,
27                  p_commit                      in varchar2 := FND_API.G_FALSE,
28                  p_validation_level          in number   := FND_API.G_VALID_LEVEL_FULL,
29                  x_password                  out NOCOPY varchar2,
30                  x_return_status             out NOCOPY varchar2,
31                  x_msg_count                 out NOCOPY number,
32                  x_msg_data                  out NOCOPY varchar2
33                  );
34 
35 
36 /**
37  * Function    :  send_password
38  * Type        :  Private
39  * Pre_reqs    :  Should be called only after the changes to the user information are committed.
40  * Description : this procedure initiates a workflow that sends an email to the user.
41  * Parameters  : None
42  * input parameters (see workflow parameters for description)
43  *     param  p_requester_user_name    (*)
44   *     param   p_requester_password      (*)
45   *     param   p_requester_name
46   *     param   p_usertype_id
47   *     param   p_responsibility_id
48   *     param   p_application_id
49   *     param   p_first_time_user
50   *     param   p_send_password
51  *     param  p_date_of_request
52  *     param  p_confirmation_id
53  * output parameters
54  *     param  x_return_status
55  *     param  x_msg_data
56  *     param  x_msg_count
57  * (*) indicates required parameters
58   * Errors      : Expected errors
59  *               requester_user_name or password is null.
60  *               e_mail address undefined
61  * Other Comments :
62  *
63  */
64 
65 procedure send_password (p_api_version_number  in number,
66                  p_init_msg_list               in varchar2 := FND_API.G_FALSE,
67                  p_commit                      in varchar2 := FND_API.G_FALSE,
68                  p_validation_level            in number   := FND_API.G_VALID_LEVEL_FULL,
69                  p_requester_user_name         in varchar2,
70                  p_requester_password          in varchar2,
71                  p_requester_last_name         in varchar2 := null,
72                  p_requester_first_name        in varchar2 := null,
73                  p_usertype_id                in number := null,
74                  p_responsibility_id         in number := null,
75                  p_application_id            in number := null,
76                  p_wf_user_name              in varchar2 := null,
77                  p_first_time_user           in varchar2 := 'Y',
78                  p_user_verified             in varchar2 := 'N',
79                  p_confirmation_number       in varchar2 := null,
80                  p_enrollment_only           in varchar2 := 'N',
81                  p_enrollment_list           in varchar2 := null,
82                  x_return_status             out NOCOPY varchar2,
83                  x_msg_count                 out NOCOPY number,
84                  x_msg_data                  out NOCOPY varchar2);
85 
86 
87 
88 /**
89  * Procedure   :  set_parameters
90  * Type        :  Private
91  * Pre_reqs    :
92  * Description : this procedure sets all the parameters needed for the email / notifications.
93  * Parameters  :
94  * input parameters
95  *   itemtype  - A valid item type from (WF_ITEM_TYPES table).
96  *   itemkey   - A string generated from the application object's primary key.
97  *   actid     - The function activity(instance id).
98  *   funcmode  - Run/Cancel/Timeout
99  * output parameters
100  *   Resultout    - 'COMPLETE:T' if all parameters are set properly
101  *                - 'COMPLETE:F' if parameters could not be set
102  *
103  * Errors      :
104  * Other Comments :
105  */
106 procedure set_parameters (itemtype  in  varchar2,
107                           itemkey   in  varchar2,
108                           actid     in  number,
109                           funcmode  in  varchar2,
110                           resultout out NOCOPY varchar2);
111 
112 
113 /**
114  * Procedure   :  is_first_time_user
115  * Type        :  Private
116  * Pre_reqs    :
117  * Description : this procedure returns 'T' if the user is a first time user
118  * Parameters  :
119  * input parameters
120  *   itemtype  - A valid item type from (WF_ITEM_TYPES table).
121  *   itemkey   - A string generated from the application object's primary key.
122  *   actid     - The function activity(instance id).
123  *   funcmode  - Run/Cancel/Timeout
124  * output parameters
125  *   Resultout    - 'COMPLETE:T' if the user is a first time user
126  *                - 'COMPLETE:F' if the user is not a first time user
127  *
128  * Errors      :
129  * Other Comments :
130  */
131 procedure is_first_time_user (itemtype  in  varchar2,
132                           itemkey   in  varchar2,
133                           actid     in  number,
134                           funcmode  in  varchar2,
135                           resultout out NOCOPY varchar2);
136 
137 
138 /**
139  * Procedure   :  approval_required
140  * Type        :  Private
141  * Pre_reqs    :
142  * Description : this procedure returns whether or not an approval is required
143  * Parameters  :
144  * input parameters
145  *   itemtype  - A valid item type from (WF_ITEM_TYPES table).
146  *   itemkey   - A string generated from the application object's primary key.
147  *   actid     - The function activity(instance id).
148  *   funcmode  - Run/Cancel/Timeout
149  * output parameters
150  *   Resultout    - 'COMPLETE:T' if approval is required
151  *                - 'COMPLETE:F' if approval is not required
152  *
153  * Errors      :
154  * Other Comments :
155  */
156 procedure is_approval_required (itemtype  in  varchar2,
157                           itemkey   in  varchar2,
158                           actid     in  number,
159                           funcmode  in  varchar2,
160                           resultout out NOCOPY varchar2);
161 
162 
163 /**
164  * Procedure   :  user_verified
165  * Type        :  Private
166  * Pre_reqs    :
167  * Description : this procedure returns 'T' if a user is verified and a password can be sent to the user
168  * Parameters  :
169  * input parameters
170  *   itemtype  - A valid item type from (WF_ITEM_TYPES table).
171  *   itemkey   - A string generated from the application object's primary key.
172  *   actid     - The function activity(instance id).
173  *   funcmode  - Run/Cancel/Timeout
174  * output parameters
175  *   Resultout    - 'COMPLETE:T' if user is verified
176  *                - 'COMPLETE:F' if user is not verified
177  *
178  * Errors      :
179  * Other Comments :
180  */
181 procedure is_user_verified (itemtype  in  varchar2,
182                           itemkey   in  varchar2,
183                           actid     in  number,
184                           funcmode  in  varchar2,
185                           resultout out NOCOPY varchar2);
186 
187 /**
188  * Procedure   :  enrollment_only
189  * Type        :  Public
190  * Pre_reqs    :
191  * Description : this procedure returns 'T' if only enrollment information should be sent to the user.
192  * Parameters  :
193  * input parameters
194  *   itemtype  - A valid item type from (WF_ITEM_TYPES table).
195  *   itemkey   - A string generated from the application object's primary key.
196  *   actid     - The function activity(instance id).
197  *   funcmode  - Run/Cancel/Timeout
198  * output parameters
199  *   Resultout    - 'COMPLETE:T' if user is verified
200  *                - 'COMPLETE:F' if user is not verified
201  *
202  * Errors      :
203  * Other Comments :
204  */
205 procedure enrollment_only (itemtype  in  varchar2,
206                           itemkey   in  varchar2,
207                           actid     in  number,
208                           funcmode  in  varchar2,
209                           resultout out NOCOPY varchar2);
210 
211 
212 /**
213  * Procedure   :  reset_password
214  * Type        :  Private
215  * Pre_reqs    :
216  * Description : this procedure resets the password and sends and email to the user.
217  *               Also, inserts a user into wf_local_user if a valid user and email
218  *               is available and there is no valid wf_user
219  * Parameters  : None
220  * input parameters
221  *     param  requester_user_name
222  *     param  requester_email
223  *  (*) required fields
224  * output parameters
225  *     param  x_return_status
226  *     param  x_msg_data
227  *     param  x_msg_count
228   * Errors      : Expected Errors
229  *               requester_user_name and email is null
230  *               requester_user_name is not a valid user
231  *               requester_email does not correspond to a valid user
232  * Other Comments :
233  * FND_USER update : The update of fnd_user table is done using fnd_user_pkg procedure
234  * as recommended by fnd (bug 1713101)
235  * DEFAULTING LOGIC
236  * If only the user name is passed then the email is defaulted using the following logic
237  *  1. Email address from fnd_users where user_name = p_requester_user_name
238  *  2. Email from per_all_people_F where person_id = employee_id
239  *     (retrieved from fnd_users using the user_name)
240  *  3. Email from hz_contact_points where owner_type_id = party_id and
241  *     owner_table = 'HZ_PARTIES' and contact_point_type = 'EMAIL' and primary_flag = 'Y'.
242  *  Party_id is determined using the following :
243  *  (a)from hz_parties where party_id = customer_id (retrieved from fnd_users
244  *     using the user_name) and party_type = 'PERSON' or 'ORGANIZATION'.
245  *  (b)from hz_parties where party_id = customer_id (retrieved from fnd_users
246  *     using the user_name) and party_type = 'PARTY_RELATIONSHIP'. Use this party_id
247  *     to determine the subject_id from the hz_party_relationships table.
248  *     The subject_id would be used for the querying hz_contact_points.
249  * In all the above cases the user, employee, party etc. have to be valid.
250  *
251  * If only the email is specified a similar procedure is used to determine the valid user.
252  */
253 
254 procedure reset_password(p_api_version_number  in number,
255                  p_init_msg_list               in varchar2 := FND_API.G_FALSE,
256                  p_commit                      in varchar2 := FND_API.G_FALSE,
257                  p_validation_level            in number   := FND_API.G_VALID_LEVEL_FULL,
258                  p_requester_user_name         in varchar2 := null,
259                  p_requester_email             in varchar2 := null,
260                  p_application_id              in number := null,
261                  p_responsibility_id           in number := null,
262                  x_return_status             out NOCOPY varchar2,
263                  x_msg_count                 out NOCOPY number,
264                  x_msg_data                  out NOCOPY varchar2
265                  );
266 
267 
268 Procedure enrollment_info(document_id    in varchar2,
269                           display_type   in varchar2,
270                           document       in out NOCOPY varchar2,
271                           document_type  in out NOCOPY varchar2);
272 End JTF_UM_PASSWORD_PVT;