DBA Data[Home] [Help]

APPS.FND_GFM dependencies on FND_GFM

Line 1: PACKAGE BODY fnd_gfm AS

1: PACKAGE BODY fnd_gfm AS
2: /* $Header: AFGFMB.pls 120.17.12010000.1 2008/07/25 14:15:26 appldev ship $ */
3:
4: -----------------------------------------------------------------------------
5: --global variable to indicate wether we are are in R12 env or 11i

Line 31: fnd_message.set_token('ROUTINE', 'FND_GFM.'||name);

27: */
28: PROCEDURE err_msg(name varchar2) is
29: begin
30: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
31: fnd_message.set_token('ROUTINE', 'FND_GFM.'||name);
32: fnd_message.set_token('ERRNO', SQLCODE);
33: fnd_message.set_token('REASON', SQLERRM);
34: end err_msg;
35: /*--------------------------------------------------------------------------*/

Line 56: fnd_gfm.err_msg('authenticate');

52: end if;
53: return FALSE;
54: exception
55: when others then
56: fnd_gfm.err_msg('authenticate');
57: raise;
58: end;
59: /*--------------------------------------------------------------------------*/
60: /*

Line 76: fnd_gfm.err_msg('authorize');

72:
73: return result;
74: exception
75: when others then
76: fnd_gfm.err_msg('authorize');
77: raise;
78: end;
79: /*--------------------------------------------------------------------------*/
80: /*

Line 101: access_id := fnd_gfm.authorize(file_id);

97: file_name varchar2(300);
98: export_mime varchar2(30);
99: ext_length number;
100: begin
101: access_id := fnd_gfm.authorize(file_id);
102:
103: /* Changed url structure to be gfmagent/fndgfm/fnd_gfm.get/arg1/arg2/fnd_gfm.ext
104: * to eliminate the dependancy on the desktop having the content/mime type set
105: * correctly. Now the file downloaded will have the correct extension so as long

Line 103: /* Changed url structure to be gfmagent/fndgfm/fnd_gfm.get/arg1/arg2/fnd_gfm.ext

99: ext_length number;
100: begin
101: access_id := fnd_gfm.authorize(file_id);
102:
103: /* Changed url structure to be gfmagent/fndgfm/fnd_gfm.get/arg1/arg2/fnd_gfm.ext
104: * to eliminate the dependancy on the desktop having the content/mime type set
105: * correctly. Now the file downloaded will have the correct extension so as long
106: * as the file ext is associated to an application it will open successfully/correctly.
107: * Temporarily hardcoding the most common export file types until a lookup can be created.

Line 137: file_name := 'fnd_gfm'||file_ext;

133: else
134: file_ext := '';
135: end if;
136:
137: file_name := 'fnd_gfm'||file_ext;
138: update fnd_lobs set fnd_lobs.expiration_date = sysdate + 0.5
139: where fnd_lobs.file_id = construct_download_url2.file_id;
140:
141: else

Line 151: file_name := 'fnd_gfm';

147: select substr(file_name,instr(file_name,'/',-1)+1) into file_name
148: from fnd_lobs
149: where file_id = construct_download_url2.file_id;
150: else
151: file_name := 'fnd_gfm';
152: end if;
153: end if;
154:
155: --check the release

Line 156: if (fnd_gfm.getRelease = 11) then

152: end if;
153: end if;
154:
155: --check the release
156: if (fnd_gfm.getRelease = 11) then
157: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;
158: else
159: -- we take all this trouble only if we are on R12
160: --construct the download URL

Line 157: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;

153: end if;
154:
155: --check the release
156: if (fnd_gfm.getRelease = 11) then
157: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;
158: else
159: -- we take all this trouble only if we are on R12
160: --construct the download URL
161: if (modplsql) then

Line 162: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;

158: else
159: -- we take all this trouble only if we are on R12
160: --construct the download URL
161: if (modplsql) then
162: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;
163: else
164: if (authenticate) then
165: url := fnd_web_config.trail_slash(fnd_profile.value('APPS_FRAMEWORK_AGENT'))||'OA_HTML/fndgfm.jsp?mode=download_blob'||'&'||'fid='||file_id||'&'||'accessid='||access_id;
166: else

Line 176: fnd_gfm.err_msg('construct_download_url2');

172: commit;
173: return url;
174: exception
175: when others then
176: fnd_gfm.err_msg('construct_download_url2');
177: raise;
178: end;
179:
180: /*--------------------------------------------------------------------------*/

Line 198: if (fnd_gfm.getRelease = 12) then

194: resp_id number;
195: resp_appl_id number;
196: sec_grp_id number :=0;
197: begin
198: if (fnd_gfm.getRelease = 12) then
199:
200: user_id := fnd_profile.value('USER_ID');
201: resp_id := fnd_profile.value('RESP_ID');
202: resp_appl_id := fnd_profile.value('RESP_APPL_ID');

Line 222: fnd_gfm.err_msg('construct_upload_url_r12');

218: from fnd_form_functions
219: where function_name = 'FND_FNDFLUPL'
220: and upper(type) = 'JSP';
221: when others then
222: fnd_gfm.err_msg('construct_upload_url_r12');
223: raise;
224: end;
225:
226: return FND_RUN_FUNCTION.GET_RUN_FUNCTION_URL(

Line 240: --fnd_gfm.wait_for_upload('FND_GFM_ALERT' || to_char(access_id));

236: for a generic callback
237: */
238:
239: --block the call till we have a submit
240: --fnd_gfm.wait_for_upload('FND_GFM_ALERT' || to_char(access_id));
241: --if we can create a unfirom structure for the callback
242: --we could invoke a callback here things we can provide is
243: --file_id , access_id etc as of now aniticipating a maximum
244: --these params

Line 254: --fnd_gfm.err_msg('construct_upload_url.failed_callback');

250: -- in out result;
251: --if (result = true)
252: -- return 'SUCCESS';
253: --else
254: --fnd_gfm.err_msg('construct_upload_url.failed_callback');
255: --raise;
256: --end if;
257: --end if;
258:

Line 265: fnd_gfm.err_msg('construct_upload_url');

261: end if;
262:
263: exception
264: when others then
265: fnd_gfm.err_msg('construct_upload_url');
266: raise;
267: end;
268: /*--------------------------------------------------------------------------*/
269: /*

Line 280: fnd_gfm.construct_relative_get(proc,path);

276: path varchar2) return varchar2 is
277: pragma autonomous_transaction;
278: begin
279: return fnd_web_config.trail_slash(gfm_agent)||
280: fnd_gfm.construct_relative_get(proc,path);
281: exception
282: when others then
283: fnd_gfm.err_msg('construct_get_url');
284: raise;

Line 283: fnd_gfm.err_msg('construct_get_url');

279: return fnd_web_config.trail_slash(gfm_agent)||
280: fnd_gfm.construct_relative_get(proc,path);
281: exception
282: when others then
283: fnd_gfm.err_msg('construct_get_url');
284: raise;
285: end;
286: /*--------------------------------------------------------------------------*/
287: /*

Line 304: fnd_gfm.err_msg('construct_relative_get');

300: begin
301: return 'fndgfm/'||proc||'/'||path;
302: exception
303: when others then
304: fnd_gfm.err_msg('construct_relative_get');
305: raise;
306: end;
307: /*--------------------------------------------------------------------------*/
308: /*

Line 357: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));

353: where access_id = confirm_upload.access_id;
354:
355: --raise the alert back so that the wait is ended
356: if wakeup then
357: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));
358: end if;
359:
360: return fid;
361: exception

Line 366: if (fnd_gfm.authenticate(confirm_upload.access_id)) then

362: when others then
363: return -1;
364: end;
365: else
366: if (fnd_gfm.authenticate(confirm_upload.access_id)) then
367: select fnd_lobs_s.nextval into fid from dual;
368:
369: fn := SUBSTR(confirm_upload.file_name, INSTR(confirm_upload.file_name,'/')+1);
370:

Line 420: fnd_gfm.set_file_format(mt)

416: confirm_upload.expiration_date,
417: confirm_upload.program_name,
418: confirm_upload.program_tag,
419: confirm_upload.language,
420: fnd_gfm.set_file_format(mt)
421: from fnd_lobs_document ld
422: where ld.name = confirm_upload.file_name
423: and rownum=1);
424:

Line 433: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));

429: update fnd_lob_access set file_id = fid
430: where access_id = confirm_upload.access_id;
431:
432: if wakeup then
433: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));
434: end if;
435: -- bug 3045375, added else to return fid = -2.
436: else
437: fid := -2;

Line 449: fnd_gfm.err_msg('confirm_upload');

445: when others then
446: delete from fnd_lobs_document;
447: delete from fnd_lobs_documentpart;
448:
449: fnd_gfm.err_msg('confirm_upload');
450: raise;
451: end;
452: /*--------------------------------------------------------------------------*/
453: /*

Line 474: fnd_gfm.err_msg('get_file_id');

470:
471: return fid;
472: exception
473: when others then
474: fnd_gfm.err_msg('get_file_id');
475: raise;
476: end;
477: /*--------------------------------------------------------------------------*/
478: /*

Line 525: fnd_gfm.err_msg('dispatch');

521: end if;
522:
523: exception
524: when others then
525: fnd_gfm.err_msg('dispatch');
526: raise;
527: end;
528: /*--------------------------------------------------------------------------*/
529: /*

Line 540: name := 'FND_GFM_ALERT' || to_char(access_id);

536: name varchar2(64);
537: message varchar2(32);
538: status integer;
539: begin
540: name := 'FND_GFM_ALERT' || to_char(access_id);
541: dbms_alert.register(name);
542: dbms_alert.waitone(name, message, status, timeout);
543: dbms_alert.remove(name);
544:

Line 571: fnd_gfm.err_msg('purge_expired');

567: commit;
568: end if;
569: exception
570: when others then
571: fnd_gfm.err_msg('purge_expired');
572: raise;
573: end;
574: /*--------------------------------------------------------------------------*/
575: /*

Line 592: fnd_gfm.err_msg('purge_set');

588: end if;
589: commit;
590: exception
591: when others then
592: fnd_gfm.err_msg('purge_set');
593: raise;
594: end;
595: /*--------------------------------------------------------------------------*/
596: /*

Line 607: fnd_gfm.purge_expired(purge.program_name);

603: program_tag in varchar2 default null)
604: is
605: begin
606: if (purge.expired <> 'N') then
607: fnd_gfm.purge_expired(purge.program_name);
608:
609: elsif (purge.program_name is not null) then
610: fnd_gfm.purge_set(purge.program_name, purge.program_tag);
611:

Line 610: fnd_gfm.purge_set(purge.program_name, purge.program_tag);

606: if (purge.expired <> 'N') then
607: fnd_gfm.purge_expired(purge.program_name);
608:
609: elsif (purge.program_name is not null) then
610: fnd_gfm.purge_set(purge.program_name, purge.program_tag);
611:
612: end if;
613:
614: retcode := '0'; -- (successful completion)

Line 658: iana_cs := fnd_gfm.get_iso_charset;

654: if (instr(content_type,'charset=') > 0) then
655: iana_cs := substr(content_type, instr(content_type,'=',-1)+1);
656: ct := content_type;
657: else
658: iana_cs := fnd_gfm.get_iso_charset;
659: ct := content_type||'; charset='||iana_cs;
660: end if;
661:
662: if fd is null then

Line 672: l_lang, fnd_gfm.iana_to_oracle(iana_cs), l_file_format)

668: file_data, upload_date, expiration_date, program_name, program_tag,
669: language,oracle_charset,file_format)
670: values (fnd_lobs_s.nextval, file_name, ct,
671: EMPTY_BLOB(), sysdate, sysdate + 1, program_name, program_tag,
672: l_lang, fnd_gfm.iana_to_oracle(iana_cs), l_file_format)
673: returning file_id into fh.fid;
674:
675: fh.offset := 1;
676: open_file_handles(fd) := fh;

Line 682: fnd_gfm.err_msg('file_create');

678: commit;
679: return fd;
680: exception
681: when others then
682: fnd_gfm.err_msg('file_create');
683: raise;
684: end;
685: /*--------------------------------------------------------------------------*/
686: /*

Line 702: fnd_gfm.err_msg('file_close');

698:
699: return fh.fid;
700: exception
701: when others then
702: fnd_gfm.err_msg('file_close');
703: raise;
704: end;
705: /*--------------------------------------------------------------------------*/
706: /*

Line 742: fnd_gfm.err_msg('file_write');

738: open_file_handles(fd) := fh;
739: commit;
740: exception
741: when others then
742: fnd_gfm.err_msg('file_write');
743: raise;
744: end;
745: /*--------------------------------------------------------------------------*/
746: /*

Line 797: fnd_gfm.err_msg('get_iso_charset');

793: instr(userenv('LANGUAGE'),'.')+1);
794: return charset;
795: exception
796: when others then
797: fnd_gfm.err_msg('get_iso_charset');
798: raise;
799: end;
800: /*--------------------------------------------------------------------------*/
801: /*

Line 822: fnd_gfm.err_msg('iana_to_oracle');

818:
819: return cs;
820: exception
821: when others then
822: fnd_gfm.err_msg('iana_to_oracle');
823: raise;
824: end;
825: /*--------------------------------------------------------------------------*/
826: /*

Line 848: fnd_gfm.err_msg('oracle_to_iana');

844:
845: return ics;
846: exception
847: when others then
848: fnd_gfm.err_msg('oracle_to_iana');
849: raise;
850: end;
851: /*--------------------------------------------------------------------------*/
852: /*

Line 863: if (fnd_gfm.authenticate(access, file_id) = FALSE) then

859: purge varchar2 default NULL) is
860: doc blob;
861: ct varchar2(100);
862: begin
863: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
864: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
865: else
866: fnd_gfm.download_blob(file_id);
867:

Line 866: fnd_gfm.download_blob(file_id);

862: begin
863: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
864: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
865: else
866: fnd_gfm.download_blob(file_id);
867:
868: if (purge = 'yes') then
869: /* Instead of deleting the data immediatlely we are setting the
870: * expiration data.

Line 879: fnd_gfm.err_msg('download');

875: end if;
876: end if;
877: exception
878: when others then
879: fnd_gfm.err_msg('download');
880: raise;
881: end download;
882: /*--------------------------------------------------------------------------*/
883: /*

Line 940: cs := fnd_gfm.oracle_to_iana(nce);

936:
937: fnd_profile.get_specific('FND_NATIVE_CLIENT_ENCODING',fnd_global.user_id,NULL,NULL,nce,bb);
938:
939: if (pn = 'export' and nce is not null) then
940: cs := fnd_gfm.oracle_to_iana(nce);
941: nce := 'american_america.'||nce;
942: ocs := 'american_america.'||ocs;
943: dbms_lob.createtemporary(lob_loc,TRUE);
944: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);

Line 1001: fnd_gfm.err_msg('download_blob');

997: htp.hr;
998: htp.p(Fnd_Message.Get_String('GMD','LM_BAD_FILENAME'));
999: htp.bodyClose; htp.htmlClose;
1000: when others then
1001: fnd_gfm.err_msg('download_blob');
1002: raise;
1003: end download_blob;
1004:
1005: /*

Line 1124: if (fnd_gfm.authenticate(access, file_id) = FALSE) then

1120: bool := icx_sec.validatesession();
1121: access := substr(p_path,instr(p_path,'/',1)+1,instr(p_path,'/',2)-2);
1122: file_id := substr(p_path,instr(p_path,'/',2)+1,(instr(p_path,'/',-1)-instr(p_path,'/',2)-1));
1123:
1124: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
1125: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
1126: else
1127: fnd_gfm.download_blob(file_id);
1128:

Line 1127: fnd_gfm.download_blob(file_id);

1123:
1124: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
1125: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
1126: else
1127: fnd_gfm.download_blob(file_id);
1128:
1129: end if;
1130: exception
1131: when others then

Line 1132: fnd_gfm.err_msg('get');

1128:
1129: end if;
1130: exception
1131: when others then
1132: fnd_gfm.err_msg('get');
1133: raise;
1134: end get;
1135: /*--------------------------------------------------------------------------*/
1136: /*

Line 1202: fnd_gfm.err_msg('copy_lob');

1198: return fid_to;
1199:
1200: exception
1201: when others then
1202: fnd_gfm.err_msg('copy_lob');
1203: raise;
1204: end copy_lob;
1205: /*--------------------------------------------------------------------------*/
1206: /*

Line 1315: fnd_gfm.iana_to_oracle(fnd_gfm.get_iso_charset),

1311: 'FNDAPI',
1312: null,
1313: empty_blob(),
1314: v_language,
1315: fnd_gfm.iana_to_oracle(fnd_gfm.get_iso_charset),
1316: fnd_gfm.set_file_format(v_content_type));
1317:
1318: select file_data into l_blob_loc from fnd_lobs
1319: where file_id = fid;

Line 1316: fnd_gfm.set_file_format(v_content_type));

1312: null,
1313: empty_blob(),
1314: v_language,
1315: fnd_gfm.iana_to_oracle(fnd_gfm.get_iso_charset),
1316: fnd_gfm.set_file_format(v_content_type));
1317:
1318: select file_data into l_blob_loc from fnd_lobs
1319: where file_id = fid;
1320:

Line 1381: fnd_gfm.err_msg('delete_lob');

1377: delete from fnd_lobs where file_id = fid;
1378: commit;
1379: exception
1380: when others then
1381: fnd_gfm.err_msg('delete_lob');
1382: raise;
1383: END delete_lob;
1384: /*--------------------------------------------------------------------------*/
1385:

Line 1394: fnd_gfm.err_msg('construct_download_url');

1390: begin
1391: return construct_download_url2(gfm_agent,file_id,purge_on_view,false,true);
1392: exception
1393: when others then
1394: fnd_gfm.err_msg('construct_download_url');
1395: raise;
1396: end;
1397:
1398: ------------------------------------------------------------------------------

Line 1452: fnd_gfm.err_msg('getRelease');

1448:
1449: return g_release_version;
1450: exception
1451: when others then
1452: fnd_gfm.err_msg('getRelease');
1453: raise;
1454: end;
1455:
1456:

Line 1460: end FND_GFM;

1456:
1457: ------------------------------------------------------------------------------
1458:
1459:
1460: end FND_GFM;