DBA Data[Home] [Help]

PACKAGE: APPS.BIS_DELEGATION_PUB

Source


1 PACKAGE BIS_DELEGATION_PUB AS
2 /* $Header: BISPDLGS.pls 120.0 2005/07/21 23:19:31 appldev noship $ */
3 -- dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=pls \
4 -- dbdrv: checkfile(115.0=120.0):~PROD:~PATH:~FILE
5 
6 /*
7 REM +=======================================================================+
8 REM |    Copyright (c) 1998 Oracle Corporation, Redwood Shores, CA, USA     |
9 REM |                         All rights reserved.                          |
10 REM +=======================================================================+
11 REM | FILENAME                                                              |
12 REM |     BISVPARS.pls                                                      |
13 REM |                                                                       |
14 REM | DESCRIPTION                                                           |
15 REM |     This is the Delegation API Pkg. for PMV.                          |
16 REM |                                                                       |
17 REM | HISTORY                                                               |
18 REM | jrhyde   06/25/05    Created   Enh 4325431                            |
19 REM |                                                                       |
20 REM +=======================================================================+
21 */
22 
23   PROCEDURE grant_delegation
24     ( p_delegate_type                IN VARCHAR2
25      ,p_grantee_key                  IN VARCHAR2
26      ,p_instance_pk1_value           IN VARCHAR2
27      ,p_instance_pk2_value           IN VARCHAR2 DEFAULT NULL
28      ,p_instance_pk3_value           IN VARCHAR2 DEFAULT NULL
29      ,p_instance_pk4_value           IN VARCHAR2 DEFAULT NULL
30      ,p_instance_pk5_value           IN VARCHAR2 DEFAULT NULL
31      ,p_start_date                   IN DATE DEFAULT NULL
32      ,p_end_date                     IN DATE DEFAULT NULL
33      ,p_menu_name                    IN VARCHAR2
34      ,x_grant_guid                   OUT NOCOPY RAW /*fnd_grants pk*/
35      ,x_success                      OUT NOCOPY VARCHAR /* Boolean */
36      ,x_errorcode                    OUT NOCOPY VARCHAR2
37     );
38  -- Start of comments
39     -- API name  : Grant_Delegate_Function
40     -- TYPE      : Public
41     -- Pre-reqs  : None
42     -- FUNCTION  : Grant delegate access to function
43     --             Validates all parameters
44     --             If a row already exists attempts to update the row with the
45     --             new date range
46     --
47     -- Exceptions:
48     --
49     --  INVALID_DATES
50     --             Date Rules are:
51     --             1. - Start Date <= End Date
52     --             2. - Start Date and hence End Date >= TRUNC(sysdate)
53     --             NOTE:
54     --             - Start Date Defaulted to NULL evaluates to TRUNC(SYSDATE)
55     --             - End Date defaulted to NULL evaluates to "End of Time"
56     --             also see notes on parameters p_start_date and p_end_date
57     --
58     -- INVALID_DELEGATE_TYPE
59     --             see notes on parameter p_delegate_type below
60     --
61     -- INVALID_FND_OBJECT
62     --             fnd_object record associated with delegate type does not
63     --             exist
64     --             or the object defined in fnd_objects used to do validate
65     --             the grantee parameter does not function
66     --
67     -- INVALID_GRANTEE
68     --             see notes on parameter p_grantee_key below
69     --
70     -- INVALID_INSTANCE
71     --             see notes on parameter p_instance_pk[1..5]_value below
72     --
73     -- INVALID_MENU_NAME
74     --             see notes on parameter p_menu_name below
75     --
76     -- Parameters:
77     --     IN    : p_delegate_type      IN  VARCHAR2 (required)
78     --             Determines the type of delegation
79     --             Defines:
80     --                    GRANTEE_TYPE
81     --                    OBJECT_TYPE
82     --                    OBJECT_ID
83     --                    INSTANCE_TYPE
84     --             Currently supported type:
85     --                     HRI_PER_USRDR_H -> Manager delegation
86     --
87     --             p_grantee_key         IN  VARCHAR2 (required)
88     --                 User or group that gets the grant,
89     --                 from FND_USER or another table that the view
90     --                 WF_ROLES is based on.
91     --
92     --             p_instance_pk[1..5]_value       IN  NUMBER (optional)
93     --                 These are the primary keys of the object instance
94     --                 granted.  The order of the PKs must match the order
95     --                 they were defined in FND_OBJECTS.  NULLs should
96     --                 be passed for the higher numbered args with no PKs.
97     --
98     --             p_start_date (Defaulted to sysdate)
99     --                  Start date of grant must be >= sysdate
100     --
101     --             p_end_date (Defaulted to NULL -> End of time)
102     --                  End date of grant must be > sysdate
103     --
104     --             p_menu_name        IN  VARCHAR2 (required)
105     --                 menu to be granted
106     --
107     --
108     --     OUT  :
109     --             x_grant_guid  OUT NOCOPY RAW
110     --                If x_sucess = 'T' then this will return the
111     --                fnd_grant row PK -> grant_guid
112     --
113     --             X_success    OUT VARCHAR(1)
114     --               'T' if everything worked correctly
115     --               'F' if there was a failure.  If FALSE
116     --                is returned, there will either be an error
117     --                message on the FND_MESSAGE stack which
118     --                can be retrieved with FND_MESSAGE.GET_ENCODED(),
119     --                or there will be a PL/SQL exception raised.
120     --
121     --             X_ErrorCode        OUT VARCHAR2(200)
122     --                RETURN value OF the errorcode
123     --                check only if x_success = F.
124     --
125     -- Version: Current Version 1.0
126     -- Previous Version :  None
127     -- Notes  :
128     --
129     -- END OF comments
130   PROCEDURE revoke_delegation
131     ( p_delegate_type                IN VARCHAR2
132      ,p_grantee_key                  IN VARCHAR2 DEFAULT NULL
133      ,p_instance_pk1_value           IN VARCHAR2
134      ,p_instance_pk2_value           IN VARCHAR2 DEFAULT NULL
135      ,p_instance_pk3_value           IN VARCHAR2 DEFAULT NULL
136      ,p_instance_pk4_value           IN VARCHAR2 DEFAULT NULL
137      ,p_instance_pk5_value           IN VARCHAR2 DEFAULT NULL
138      ,p_start_date                   IN DATE DEFAULT NULL
139      ,p_end_date                     IN DATE DEFAULT NULL
140      ,p_menu_name                    IN VARCHAR2 DEFAULT NULL
141      ,x_success                      OUT NOCOPY VARCHAR /* Boolean */
142      ,x_errorcode                    OUT NOCOPY VARCHAR2
143     );
144  -- Start OF comments
145     -- API name  : Revoke_Delegate_Function
146     -- TYPE      : Public
147     -- Pre-reqs  : None
148     -- FUNCTION  : Revokes delegations that start and/or end in the window
149     --             defined by the parameters:
150     --                 - p_start_date
151     --                 - p_end_date
152     --             Revoke means:
153     --                End Dating the delegation record if the record has
154     --                 commenced prior to the window.
155     --                Deleted if the delegation record starts within the window
156     --             By default window starts on Sysdate and Ends at EOT
157     --             Start Date is the date used to end date the records.
158     --             Many parameters can be left undefined as 'wild cards'.
159     --             If a parameter is undefined all values for that parameter
160     --             will revoked that match the remaining paramaters
161     --
162     -- Exceptions:
163     --
164     --  INVALID_DATES
165     --             Date Rules are:
166     --             1. - Start Date <= End Date
167     --             2. - Start Date and hence End Date >= TRUNC(sysdate)
168     --             NOTE:
169     --             - Start Date can be NULL to mean revoke "as of now" evaluated
170     --               as SYSDATE in validations
171     --             - End Date can be NULL to mean revoke everything from start
172     --               date to "end of time", evaluated in validations as
173     --               "End of Time"
174     --             also see notes on parameters p_start_date and p_end_date
175     --
176     -- INVALID_DELEGATE_TYPE
177     --             see notes on parameter p_delegate_type below
178     --
179     -- INVALID_FND_OBJECT
180     --             fnd_object record associated with delegate type does not
181     --             exist
182     --             or the object defined in fnd_objects used to do validate
183     --             the grantee parameter does not function
184     --
185     -- INVALID_GRANTEE
186     --             see notes on parameter p_grantee_key below
187     --
188     -- INVALID_INSTANCE
189     --             see notes on parameter p_instance_pk[1..5]_value below
190     --
191     -- INVALID_MENU_NAME
192     --             see notes on parameter p_menu_name below
193     --
194     -- Parameters:
195     --     IN    : p_delegate_type      IN  VARCHAR2 (required)
196     --             Determines the type of delegation
197     --             Defines:
198     --                    GRANTEE_TYPE
199     --                    OBJECT_TYPE
200     --                    OBJECT_ID
201     --                    INSTANCE_TYPE
202     --             Currently supported type:
203     --                     HRI_PER_USRDR_H -> Manager delegation
204     --
205     --             p_grantee_key         IN  VARCHAR2 (required)
206     --                 User or group that gets the grant,
207     --                 from FND_USER or another table that the view
208     --                 WF_ROLES is based on.
209     --                 If not defined all grantees for the combination will be
210     --                 revoked
211     --
212     --             p_instance_pk[1..5]_value       IN  VARCHAR2 (optional)
213     --                 These are the primary keys of the object instance
214     --                 granted.  The order of the PKs must match the order
215     --                 they were defined in FND_OBJECTS.  NULLs should
216     --                 be passed for the higher numbered args with no PKs.
217     --                 These must match the object corresponding to the
218     --                 delegate_type.
219     --                 If not defined all instances for the combination will be
220     --                 revoked.
221     --
222     --             p_start_date             IN DATE (optional)
223     --                 Default = TRUNC(SYSDATE)
224     --                 Start date used to define start date of window within
225     --                 which grants will revoked.
226     --                 Defines the date to which records are truncated.
227     --
228     --             p_end_date             IN DATE (optional)
229     --                 Default = End of time
230     --                 End date used to define end date of window within which
231     --                 grants will be revoked.
232     --
233     --             p_menu_name        IN  VARCHAR2 (optional)
234     --                 menu to be revoked
235     --                 If not defined all menus for the combination will be
236     --                 revoked
237     --
238     --     OUT  :
239     --             X_success    OUT VARCHAR(1)
240     --               'T' if everything worked correctly
241     --               'F' if there was a failure.  If FALSE
242     --                is returned, there will either be an error
243     --                message on the FND_MESSAGE stack which
244     --                can be retrieved with FND_MESSAGE.GET_ENCODED(),
245     --                or there will be a PL/SQL exception raised.
246     --
247     --             X_ErrorCode        OUT VARCHAR(200)
248     --                RETURN value OF the errorcode
249     --                check only if x_success = F.
250     --
251     --
252     -- Version: Current Version 1.0
253     -- Previous Version :  None
254     -- Notes  :
255     --
256     -- END OF comments
257 END BIS_DELEGATION_PUB; -- Package spec