1 PACKAGE UMX_PUB AS
2 /* $Header: UMXPRRSS.pls 120.5 2005/09/01 10:12:06 kching noship $ */
3 /*#
4 * This is the public interface that provides APIs to execute various
5 * functions for the RBAC support of User Management (UMX).
6 * @rep:scope public
7 * @rep:product UMX
8 * @rep:displayname User Management Public Interface
9 * @rep:category BUSINESS_ENTITY UMX_ROLE_REG_REQUESTS
10 * @rep:category BUSINESS_ENTITY UMX_ACCT_REG_REQUESTS
11 * @rep:category BUSINESS_ENTITY UMX_ROLE
12 */
13
14 -- Function : get_attribute_value
15 -- Type : Public
16 -- Pre_reqs : None
17 -- Description : This API, is intended to be called by the AME's Rule,
18 -- will return the value of the registration data.
19 -- input parameters (Mandatory):
20 -- p_reg_request_id : Registration Request ID
21 -- p_attribute_name : Attribute name
22 -- Output :
23 -- Description : Attribute value
24 --
25 /*#
26 * This API, is intended to be called by the AME's Rule,
27 * will return the value of the registration data.
28 * @param p_reg_request_id The Registration Request ID
29 * @paraminfo {@rep:required}
30 * @param p_attribute_name The name of the registration data.
31 * @paraminfo {@rep:required}
32 * @return The value of the registration data.
33 * @rep:displayname Get the value from the User Management's Registration Data.
34 * @rep:scope public
35 * @rep:lifecycle active
36 */
37 function get_attribute_value (
38 p_reg_request_id in UMX_REG_REQUESTS.REG_REQUEST_ID%TYPE,
39 p_attribute_name in varchar2
40 ) return varchar2;
41
42 --
43 -- Procedure : assign_role
44 -- Type : Public
45 -- Pre_reqs : None
46 -- Description : This API assigns role to a user either by direct assigning or
47 -- launching the UMX Registration Workflow process.
48 -- Input Parameters (Mandatory):
49 -- p_registration_data : Table of record type of UMX_REGISTRATION_DATA
50 -- Output Parameters:
51 -- p_registration_data : Table of record type of UMX_REGISTRATION_DATA
52 --
53 /*#
54 * This API assigns a role to a user either by direct assigning or
55 * launching the UMX Registration Workflow process.
56 * @param p_registration_data The registration data
57 * @paraminfo {@rep:required}
58 * @rep:displayname Assign Role to a User
59 * @rep:businessevent oracle.apps.fnd.umx.rolerequested
60 * @rep:businessevent oracle.apps.fnd.umx.requestapproved
61 * @rep:scope public
62 * @rep:lifecycle active
63 */
64 procedure assign_role (p_registration_data in out NOCOPY UMX_REGISTRATION_PVT.UMX_REGISTRATION_DATA_TBL);
65
66 --
67 -- Procedure : updateWfAttribute
68 -- Type : Public
69 -- Pre_reqs : None
70 -- Description : This API can be invoked by anyone who registers a PL/SQL subscription to
71 -- UMX raised Business Events during registration. This API will update the main
72 -- User Management workflow event(payload) object and also the corresponding
73 -- workflow attribute. If p_attr_name doesn't exist in the workflow, one is created.
74 -- This API can also be called by anyone who has a custom notification workflow
75 -- defined, and want this name value pair to be reflected in the main workflow;
76 -- this name value pair will be available to rest of subscriptions and workflow
77 -- activities.
78 -- Input Parameters (Mandatory):
79 -- p_event : Oracle Workflow WF_EVENT_T object type
80 -- p_attr_name : Varchar2, name of the attribute, maps to workflow attribute name.
81 -- p_attr_value : varchar2, value of the attribute, maps to Workflow attribute string value.
82 -- Output Parameters:
83 -- p_event : Oracle Workflow WF_EVENT_T object type
84 --
85 /*#
86 * This API Adds or Updates an attribute to the User Management Registration
87 * workflow. This method is to be used in any synchronous subscriptions, for
88 * events raised during registration process.
89 * @param p_event WF_EVENT_T
90 * @param p_attr_name attribute name
91 * @param p_attr_value attribute value
92 * @rep:scope public
93 * @rep:lifecycle active
94 * @rep:displayname Update User Management Workflow attribute.
95 */
96 procedure updateWfAttribute (p_event in out NOCOPY WF_EVENT_T,
97 p_attr_name in VARCHAR2 DEFAULT NULL,
98 p_attr_value in VARCHAR2 DEFAULT NULL);
99
100 --
101 -- Procedure : notification_process_done
102 -- Type : Public
103 -- Pre_reqs : None
104 -- Description : This API will restart the sleeping main workflow.
105 /*#
106 * This API signifies the end of the notification workflow, it raises an
107 * event which will restart the main User Management workflow
108 * This method should be used in the scenario of customizing the Notification
109 * workflows. This Notification workflow must have been started by the event,
110 * which was defined as part of meta-data. This method should be associated
111 * with the last activity in your notification workflow. The signature of the
112 * API is the standard API for PL/SQL procedures called by function activities.
113 * @param item_type varchar2
114 * @param item_key varchar2
115 * @param activity_id number
116 * @param command varchar2
117 * @param resultout varchar2
118 * @rep:scope public
119 * @rep:lifecycle active
120 * @rep:displayname User Management, Notification Process Done.
121 */
122 procedure Notification_Process_Done (item_type in varchar2,
123 item_key in varchar2,
124 activity_id in number,
125 command in varchar2,
126 resultout out NOCOPY varchar2);
127
128 --
129 -- Procedure : get_suggested_username
130 -- Type : Public
131 -- Pre_reqs : None
132 -- Description : This API will return the suggested user name for a person.
133 -- The user name will be generated via the
134 -- oracle.apps.fnd.umx.username.generate Business Event
135 -- which will be raised by this API. The event could
136 -- return a null value as the user name if the user name
137 -- could not be generated.
138 -- Input Parameters :
139 -- @param p_person_party_id
140 -- Description: Person Party ID of the person who to generate
141 -- a username for.
142 -- Required : N
143 -- Output Parameters :
144 -- x_suggested_username: Username generated by the Username Policy. May return null.
145 --
146 /*#
147 * This API will return the suggested user name for a person.
148 * The user name will be generated via the
149 * oracle.apps.fnd.umx.username.generate Business Event
150 * which will be raised by this API. The event could
151 * return a null value as the user name if the user name
152 * could not be generated.
153 * @param p_person_party_id Person Party ID of the person who to generate a username for.
154 * @param x_suggested_username Username generated by the Username Policy. May return null.
155 * @return Suggested User Name
156 * @rep:displayname Generate the Suggested User Name
157 * @rep:scope public
158 * @rep:lifecycle active
159 */
160 --
161 procedure get_suggested_username (p_person_party_id in HZ_PARTIES.PARTY_ID%TYPE default null,
162 x_suggested_username out nocopy FND_USER.USER_NAME%TYPE);
163
164 --
165 -- Procedure : get_username_policy_desc
166 -- Type : Public
167 -- Pre_reqs : None
168 -- Description : This API will return the description of the user name
169 -- policy. The return parameters / user name policy is
170 -- based on the UMX: User Name Policy (UMX_USERNAME_POLICY)
171 -- profile option, which points to a LOOKUP TYPE that
172 -- should include the following:
173 --
174 -- LOOKUP CODES: DESCRIPTION, PROMPT, HINT
175 --
176 -- with the appropriate LOOKUP MEANING defined. Example:
177 --
178 -- LOOKUP TYPE: UMX_USERNAME_POLICY:EMAIL
179 --
180 -- LOOKUP CODE MEANING DESCRIPTION
181 -- ----------- -------------------------- -------------------------------
182 -- PROMPT User Name Prompt of the user name text
183 -- input field.
184 --
185 -- DESCRIPTION User Names must be based Description of the policy
186 -- on Email Address
187 --
188 -- HINT example: [email protected] Example of what the username should
189 -- look like.
190 --
191 -- Input Parameters :
192 -- Output Parameters :
193 -- x_policy_code: User Name Policy code. Preseeded policies are:
194 --
195 -- Code: UMX_USERNAME_POLICY:EMAIL
196 -- Meaning: User name should be defined as Email Address.
197 -- Product teams may choose to hide the email
198 -- field in any account creation / registration
199 -- UI's as long as the entered username (email)
200 -- is copied into the fnd_user.email_address field
201 -- as well.
202 --
203 -- Code: UMX_USERNAME_POLICY:NONE
204 -- Meaning: No username policy / format defined, freetext
205 --
206 -- Code: Anything else, this would be a custom policy defined
207 -- at a client site.
208 --
209 -- x_description: User Name Policy description. May be null. For example:
210 --
211 -- "User Names must be based on <b>Email Address</b>".
212 -- The description can be displayed as a quick tip in
213 -- the user account creation/registration page.
214 --
215 -- x_prompt: Prompt of the User Name field. Defaults to "User Name" if
216 -- none is defined in the policy.
217 --
218 -- x_hint: An example of the user name format. May be null. For
219 -- example:
220 --
221 -- "(example: [email protected])"
222 --
223 -- The hint can be displayed as an inline hint below the
224 -- User Name field in any user account creation/registration
225 -- page.
226 --
227 /*#
228 * This API will return the description of the user name
229 * policy. The return parameters / user name policy is
230 * based on the UMX: User Name Policy (UMX_USERNAME_POLICY)
231 * profile option, which points to a LOOKUP TYPE that
232 * should include the following:
233 * LOOKUP CODES: DESCRIPTION, PROMPT, HINT
234 * with the appropriate LOOKUP MEANING defined. Example:
235 * LOOKUP TYPE: UMX_USERNAME_POLICY:EMAIL
236 * LOOKUP CODE MEANING DESCRIPTION
237 * ----------- -------------------------- -------------------------------
238 * PROMPT User Name Prompt of the user name text
239 * input field.
240 *
241 * DESCRIPTION User Names must be based Description of the policy
242 * on Email Address
243 *
244 * HINT example: [email protected] Example of what the username should
245 * look like.
246 * @param x_policy_code User Name Policy code. Preseeded policies are:
247 * Code: UMX_USERNAME_POLICY:EMAIL
248 * Meaning: User name should be defined as Email Address.
249 * Product teams may choose to hide the email
250 * field in any account creation / registration
254 *
251 * UI's as long as the entered username (email)
252 * is copied into the fnd_user.email_address field
253 * as well.
255 * Code: UMX_USERNAME_POLICY:NONE
256 * Meaning: No username policy / format defined, freetext
257 *
258 * Code: Anything else, this would be a custom policy defined
259 * at a client site.
260 *
261 * @param x_description User Name Policy description. May be null. For example:
262 *
263 * "User Names must be based on <b>Email Address</b>".
264 * The description can be displayed as a quick tip in
265 * the user account creation/registration page.
266 *
267 * @param x_prompt Prompt of the User Name field. Defaults to "User Name" if
268 * none is defined in the policy.
269 *
270 * @param x_hint An example of the user name format. May be null. For
271 * example:
272 *
273 * "(example: [email protected])"
274 *
275 * The hint can be displayed as an inline hint below the
276 * User Name field in any user account creation/registration
277 * page.
278 * @rep:displayname Get the User Name Policy Descriptions
279 * @rep:scope public
280 * @rep:lifecycle active
281 */
282 --
283 procedure get_username_policy_desc
284 (x_policy_code out nocopy FND_LOOKUP_TYPES.LOOKUP_TYPE%TYPE,
285 x_description out nocopy FND_LOOKUP_VALUES.MEANING%TYPE,
286 x_prompt out nocopy FND_LOOKUP_VALUES.MEANING%TYPE,
287 x_hint out nocopy FND_LOOKUP_VALUES.MEANING%TYPE);
288
289 BEFORE_ACT_ACTIVATION CONSTANT VARCHAR2(30) := 'BEFORE ACCOUNT ACTIVATION';
290 AFTER_ACT_ACTIVATION CONSTANT VARCHAR2(30) := 'AFTER ACCOUNT ACTIVATION';
291 ROLE_APPROVED CONSTANT VARCHAR2(15) := 'ROLE APPROVED';
292 END UMX_PUB;