1 PACKAGE HZ_UI_UTIL_PKG AUTHID CURRENT_USER AS
2 /* $Header: ARHPUISS.pls 120.6 2006/04/13 22:25:48 vnama noship $ */
3
4 --------------------------------------
5 --------------------------------------
6 -- declaration of constants
7 --------------------------------------
8 --------------------------------------
9
10
11 --------------------------------------------------------------------------
12 -- declaration of user defined type
13 --------------------------------------------------------------------------
14
15 -- Use type definitions directly from HZ_MIXNM_UTILITY to save an extraneous copy.
16 -- Rosetta wrapper generator cannot handle foreign type refernences, so use the following
17 -- if need to re-generate the Rosetta wrappers.
18
19 --TYPE INDEXVARCHAR30List IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
20 --TYPE INDEXVARCHAR1List IS TABLE OF VARCHAR2(1) INDEX BY BINARY_INTEGER;
21
22
23 --------------------------------------
24 --------------------------------------
25 -- Entity-Level Security Checks
26 --------------------------------------
27 --------------------------------------
28
29 -------------------------------------
30 -- CHECK_ENTITY_CREATION - Signature
31 -------------------------------------
32
33 PROCEDURE check_entity_creation (
34 p_entity_name IN VARCHAR2, -- table name
35 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
36 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
37 p_parent_entity_name IN VARCHAR2 DEFAULT NULL, -- if applicable
38 p_parent_entity_pk1 IN VARCHAR2 DEFAULT NULL, -- if applicable
39 p_parent_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- if applicable
40 p_function_name IN VARCHAR2 DEFAULT NULL, -- FND function name
41 x_create_flag OUT NOCOPY VARCHAR2 -- can we create?
42 );
43
44 -------------------------------------
45 -- GET_VIEW_PREDICATE - Signature
46 -------------------------------------
47
48 FUNCTION get_view_predicate (
49 p_entity_name IN VARCHAR2, -- entity/table you wish to filter
50 p_entity_alias IN VARCHAR2 DEFAULT NULL, -- alias for entity as used in SELECT
51 p_function_name IN VARCHAR2 DEFAULT NULL -- FND function name
52 ) RETURN VARCHAR2;
53
54
55 --------------------------------------
56 --------------------------------------
57 -- Row-Level Security Checks
58 --------------------------------------
59 --------------------------------------
60
61 /*
62 PROCEDURE check_row_access (
63 p_entity_name IN VARCHAR2, -- table name
64 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
65 p_entity_pk1 IN VARCHAR2, -- primary key
66 p_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- primary key pt. 2
67 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
68 x_viewable_flag OUT NOCOPY VARCHAR2, -- can we see it?
69 x_updateable_flag OUT NOCOPY VARCHAR2, -- can we mess with it?
70 x_deleteable_flag OUT NOCOPY VARCHAR2 -- can we get rid of it?
71 );
72 */
73
74 FUNCTION check_row_viewable (
75 p_entity_name IN VARCHAR2, -- table name
76 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
77 p_entity_pk1 IN VARCHAR2, -- primary key
78 p_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- primary key pt. 2
79 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
80 p_function_name IN VARCHAR2 DEFAULT NULL -- function name
81 ) RETURN VARCHAR2; -- "Y" or "N" if we can view the row
82
83 FUNCTION check_row_updateable (
84 p_entity_name IN VARCHAR2, -- table name
85 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
86 p_entity_pk1 IN VARCHAR2, -- primary key
87 p_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- primary key pt. 2
88 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
89 p_function_name IN VARCHAR2 DEFAULT NULL -- function name
90 ) RETURN VARCHAR2; -- "Y" or "N" if we can update the row
91
92 FUNCTION check_row_deleteable (
93 p_entity_name IN VARCHAR2, -- table name
94 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
95 p_entity_pk1 IN VARCHAR2, -- primary key
96 p_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- primary key pt. 2
97 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
98 p_function_name IN VARCHAR2 DEFAULT NULL -- function name
99 ) RETURN VARCHAR2; -- "Y" or "N" if we can delete the row
100
101 --------------------------------------
102 --------------------------------------
103 -- Column-Level Security Checks
104 --------------------------------------
105 --------------------------------------
106
107 PROCEDURE check_columns(
108 p_entity_name IN VARCHAR2, -- table name
109 p_data_source IN VARCHAR2 DEFAULT NULL, -- if applicable
110 p_entity_pk1 IN VARCHAR2, -- primary key
111 p_entity_pk2 IN VARCHAR2 DEFAULT NULL, -- primary key pt. 2
112 p_party_id IN NUMBER DEFAULT NULL, -- only pass if available
113 p_function_name IN VARCHAR2 DEFAULT NULL, -- function name
114 p_attribute_list IN HZ_MIXNM_UTILITY.INDEXVARCHAR30List, -- pl/sql table of attribute names
115 p_value_is_null_list IN HZ_MIXNM_UTILITY.INDEXVARCHAR1List, -- pl/sql table of flags
116 x_viewable_list OUT NOCOPY HZ_MIXNM_UTILITY.INDEXVARCHAR1List, -- pl/sql table of flags
117 x_updateable_list OUT NOCOPY HZ_MIXNM_UTILITY.INDEXVARCHAR1List -- pl/sql table of flags
118 );
119
120
121 /**
122 * PROCEDURE get_value
123 *
124 * DESCRIPTION
125 * used by common party UI .
126 * will return various value
127 * ARGUMENTS
128 * IN:
129 * p_org_contact_id org contact id. If passed in, will return
130 * org contact roles.
131 * p_phone_country_code phone country code
132 * p_phone_area_code phone area_code
133 * p_phone_number phone number. If passed in, will return
134 * formatted phone number.
135 * p_phone_extension phone extension.
136 * p_phone_line_type phone_line_type
137 * p_location_id location id. If passed in, will return
138 * formatted address.
139 * p_cust_acct_id Cust account ID, returns the formatted bill_to address
140 * p_cust_acct_site_id Cust account site ID, returns the formatted bill_to address
141 */
142
143 PROCEDURE get_value (
144 p_org_contact_id IN VARCHAR2,
145 p_phone_country_code IN VARCHAR2,
146 p_phone_area_code IN VARCHAR2,
147 p_phone_number IN VARCHAR2,
148 p_phone_extension IN VARCHAR2,
149 p_phone_line_type IN VARCHAR2,
150 p_location_id IN VARCHAR2,
151 x_org_contact_roles OUT NOCOPY VARCHAR2,
152 x_formatted_phone OUT NOCOPY VARCHAR2,
153 x_formatted_address OUT NOCOPY VARCHAR2,
154 p_act_cont_role_id IN VARCHAR2,
155 x_act_contact_roles OUT NOCOPY VARCHAR2,
156 p_primary_phone_contact_pt_id IN NUMBER,
157 x_has_contact_restriction OUT NOCOPY VARCHAR2,
158 p_relationship_type_id IN NUMBER,
159 p_relationship_group_code IN VARCHAR2,
160 x_is_in_relationship_group OUT NOCOPY VARCHAR2,
161 p_cust_acct_id IN VARCHAR2,
162 x_billto_address OUT NOCOPY VARCHAR2,
163 p_cust_acct_site_id IN VARCHAR2
164 );
165
166
167 END HZ_UI_UTIL_PKG;