23: l_ctxt VARCHAR2(60) := PKG_NAME||'ADD_PROPERTY';
24:
25: l_property_id NUMBER;
26: BEGIN
27: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
28:
29: --make sure a configuration instance is initialized, we don't need it but
30: --we need this as a security harness check.
31: IF NOT FND_OAM_DSCFG_INSTANCES_PKG.IS_INITIALIZED THEN
58: RETURNING PROPERTY_ID INTO l_property_id;
59:
60: x_property_id := l_property_id;
61:
62: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
63: EXCEPTION
64: WHEN NO_DATA_FOUND THEN
65: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
66: RAISE;
61:
62: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
63: EXCEPTION
64: WHEN NO_DATA_FOUND THEN
65: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
66: RAISE;
67: WHEN OTHERS THEN
68: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
69: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
64: WHEN NO_DATA_FOUND THEN
65: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
66: RAISE;
67: WHEN OTHERS THEN
68: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
69: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
70: RAISE;
71: END;
72:
65: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
66: RAISE;
67: WHEN OTHERS THEN
68: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
69: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
70: RAISE;
71: END;
72:
73: -- Public
175: IS
176: l_ctxt VARCHAR2(60) := PKG_NAME||'GET_PROPERTY_CANONICAL_VALUE';
177:
178: BEGIN
179: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
180:
181: SELECT canonical_value
182: INTO x_canonical_value
183: FROM fnd_oam_dscfg_properties
184: WHERE parent_type = p_parent_type
185: AND parent_id = p_parent_id
186: AND property_name = p_property_name;
187:
188: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
189: EXCEPTION
190: WHEN NO_DATA_FOUND THEN
191: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
192: RAISE;
187:
188: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
189: EXCEPTION
190: WHEN NO_DATA_FOUND THEN
191: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
192: RAISE;
193: WHEN TOO_MANY_ROWS THEN
194: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
195: RAISE;
190: WHEN NO_DATA_FOUND THEN
191: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
192: RAISE;
193: WHEN TOO_MANY_ROWS THEN
194: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
195: RAISE;
196: WHEN OTHERS THEN
197: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
198: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
193: WHEN TOO_MANY_ROWS THEN
194: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
195: RAISE;
196: WHEN OTHERS THEN
197: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
198: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
199: RAISE;
200: END;
201:
194: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
195: RAISE;
196: WHEN OTHERS THEN
197: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
198: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
199: RAISE;
200: END;
201:
202: -- Public
254: l_ctxt VARCHAR2(60) := PKG_NAME||'SET_OR_ADD_PROPERTY';
255:
256: l_property_id NUMBER;
257: BEGIN
258: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
259:
260: --make sure a configuration instance is initialized, we don't need it but
261: --we need this as a security harness check.
262: IF NOT FND_OAM_DSCFG_INSTANCES_PKG.IS_INITIALIZED THEN
292: p_canonical_value,
293: x_property_id);
294: END;
295:
296: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
297: EXCEPTION
298: WHEN NO_DATA_FOUND THEN
299: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
300: RAISE;
295:
296: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
297: EXCEPTION
298: WHEN NO_DATA_FOUND THEN
299: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
300: RAISE;
301: WHEN TOO_MANY_ROWS THEN
302: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
303: RAISE;
298: WHEN NO_DATA_FOUND THEN
299: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
300: RAISE;
301: WHEN TOO_MANY_ROWS THEN
302: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
303: RAISE;
304: WHEN OTHERS THEN
305: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
306: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
301: WHEN TOO_MANY_ROWS THEN
302: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
303: RAISE;
304: WHEN OTHERS THEN
305: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
306: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
307: RAISE;
308: END;
309:
302: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
303: RAISE;
304: WHEN OTHERS THEN
305: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
306: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
307: RAISE;
308: END;
309:
310: -- Public
362: IS
363: l_ctxt VARCHAR2(60) := PKG_NAME||'DELETE_PROPERTIES';
364:
365: BEGIN
366: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
367:
368: --just delete the property
369: DELETE FROM fnd_oam_dscfg_properties
370: WHERE parent_type = p_parent_type
368: --just delete the property
369: DELETE FROM fnd_oam_dscfg_properties
370: WHERE parent_type = p_parent_type
371: AND parent_id = p_parent_id;
372: fnd_oam_debug.log(1, l_ctxt, 'Deleted '||SQL%ROWCOUNT||' properties.');
373:
374: --success
375: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
376: RETURN TRUE;
371: AND parent_id = p_parent_id;
372: fnd_oam_debug.log(1, l_ctxt, 'Deleted '||SQL%ROWCOUNT||' properties.');
373:
374: --success
375: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
376: RETURN TRUE;
377: EXCEPTION
378: WHEN OTHERS THEN
379: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
375: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
376: RETURN TRUE;
377: EXCEPTION
378: WHEN OTHERS THEN
379: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
380: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
381: RETURN FALSE;
382: END;
383:
376: RETURN TRUE;
377: EXCEPTION
378: WHEN OTHERS THEN
379: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
380: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
381: RETURN FALSE;
382: END;
383:
384:
388: IS
389: l_ctxt VARCHAR2(60) := PKG_NAME||'DELETE_PROPERTY';
390:
391: BEGIN
392: fnd_oam_debug.log(2, l_ctxt, 'ENTER');
393:
394: --just delete the property
395: DELETE FROM fnd_oam_dscfg_properties
396: WHERE property_id = p_property_id;
395: DELETE FROM fnd_oam_dscfg_properties
396: WHERE property_id = p_property_id;
397:
398: --success
399: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
400: RETURN TRUE;
401: EXCEPTION
402: WHEN OTHERS THEN
403: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
399: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
400: RETURN TRUE;
401: EXCEPTION
402: WHEN OTHERS THEN
403: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
404: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
405: RETURN FALSE;
406: END;
407:
400: RETURN TRUE;
401: EXCEPTION
402: WHEN OTHERS THEN
403: fnd_oam_debug.log(6, l_ctxt, 'Unexpected Error: (Code('||SQLCODE||'), Message("'||SQLERRM||'"))');
404: fnd_oam_debug.log(2, l_ctxt, 'EXIT');
405: RETURN FALSE;
406: END;
407:
408: END FND_OAM_DSCFG_PROPERTIES_PKG;