DBA Data[Home] [Help]

PACKAGE: APPS.OKC_REP_SEARCH_UTIL_PVT

Source


1 PACKAGE OKC_REP_SEARCH_UTIL_PVT AS
2 /* $Header: OKCVREPSRCHUTILS.pls 120.0.12010000.2 2008/11/26 10:26:02 strivedi noship $ */
3 
4   ------------------------------------------------------------------------------
5     -- GLOBAL CONSTANTS
6   ------------------------------------------------------------------------------
7 
8   G_PKG_NAME                   CONSTANT   VARCHAR2(200) := 'OKC_REP_SEARCH_UTIL_PVT';
9   G_APP_NAME                   CONSTANT   VARCHAR2(3)   := 'OKC';
10   G_MODULE                     CONSTANT   VARCHAR2(250) := 'okc.plsql.'||G_PKG_NAME||'.';
11 
12 
13 
14 
15   ------------------------------------------------------------------------------
16     -- PROCEDURES AND FUNCTIONS
17   ------------------------------------------------------------------------------
18 
19     -- API name     : get_rep_doc_acl
20     -- Type         : Private.
21     -- Function     : Called in the BusDocSearchPlugIn class by the AppSearch
22     --                Framework at crawl-time to get the ACL list for the given
23     --                contract document (for repository contracts) or for the
24     --                given contract document and version (for archived
25     --                contracts). The list of ACLs is then indexed with the
26     --                document to be used at query-time to determine whether
27     --                a user has access to the document.
28     -- Pre-reqs     : None.
29     -- Parameters   :
30     --   IN         : p_bus_doc_id IN NUMBER
31     --                   The document ID of the contract document currently
32     --                   being crawled.
33     --   IN         : p_bus_doc_version IN NUMBER
34     --                   The version of the contract document currently being
35     --                   crawled.
36     --   IN           p_driving_table IN VARCHAR2
37     --                   The table that drives the VO associated with the
38     --                   contract document currently being crawled. There are
39     --                   two possible values: 'okc_rep_contracts_all' (for
40     --                   repository contracts) and 'okc_rep_contract_vers'
41     --                   (for archived contracts).
42     --   OUT        : x_acl OUT VARCHAR2
43     --                   A space-delimited string of ACL keys that define
44     --                   access to this document.
45     --                   Example:  g32324 g4434 u88932 u72223 admin_acl o23452
46     -- Note         :
47    PROCEDURE get_rep_doc_acl
48      ( p_bus_doc_id IN NUMBER,
49        p_bus_doc_version IN NUMBER,
50        p_driving_table IN VARCHAR2,
51        x_acl OUT NOCOPY VARCHAR2);
52 
53     -- API name     : get_current_user_acl_keys
54     -- Type         : Private.
55     -- Function     : Called in the BusDocSearchPlugIn class by the AppSearch
56     --                Framework at query-time to get the ACL keys for the
57     --                current user. This list of ACL keys is then used to
58     --                check each search hit and verify that the user is
59     --                permitted to view that specific hit. If a user is
60     --                not permitted to view a given hit, then that hit is
61     --                removed from the query result set.
62     -- Pre-reqs     : None.
63     -- Parameters   :
64     --   IN         : None.
65     --   OUT        : x_keys  OUT VARCHAR2
66     --                   A space-delimited string of ACL keys that define
67     --                   the user's access rights.
68     --                   Example:  no_acl o23452 u23452 g2241 g2308
69     -- Note         :
70    PROCEDURE get_current_user_acl_keys
71      ( x_keys OUT NOCOPY VARCHAR2);
72 
73     -- API name     : get_current_user_moac_keys
74     -- Type         : Private.
75     -- Function     : Called in the BusDocSearchPlugIn class by the AppSearch
76     --                Framework at query-time to get the list of operating
77     --                units that the current user may access. This list of
78     --                operating unit IDs is then used to check each search hit
79     --                and verify that the user is permitted to view that
80     --                specific hit. If a user is not permitted to view a given
81     --                hit, then that hit is removed from the query result set.
82     -- Pre-reqs     : None.
83     -- Parameters   :
84     --   IN         : None.
85     --   OUT        : x_keys  OUT VARCHAR2
86     --                   A space-delimited string of the IDs of the operating
87     --                   units to which the current user has access.
88     --                   Example:  134 325 4384
89     -- Note         :
90    PROCEDURE get_current_user_moac_keys
91      ( x_keys OUT NOCOPY VARCHAR2);
92 
93     -- API name     : get_intent_profile_keys
94     -- Type         : Private.
95     -- Function     : Called in the BusDocSearchPlugIn class by the AppSearch
96     --                Framework at query-time to get the list of intent codes
97     --                that represent the types of contracts (e.g. Buy, Sell)
98     --                that the current user may access. This list of
99     --                intent codes is then used to check each search hit
100     --                and verify that the user is permitted to view that
101     --                specific hit. If a user is not permitted to view a given
102     --                hit, then that hit is removed from the query result set.
103     -- Pre-reqs     : None.
104     -- Parameters   :
105     --   IN         : None.
106     --   OUT        : x_keys  OUT VARCHAR2
107     --                   A string of single-character intent codes that
108     --                   represent the types of contracts (e.g. Buy, Sell) to
109     --                   which the current user has access. This string is
110     --                   parse into another string containing the single
111     --                   characters separated by spaces in the BusDocSearchPlugIn
112     --                   class (e.g. "SA" -> "S A").
113     --                   Example:  BA
114     --                   Example:  BSOA
115     -- Note         :
116    PROCEDURE get_intent_profile_keys
117      ( x_keys OUT NOCOPY VARCHAR2);
118 
119     -- API name     : get_current_user_quote_access
120     -- Type         : Private.
121     -- Function     : Called in the BusDocSearchPlugIn class in the
122     --                queryPostProcess() method at query-time to discover the
123     --                current user's level of access for a given Sales Quote
124     --                document. The possible return values are UPDATE, READ,
125     --                and NONE. If a user is not permitted to view a given
126     --                quote (meaning that this procedure returns NONE), then
127     --                that quote document is removed from the query result set.
128     -- Pre-reqs     : None.
129     -- Parameters   :
130     --   IN         : p_quote_number  IN NUMBER
131     --                   The ID number of the sales quote document
132     --                   currently being processed.
133     --   OUT        : x_access  OUT VARCHAR2
134     --                   A string that represents the current user's level of
135     --                   access for the given Sales Quote document.
136     -- Note         :
137    PROCEDURE get_current_user_quote_access
138      ( p_quote_number IN NUMBER,
139        x_access OUT NOCOPY VARCHAR2);
140 
141     -- API name     : get_local_language_attributes
142     -- Type         : Private.
143     -- Function     : Called in the BusDocSearchPlugIn class in the
144     --                queryPostProcess() method at query-time to fetch
145     --                three language-dependent attributes: document type,
146     --                intent, and status. The local language values of
147     --                these three attributes are returned in a space-
148     --                delimited string in the order docType, intent, status.
149     -- Parameters   :
150     --   IN         : p_doc_type_code IN NUMBER
151     --                   The document type code of the contract document
152     --                   currently being processed by queryPostProcess().
153     --   IN         : p_intent_code IN NUMBER
154     --                   The intent code of the contract document currently
155     --                   being processed by queryPostProcess().
156     --   IN         : p_status_code IN NUMBER
157     --                   The status code of the contract document currently
158     --                   being processed by queryPostProcess().
159     --   OUT        : x_attrs  OUT VARCHAR2
160     --                   A string containing three sub-strings separated by
161     --                   spaces. These three sub-strings represent the
162     --                   local-language vlue of document type, intent,
163     --                   and status.
164     -- Note         :
165    PROCEDURE get_local_language_attributes
166      ( p_doc_type_code IN VARCHAR,
167        p_intent_code IN VARCHAR,
168        p_status_code IN VARCHAR,
169        x_attrs OUT NOCOPY VARCHAR2);
170 
171 
175     -- Function     : This function fetches the party names for a given
172 
173     -- API name     : get_rep_parties
174     -- Type         : Private.
176     --                repository contract. It is called in the SQL statements
177     --                of RepHeaderSearchExpVO and RepArchiveSearchExpVO in the
178     --                oracle.apps.okc.repository.search.server package.
179     -- Pre-reqs     : None.
180     -- Parameters   :
181     --   IN         : p_contract_id IN NUMBER
182     --                   The contract ID of the contract document currently
183     --                   being crawled.
184     --   OUT        : x_parties OUT VARCHAR2
185     --                   A string of party names that define
186     --                   the parties of this repository contract. The party
187     --                   names are separated by spaces.
188     --                   Example:  Vision, Inc. AT&T Informologics
189     -- Note         :
190    FUNCTION get_rep_parties(
191         p_contract_id IN NUMBER
192      ) RETURN VARCHAR2;
193 
194 
195     -- API name      : get_terms_last_update_date.
196     -- Type          : Private.
197     -- Function      : This function returns the last_update_date value of the the business
198     --                document's contract terms.
199     -- Pre-reqs      : None.
200     -- Parameters    :
201     -- IN            : p_document_type       IN VARCHAR2       Required
202     --                   Type of the document that is being checked
203     --               : p_document_id       IN VARCHAR2       Required
204     --                   Id of the document that is being checked
205     -- OUT           : Returns the last_update_date value of the the business
206     --                 document's contract terms.
207    FUNCTION get_terms_last_update_date(
208       p_document_type IN  VARCHAR2,
209       p_document_id   IN  NUMBER
210     ) RETURN DATE;
211 
212 
213 
214 
215     -- API name      : draft_attachment_exists.
216     -- Type          : Private.
217     -- Function      : This function returns Y if the generated draft attachment exists for
218     --                the business document passed as input. It will also check that
219     --                attachment's last_update_date is later than the business document's
220     --                Term's last_update_date.
221     -- Pre-reqs      : None.
222     -- Parameters    :
223     -- IN            : p_document_type       IN VARCHAR2       Required
224     --                   Type of the document that is being checked
225     --               : p_document_id       IN VARCHAR2       Required
226     --                   Id of the document that is being checked
227     -- OUT           : Return Y if the latest generated draft attachment exists for the
228     --                business document, else returns N
229    FUNCTION draft_attachment_exists(
230       p_document_type IN  VARCHAR2,
231       p_document_id   IN  NUMBER
232     ) RETURN VARCHAR2;
233 
234 
235 
236 
237    -- API name      : is_contract_status_draft.
238    -- Type          : Private.
239    -- Function      : This function returns Y if the business document status is
240    --                 draft.
241    -- Pre-reqs      : None.
242    -- Parameters    :
243    -- IN            : p_document_type       IN VARCHAR2       Required
244    --                   Type of the document that is being checked
245    --               : p_document_id       IN VARCHAR2       Required
246    --                   Id of the document that is being checked
247    -- OUT           : Returns Y if the business document status is
248    --                draft, else returns N
249    FUNCTION is_contract_status_draft(
250        p_document_type IN  VARCHAR2,
251        p_document_id   IN  NUMBER
252      ) RETURN VARCHAR2;
253 
254 
255 
256 /*    -- API name   : get_neg_parties
257     -- Type         : Private.
258     -- Function     : This function fetches the party names for a given
259     --                negotiation contract. It is called in the SQL statements
260     --                of NegSearchExpVO.xml in the
261     --                oracle.apps.okc.repository.search.server package.
262     -- Pre-reqs     : None.
263     -- Parameters   :
264     --   IN         : p_auction_header_id IN NUMBER
265     --                   The auction header ID of the contract document currently
266     --                   being crawled.
267     --   OUT        : x_parties OUT VARCHAR2
268     --                   A string of party names that define
269     --                   the parties of this negotiation contract. The party
270     --                   names are separated by spaces.
271     --                   Example:  Vision, Inc. AT&T Informologics
272     -- Note         :    */
273    FUNCTION get_neg_parties(
274         p_auction_header_id IN NUMBER
275      ) RETURN VARCHAR2;
276 
277 
278 
279 
280 
281  END OKC_REP_SEARCH_UTIL_PVT;