DBA Data[Home] [Help]

PACKAGE: APPS.AMW_VIOLATION_PUB

Source


1 package AMW_VIOLATION_PUB as
2 /*$Header: amwvpubs.pls 120.4 2008/02/18 09:25:17 ptulasi ship $*/
3 
4 
5 TYPE G_NUMBER_TABLE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
6 
7 G_AMW_USER                 CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_USER');
8 G_AMW_GRANTS               CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_GRANTS');
9 G_AMW_USER_ROLES           CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_USER_ROLES');
10 G_AMW_ALL_ROLES_VL         CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_ALL_ROLES_VL');
11 G_AMW_RESPONSIBILITY_VL    CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_RESPONSIBILITY_VL');
12 /*04.26.2007 npanandi: bug 6017644 fix, added g_amw_form_functions_vl to fix compilation errors*/
13 G_AMW_FORM_FUNCTIONS_VL    CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_FORM_FUNCTIONS_VL');
14 G_AMW_MENUS_VL             CONSTANT VARCHAR2(30) := FND_PROFILE.VALUE('AMW_MENUS_VL');
15 G_AMW_MENU_ENTRIES         CONSTANT VARCHAR2(240) := FND_PROFILE.VALUE('AMW_MENU_ENTRIES');
16 
17 -- 08:05:2007 - Psomanat : bug 	6000479 , 6000625
18 TYPE ridList IS TABLE OF ROWID INDEX BY BINARY_INTEGER;
19 newRows ridList;
20 
21 
22 -- ===============================================================
23 -- Function name
24 --          Check_Resp_Violations
25 --
26 -- Purpose
27 --          check for OICM SOD constriants that will be violated
28 --          if the user is assigned the additional responsibility
29 -- Params
30 --          p_user_id            := input fnd user_id
31 --          p_responsibility_id  := input fnd responsibility_id
32 -- Return
33 --          'N'                  := if no SOD violation found.
34 --          'Y'                  := if SOD violation exists.
35 --                                  The SOD violation should NOT be restricted to
36 --                                  only the new responsiblity.
37 --                                  If the existing responsibilities have any violations,
38 --                                  the function should return 'Y' as well.
39 --
40 -- History
41 -- 		  	07/13/2005    tsho     Create
42 --          08/03/2005    tsho     Consider User Waivers
43 -- ===============================================================
44 Function Check_Resp_Violations (
45     p_user_id               IN  NUMBER,
46     p_responsibility_id     IN  NUMBER
47 ) return VARCHAR2;
48 
49 
50 -- ===============================================================
51 -- Function name
52 --          User_Resp_Violation_Details
53 --
54 -- Purpose
55 --          check for OICM SOD constriants that will be violated
56 --          if the user is assigned the additional responsibility
57 -- Params
58 --          p_user_id            := input fnd user_id
59 --          p_responsibility_id  := input fnd responsibility_id
60 -- Return
61 --          'N'                            := if no SOD violation found.
62 --          'Resp_name1, Resp_name2...'    := if SOD violation exists.
63 --                                            The SOD violation should NOT be restricted to
64 --                                            only the new responsiblity.
65 --                                            If the existing responsibilities have any violations,
66 --                                            the function should return 'Y' as well.
67 --
68 -- History
69 -- 		  	08/01/2005    tsho     Create
70 --          08/03/2005    tsho     Consider User Waivers
71 -- ===============================================================
72 Function User_Resp_Violation_Details (
73     p_user_id               IN  NUMBER,
74     p_responsibility_id     IN  NUMBER
75 ) return VARCHAR2;
76 
77 
78 -- ===============================================================
79 -- Function name
80 --          Get_Violat_Existing_Role_List
81 --
82 -- Purpose
83 --          get a flat string list of this user's existing role display name, together with those new assigned role(among p_role_names_string)
84 --          may violate the specified constraint
85 --
86 -- Params
87 --          p_user_id            := input fnd user_id
88 --          p_constraint_rev_id  := input constraint_rev_id
89 --          p_constraint_type_code  := input constraint type for p_constraint_rev_id
90 --
91 -- Return
92 --          a string list of role display names which violates the specified constraint,
93 --          each display name is seperated by ','
94 --
95 -- History
96 -- 		  	07/27/2005    tsho     Create
97 -- ===============================================================
98 Function Get_Violat_Existing_Role_List (
99     p_user_id                   IN  NUMBER,
100     p_constraint_rev_id         IN  NUMBER,
101     p_constraint_type_code      IN  VARCHAR2
102 ) RETURN VARCHAR2;
103 
104 
105 -- ===============================================================
106 -- Function name
107 --          Get_Violat_Existing_Resp_List
108 --
109 -- Purpose
110 --          get a flat string list of this user's existing responsibility display name, together with those new assigned role(among p_role_names_string)
111 --          may violate the specified constraint
112 --
113 -- Params
114 --          p_user_id            := input fnd user_id
115 --          p_constraint_rev_id  := input constraint_rev_id
116 --          p_constraint_type_code  := input constraint type for p_constraint_rev_id
117 --
118 -- Return
119 --          a string list of role display names which violates the specified constraint,
120 --          each display name is seperated by ','
121 --
122 -- History
123 -- 		  	07/27/2005    tsho     Create
124 -- ===============================================================
125 Function Get_Violat_Existing_Resp_List (
126     p_user_id                   IN  NUMBER,
127     p_constraint_rev_id         IN  NUMBER,
128     p_constraint_type_code      IN  VARCHAR2
129 ) RETURN VARCHAR2;
130 
131 
132 -- ===============================================================
133 -- Function name
134 --          Get_Violat_Existing_Menu_List
135 --
136 -- Purpose
137 --          get a flat string list of this user's existing permission set(menu) display name, ]
138 --          together with those new assigned role(among p_role_names_string)
139 --          may violate the specified constraint
140 --
141 -- Params
142 --          p_user_id            := input fnd user_id
143 --          p_constraint_rev_id  := input constraint_rev_id
144 --          p_constraint_type_code  := input constraint type for p_constraint_rev_id
145 --
146 -- Return
147 --          a string list of role display names which violates the specified constraint,
148 --          each display name is seperated by ','
149 --
150 -- History
151 -- 		  	07/27/2005    tsho     Create
152 -- ===============================================================
153 Function Get_Violat_Existing_Menu_List (
154     p_user_id                   IN  NUMBER,
155     p_constraint_rev_id         IN  NUMBER,
156     p_constraint_type_code      IN  VARCHAR2
157 ) RETURN VARCHAR2;
158 
159 
160 /*
161  * cpetriuc
162  * ---------------------
163  * CHECK_MENU_VIOLATIONS
164  * ---------------------
165  * Checks if the menu provided as argument violates any SOD (Segregation of Duties)
166  * constraints.  If a constraint is violated, the function returns an error message
167  * containing the name of the violated constraint together with the list of functions
168  * that define the constraint.  Otherwise, the function returns 'N'.
169  *
170  * psomanat : bug 5698160 : consider Responsibility waiver
171  *
172  */
173 function CHECK_MENU_VIOLATIONS(p_menu_id NUMBER,
174     p_responsibility_id     IN  NUMBER :=NULL,
175     p_application_id         IN  NUMBER :=NULL
176 ) return VARCHAR2;
177 
178 
179 /*
180  * cpetriuc
181  * -------------------------
182  * CHECK_FUNCTION_VIOLATIONS
183  * -------------------------
184  * Checks if any SOD (Segregation of Duties) constraints would be violated if the
185  * argument function or submenu would be added to the menu provided as argument.  If a
186  * constraint would be violated, the function returns an error message containing the name
187  * of the potentially violated constraint together with the list of functions that define
188  * the constraint.  Otherwise, the function returns 'N'.
189  */
190 function CHECK_FUNCTION_VIOLATIONS(p_menu_id NUMBER, p_sub_menu_id NUMBER, p_function_id NUMBER) return VARCHAR2;
191 
192 
193 /*
194  * cpetriuc
195  * ------------------------------
196  * CHECK_FUNCTION_LIST_VIOLATIONS
197  * ------------------------------
198  * Created initially as a helper function, to be used internally.
199  *
200  * Checks if the list of menu functions provided as argument violates any SOD
201  * (Segregation of Duties) constraints.  If a constraint is violated, the function
202  * returns an error message containing the name of the violated constraint together
203  * with the list of functions that define the constraint.  Otherwise, the function
204  * returns 'N'.
205  * psomanat : bug 5698160 : consider Responsibility waiver
206  */
207 function CHECK_FUNCTION_LIST_VIOLATIONS(g_menu_function_id_list G_NUMBER_TABLE,
208     p_responsibility_id     IN  NUMBER,
209     p_application_id         IN  NUMBER
210 ) return VARCHAR2;
211 
212 
213 /*
214  * cpetriuc
215  * -----------------------------
216  * CHECK_ADD_FUNCTION_VIOLATIONS
217  * -----------------------------
218  * Created initially as a helper function, to be used internally.
219  *
220  * Checks if adding the argument function to the list of menu functions provided as
221  * argument violates any SOD (Segregation of Duties) constraints.  If a constraint is
222  * violated, the function returns an error message containing the name of the violated
223  * constraint together with the list of functions that define the constraint.  Otherwise,
224  * the function returns 'N'.
225  */
226 function CHECK_ADD_FUNCTION_VIOLATIONS(g_menu_function_id_list G_NUMBER_TABLE, p_function_id NUMBER) return VARCHAR2;
227 
228 -- ===============================================================
229 -- Private Function name
230 --          get_User_Id
231 --
232 -- Purpose
233 --          This function takes user_name as input and returns user_id
234 -- Params
235 --          p_user_name          := user_name
236 -- Return
237 -- Notes
238 -- History
239 --          26.12.2007 ptulasi: Created for bug 6701364
240 --
241 -- ===============================================================
242 Function get_User_Id (
243     p_user_name     IN  VARCHAR2
244 ) return NUMBER;
245 
246 end AMW_VIOLATION_PUB;