1 PACKAGE IBE_DSPMGRVALIDATION_GRP AUTHID CURRENT_USER AS
2 /* $Header: IBEGDVDS.pls 115.2 2002/08/15 17:25:59 jshang ship $ */
3
4
5 g_api_version CONSTANT NUMBER := 1.0;
6 g_pkg_name CONSTANT VARCHAR2(30):='IBE_DSPMGRVALIDATION_GRP';
7
8 context_accname_req_exception EXCEPTION;
9 context_req_exception EXCEPTION;
10 category_req_exception EXCEPTION;
11 template_req_exception EXCEPTION;
12 lglctnt_id_req_exception EXCEPTION;
13 msite_req_exception EXCEPTION;
14 physmap_not_exists_exception EXCEPTION;
15
16 -----------------------------------------------------------------
17 -- NOTES
18 -- 1. Returns true if the deliverable id exists
19 -- 2. If object version number is passed, then the deliverable id
20 -- with object version number is checked for existence
21 -- 3. If deliverable id in both cases if not found
22 -- message IBE_DSP_DLV_NOT_EXISTS is pushed on the stack
23 ---------------------------------------------------------------------
24 FUNCTION check_deliverable_exists(
25 p_deliverable_id IN NUMBER,
26 p_object_version_number IN NUMBER := FND_API.G_MISS_NUM)
27 RETURN boolean;
28
29 -----------------------------------------------------------------
30 -- NOTES
31 -- 1. Returns true if the deliverable with type matches
32 -- valid types are TEMPLATE/MEDIA
33 --- 2. applicable to ,is used if passed
34 -- 3. If not found ,returns false and message IBE_DSP_DLV_TYPE_NOT_EXISTS
35 -- is pushed onto the stack
36 ---------------------------------------------------------------------
37 FUNCTION check_deliverable_type_exists(
38 p_deliverable_id IN NUMBER,
39 p_item_type IN VARCHAR2,
40 p_applicable_to IN VARCHAR2 := FND_API.g_miss_char)
41 RETURN boolean;
42
43 -----------------------------------------------------------------
44 -- NOTES
45 -- 1. Returns true if the object id with the right type does exist
46 ---------------------------------------------------------------------
47 FUNCTION check_lgl_object_exists(
48 p_object_type IN VARCHAR2,
49 p_object_id IN NUMBER )
50 RETURN boolean;
51
52 -----------------------------------------------------------------
53 -- NOTES
54 -- 1. Returns true if the logical content id exists
55 -- 2. If object version number is passed, then the logical content id
56 -- with object version number is checked for existence
57 -- 3. If logical content id in both cases is not found
58 -- message IBE_DSP_LGL_CTNT_ID_NOT_EXISTS is pushed on the stack
59 ---------------------------------------------------------------------
60 FUNCTION check_lgl_ctnt_id_exists(
61 p_lgl_ctnt_id IN NUMBER,
62 p_object_version_number IN NUMBER := FND_API.G_MISS_NUM )
63 RETURN boolean;
64
65 -----------------------------------------------------------------
66 -- NOTES
67 -- 1. Returns false if there is no association for a
68 -- deliverable id/ category id in IBE_DSP_TPL_CTG
69 -- 2. No message is pushed on the stack
70 ---------------------------------------------------------------------
71 FUNCTION check_ctg_tpl_relation_exists(
72 p_category_id IN NUMBER,
73 p_template_id IN NUMBER)
74 RETURN boolean;
75
76 -----------------------------------------------------------------
77 -- NOTES
78 -- 1. Returns true if the category id does exist
79 -- 2. Return false, if the category id does not exist,
80 -- IBE_DSP_CATEGORY_NOT_EXISTS is pushed on the stack
81 ---------------------------------------------------------------------
82 FUNCTION check_category_exists(p_category_id IN NUMBER)
83 RETURN boolean;
84
85 -----------------------------------------------------------------
86 -- NOTES
87 -- 1. Returns true if the item id does exist
88 -- 2. Return false, if the item id does not exist,
89 -- IBE_DSP_ITEM_NOT_EXISTS is pushed on the stack
90 ---------------------------------------------------------------------
91 FUNCTION check_item_exists(p_item_id IN NUMBER)
92 RETURN boolean;
93
94 -----------------------------------------------------------------
95 -- NOTES
96 -- 1. Returns true if the section id does exist
97 -- 2. Return false, if the section id does not exist,
98 -- IBE_DSP_SECTION_NOT_EXISTS is pushed on the stack
99 ---------------------------------------------------------------------
100 FUNCTION check_section_exists(p_section_id IN NUMBER)
101 RETURN boolean;
102
103 -----------------------------------------------------------------
104 -- NOTES
105 -- 1. Returns true if the section id does exist
106 -- 2. Return false, if the section id does not exist,
107 -- IBE_MSITE_RSECID_INVLD is pushed on the stack
108 ---------------------------------------------------------------------
109 FUNCTION check_root_section_exists(p_root_section_id IN NUMBER)
110 RETURN boolean;
111
112 -----------------------------------------------------------------
113 -- NOTES
114 -- 1. Returns true if the context id with the context type exists
115 -- 2. Object version number is used if it is not FND_API.G_MISS_NUM
116 -- 3. If the context_id is passed does not exist, an exception is
117 -- raised , and IBE_DSP_CONTEXT_NOT_EXISTS is pushed on the
118 -- message stack
119 ---------------------------------------------------------------------
120 FUNCTION check_context_exists(
121 p_context_id IN NUMBER,
122 p_context_type IN VARCHAR2,
123 p_object_version_number IN NUMBER := FND_API.G_MISS_NUM)
124 RETURN boolean;
125
126 -----------------------------------------------------------------
127 -- NOTES
128 -- 1. Returns false if the context accessname is not being used
129 -- 2. If the context_id is passed, then the access name being
130 -- used is checked against access names other than the context
131 -- id passed
132 -- 3. If the context access name is being used, then it returns true
133 -- and IBE_DSP_CONTEXT_ACCNAME_EXISTS is pushed on the
134 -- message stack
135 ---------------------------------------------------------------------
136 FUNCTION check_context_accessname(
137 p_context_accessname IN VARCHAR2,
138 p_context_type IN VARCHAR2,
139 p_context_id IN NUMBER := FND_API.G_MISS_NUM)
140 RETURN boolean;
141
142 -----------------------------------------------------------------
143 -- NOTES
144 -- 1. Returns true if the context type is valid (TEMPLATE/MEDIA)
145 -- 2. FND_LOOKUP used for context type is JTF_AMV_DELV_TYPE_CODE
146 -- 3. If the context type passed is not valid, an exception is
147 -- raised , and IBE_DSP_CONTEXT_TYPE_INVALID is pushed on the
148 -- message stack
149 ---------------------------------------------------------------------
150 FUNCTION check_valid_context_type(p_context_type IN VARCHAR2)
151 RETURN boolean;
152
153 -----------------------------------------------------------------
154 -- NOTES
155 -- 1. Returns the context type code for a given context id
156 -- 2. If the context_id is passed does not exist, null is returned
157 -- , and IBE_DSP_CONTEXT_NOT_EXISTS is pushed on the
158 -- message stack
159 ---------------------------------------------------------------------
160 FUNCTION check_context_type_code(p_context_id IN NUMBER)
161 RETURN VARCHAR2;
162
163 -----------------------------------------------------------------
164 -- NOTES
165 -- 1. Returns true if the object type is valid (S/I/C)
166 -- 2. FND_LOOKUP used for object type is
167 -- 3. If the object type passed is not valid, an exception is
168 -- raised , and IBE_DSP_OBJECT_TYPE_INVALID is pushed on the
169 -- message stack
170 ---------------------------------------------------------------------
171 FUNCTION check_valid_object_type(p_object_type_code in VARCHAR2)
172 RETURN boolean;
173
174
175 FUNCTION check_item_deliverable(p_item_id IN NUMBER,
176 p_deliverable_id IN NUMBER)
177 RETURN boolean;
178
179 FUNCTION check_category_deliverable(p_category_id IN NUMBER,
180 p_deliverable_id IN NUMBER)
181 RETURN Boolean;
182
183 FUNCTION check_master_msite_exists
184 RETURN NUMBER;
185
186 -----------------------------------------------------------------
187 -- NOTES
188 -- 1. Returns true if the attachment id exists
189 -- 2. Object version number is used if it is not FND_API.G_MISS_NUM
190 -- 3. Return false, if the attachment id does not exist,
191 -- IBE_DSP_ATH_NOT_EXISTS is pushed on the stack
192 ---------------------------------------------------------------------
193 FUNCTION check_attachment_exists(
194 p_attachment_id IN NUMBER,
195 p_object_version_number IN NUMBER := FND_API.G_MISS_NUM)
196 RETURN boolean;
197
198 -----------------------------------------------------------------
199 -- NOTES
200 -- 1. Return attachment_id if the attachment with the same file name exists
201 -- 2. Otherwise return null
202 ---------------------------------------------------------------------
203 FUNCTION check_attachment_exists(
204 p_file_name IN VARCHAR2)
205 RETURN NUMBER;
206
207 -----------------------------------------------------------------
208 -- NOTES
209 -- 1. Return attachment_id if the attachment with the same file name
210 -- and file id exists and belongs to the deliverable
211 -- 2. Otherwise return null
212 -- Added by G. Zhang 05/23/01 10:57AM
213 ---------------------------------------------------------------------
214 FUNCTION check_attachment_exists(
215 p_deliverable_id IN NUMBER,
216 p_file_id IN NUMBER,
217 p_file_name IN VARCHAR2)
218 RETURN NUMBER;
219
220 -----------------------------------------------------------------
221 -- NOTES
222 -- 1. Returns deliverable id for a attachment
223 -- 2. If deliverable id or attachment id not exists , return null
224 -- 3. Message IBE_DSP_ATH_NOT_EXISTS is pushed on the stack
225 ---------------------------------------------------------------------
226 FUNCTION check_attachment_deliverable(p_attachment_id IN NUMBER)
227 RETURN NUMBER;
228
229 -----------------------------------------------------------------
230 -- NOTES
231 -- 1. Return true if the attachment belongs to the deliverable
232 -- 2. Otherwise, return false; Message JTG_DSP_DLV_ATH_INVLD is
233 -- pushed on the stack
234 ---------------------------------------------------------------------
235 FUNCTION check_attachment_deliverable(
236 p_attachment_id IN NUMBER,
237 p_deliverable_id IN NUMBER)
238 RETURN BOOLEAN;
239
240 -----------------------------------------------------------------
241 -- NOTES
242 -- 1. Return true if the attachment has all-site and all-language mapping
243 -- 2. Return false otherwise
244 ---------------------------------------------------------------------
245 FUNCTION check_default_attachment(
246 p_attachment_id IN NUMBER)
247 RETURN BOOLEAN;
248
249 -----------------------------------------------------------------
250 -- NOTES
251 -- 1. Returns true if the filename associated with the attachment
252 -- is not null and unique
253 -- 2. If file name is null or missing message IBE_DSP_ATH_FILENAME_REQ
254 -- is pushed on the stack
255 -- 3. If file name already exists , message IBE_DSP_ATH_FILENAME_EXISTS
256 -- is pushed on the stack
257 ---------------------------------------------------------------------
258 FUNCTION check_attachment_filename(p_attachment_id IN NUMBER,
259 p_file_name IN varchar2)
260 RETURN boolean;
261
262 -----------------------------------------------------------------
263 -- NOTES
264 -- 1. Returns true if the minisite exists
265 -- 2. If not, message IBE_MSITE_NOT_EXISTS is pushed on the stack
266 ---------------------------------------------------------------------
267 FUNCTION check_msite_exists(
268 p_msite_id IN NUMBER,
269 p_object_version_number IN NUMBER := FND_API.G_MISS_NUM)
270 RETURN boolean;
271
272 -----------------------------------------------------------------
273 -- NOTES
274 -- 1. Returns true if the language is supported by the minisite
275 -- 2. If not, message IBE_MSITE_LANG_NOT_SUPPORTED
276 -- is pushed on the stack
277 ---------------------------------------------------------------------
278 FUNCTION check_language_supported(
279 p_msite_id IN NUMBER,
280 p_language_code in varchar2 )
281 RETURN boolean;
282
283 -----------------------------------------------------------------
284 -- NOTES
285 -- 1. Returns true if lgl_phys_map_id (IBE_DSP_LGL_PHYS_MAP) exists
286 -- 2. If not , message IBE_DSP_PHYSMAP_NOT_EXISTS is pushed on the stack
287 ---------------------------------------------------------------------
288 FUNCTION check_physicalmap_exists( p_lgl_phys_map_id IN NUMBER )
289 RETURN boolean;
290
291 -----------------------------------------------------------------
292 -- NOTES
293 -- 1. Returns true if the deliverable with accessname exists and
294 -- is not null and unique
295 -- 2. If access name is null, message IBE_DSP_DLV_ACCNAME_REQ
296 -- is pushed on the stack
297 -- 3. If access name already exists , message IBE_DSP_DLV_ACCNAME_EXISTS
298 -- is pushed on the stack
299 ---------------------------------------------------------------------
300 FUNCTION check_deliverable_accessname(
301 p_deliverable_id IN NUMBER,
302 p_access_name IN varchar2)
303 RETURN boolean;
304
305 ---------------------------------------------------------------------
306 -- NOTES
307 -- 1. Returns TRUE if the access_name for a mini site is Unique.
308 -- 2. If Access Name already exists, message IBE_MSITE_DUP_ACCNAME is pushed on stack.
309 ---------------------------------------------------------------------
310 FUNCTION Check_Msite_Accessname(p_access_name IN VARCHAR2)
311 RETURN BOOLEAN ;
312
313 ---------------------------------------------------------------------
314 -- NOTES
318 -- jmes package. enhancement 2317704 is logged for this.
315 -- 1. This function is added to do validation before calling
316 -- create_item and update_item procedure in jtf_amv_item_pub
317 -- 2. The old istore specific validation logic is removed from
319 -- 3. If the data is valid, return 0,
320 -- otherwise, -1
321 ---------------------------------------------------------------------
322 FUNCTION Check_Media_Object(p_operation IN VARCHAR2,
323 p_access_name IN VARCHAR2,
324 p_deliverable_type_code IN VARCHAR2,
325 p_applicable_to_code IN VARCHAR2)
326 RETURN NUMBER;
327
328
329 END IBE_DSPMGRVALIDATION_GRP;