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.23.12020000.3 2012/08/20 20:15:34 ctilley 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 82: fnd_gfm.err_msg('authorize');

78: end;
79: end loop;
80: exception
81: when others then
82: fnd_gfm.err_msg('authorize');
83: raise;
84: end;
85: /*--------------------------------------------------------------------------*/
86: /*

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

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

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

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

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

139: else
140: file_ext := '';
141: end if;
142:
143: file_name := 'fnd_gfm'||file_ext;
144: update fnd_lobs set fnd_lobs.expiration_date = sysdate + 0.5
145: where fnd_lobs.file_id = construct_download_url2.file_id;
146:
147: else

Line 157: file_name := 'fnd_gfm';

153: select substr(file_name,instr(file_name,'/',-1)+1) into file_name
154: from fnd_lobs
155: where file_id = construct_download_url2.file_id;
156: else
157: file_name := 'fnd_gfm';
158: end if;
159: end if;
160:
161: --check the release

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

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

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

159: end if;
160:
161: --check the release
162: if (fnd_gfm.getRelease = 11) then
163: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;
164: else
165: -- we take all this trouble only if we are on R12
166: --construct the download URL
167: if (modplsql) then

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

164: else
165: -- we take all this trouble only if we are on R12
166: --construct the download URL
167: if (modplsql) then
168: url := fnd_web_config.trail_slash(gfm_agent)||'fndgfm/fnd_gfm.get/'||access_id||'/'||file_id||'/'||file_name;
169: else
170: if (authenticate) then
171: 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;
172: else

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

178: commit;
179: return url;
180: exception
181: when others then
182: fnd_gfm.err_msg('construct_download_url2');
183: raise;
184: end;
185:
186: /*--------------------------------------------------------------------------*/

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

200: resp_id number;
201: resp_appl_id number;
202: sec_grp_id number :=0;
203: begin
204: if (fnd_gfm.getRelease = 12) then
205:
206: user_id := fnd_profile.value('USER_ID');
207: resp_id := fnd_profile.value('RESP_ID');
208: resp_appl_id := fnd_profile.value('RESP_APPL_ID');

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

224: from fnd_form_functions
225: where function_name = 'FND_FNDFLUPL'
226: and upper(type) = 'JSP';
227: when others then
228: fnd_gfm.err_msg('construct_upload_url_r12');
229: raise;
230: end;
231:
232: return FND_RUN_FUNCTION.GET_RUN_FUNCTION_URL(

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

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

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

256: -- in out result;
257: --if (result = true)
258: -- return 'SUCCESS';
259: --else
260: --fnd_gfm.err_msg('construct_upload_url.failed_callback');
261: --raise;
262: --end if;
263: --end if;
264:

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

267: end if;
268:
269: exception
270: when others then
271: fnd_gfm.err_msg('construct_upload_url');
272: raise;
273: end;
274: /*--------------------------------------------------------------------------*/
275: /*

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

282: path varchar2) return varchar2 is
283: pragma autonomous_transaction;
284: begin
285: return fnd_web_config.trail_slash(gfm_agent)||
286: fnd_gfm.construct_relative_get(proc,path);
287: exception
288: when others then
289: fnd_gfm.err_msg('construct_get_url');
290: raise;

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

285: return fnd_web_config.trail_slash(gfm_agent)||
286: fnd_gfm.construct_relative_get(proc,path);
287: exception
288: when others then
289: fnd_gfm.err_msg('construct_get_url');
290: raise;
291: end;
292: /*--------------------------------------------------------------------------*/
293: /*

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

306: begin
307: return 'fndgfm/'||proc||'/'||path;
308: exception
309: when others then
310: fnd_gfm.err_msg('construct_relative_get');
311: raise;
312: end;
313: /*--------------------------------------------------------------------------*/
314: /*

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

359: where access_id = confirm_upload.access_id;
360:
361: --raise the alert back so that the wait is ended
362: if wakeup then
363: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));
364: end if;
365:
366: return fid;
367: exception

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

368: when others then
369: return -1;
370: end;
371: else
372: if (fnd_gfm.authenticate(confirm_upload.access_id)) then
373:
374: if (verify_file_type(file_name => confirm_upload.file_name) = 'Y') then
375: select fnd_lobs_s.nextval into fid from dual;
376:

Line 428: fnd_gfm.set_file_format(mt)

424: confirm_upload.expiration_date,
425: confirm_upload.program_name,
426: confirm_upload.program_tag,
427: confirm_upload.language,
428: fnd_gfm.set_file_format(mt)
429: from fnd_lobs_document ld
430: where ld.name = confirm_upload.file_name
431: and rownum=1);
432:

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

437: update fnd_lob_access set file_id = fid
438: where access_id = confirm_upload.access_id;
439:
440: if wakeup then
441: dbms_alert.signal('FND_GFM_ALERT'||to_char(access_id), to_char(fid));
442: end if;
443: -- bug 3045375, added else to return fid = -2.
444: else
445: -- This indicates that an invalid file size has been uploaded.

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

458: when others then
459: delete from fnd_lobs_document;
460: delete from fnd_lobs_documentpart;
461:
462: fnd_gfm.err_msg('confirm_upload');
463: raise;
464: end;
465: /*--------------------------------------------------------------------------*/
466: /*

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

483:
484: return fid;
485: exception
486: when others then
487: fnd_gfm.err_msg('get_file_id');
488: raise;
489: end;
490: /*--------------------------------------------------------------------------*/
491: /*

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

534: end if;
535:
536: exception
537: when others then
538: fnd_gfm.err_msg('dispatch');
539: raise;
540: end;
541: /*--------------------------------------------------------------------------*/
542: /*

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

549: name varchar2(64);
550: message varchar2(32);
551: status integer;
552: begin
553: name := 'FND_GFM_ALERT' || to_char(access_id);
554: dbms_alert.register(name);
555: dbms_alert.waitone(name, message, status, timeout);
556: dbms_alert.remove(name);
557:

Line 584: l_module_source varchar2(256) := 'FND_GFM.PURGE_EXPIRED';

580: AND EXPIRATION_DATE IS NULL;
581:
582: l_file_id number;
583: l_doc_cnt number;
584: l_module_source varchar2(256) := 'FND_GFM.PURGE_EXPIRED';
585:
586: begin
587: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
588: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source,'Begin');

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

641: end if;
642:
643: exception
644: when others then
645: fnd_gfm.err_msg('purge_expired');
646: raise;
647: end;
648: /*--------------------------------------------------------------------------*/
649: /*

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

662: end if;
663: commit;
664: exception
665: when others then
666: fnd_gfm.err_msg('purge_set');
667: raise;
668: end;
669: /*--------------------------------------------------------------------------*/
670: /*

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

677: program_tag in varchar2 default null)
678: is
679: begin
680: if (purge.expired <> 'N') then
681: fnd_gfm.purge_expired(purge.program_name);
682:
683: elsif (purge.program_name is not null) then
684: fnd_gfm.purge_set(purge.program_name, purge.program_tag);
685:

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

680: if (purge.expired <> 'N') then
681: fnd_gfm.purge_expired(purge.program_name);
682:
683: elsif (purge.program_name is not null) then
684: fnd_gfm.purge_set(purge.program_name, purge.program_tag);
685:
686: end if;
687:
688: retcode := '0'; -- (successful completion)

Line 732: iana_cs := fnd_gfm.get_iso_charset;

728: if (instr(content_type,'charset=') > 0) then
729: iana_cs := substr(content_type, instr(content_type,'=',-1)+1);
730: ct := content_type;
731: else
732: iana_cs := fnd_gfm.get_iso_charset;
733: ct := content_type||'; charset='||iana_cs;
734: end if;
735:
736: if fd is null then

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

742: file_data, upload_date, expiration_date, program_name, program_tag,
743: language,oracle_charset,file_format)
744: values (fnd_lobs_s.nextval, file_name, ct,
745: EMPTY_BLOB(), sysdate, sysdate + 1, program_name, program_tag,
746: l_lang, fnd_gfm.iana_to_oracle(iana_cs), l_file_format)
747: returning file_id into fh.fid;
748:
749: fh.offset := 1;
750: open_file_handles(fd) := fh;

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

752: commit;
753: return fd;
754: exception
755: when others then
756: fnd_gfm.err_msg('file_create');
757: raise;
758: end;
759: /*--------------------------------------------------------------------------*/
760: /*

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

772:
773: return fh.fid;
774: exception
775: when others then
776: fnd_gfm.err_msg('file_close');
777: raise;
778: end;
779: /*--------------------------------------------------------------------------*/
780: /*

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

812: open_file_handles(fd) := fh;
813: commit;
814: exception
815: when others then
816: fnd_gfm.err_msg('file_write');
817: raise;
818: end;
819: /*--------------------------------------------------------------------------*/
820: /*

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

867: instr(userenv('LANGUAGE'),'.')+1);
868: return charset;
869: exception
870: when others then
871: fnd_gfm.err_msg('get_iso_charset');
872: raise;
873: end;
874: /*--------------------------------------------------------------------------*/
875: /*

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

892:
893: return cs;
894: exception
895: when others then
896: fnd_gfm.err_msg('iana_to_oracle');
897: raise;
898: end;
899: /*--------------------------------------------------------------------------*/
900: /*

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

918:
919: return ics;
920: exception
921: when others then
922: fnd_gfm.err_msg('oracle_to_iana');
923: raise;
924: end;
925: /*--------------------------------------------------------------------------*/
926: /*

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

933: purge varchar2 default NULL) is
934: doc blob;
935: ct varchar2(100);
936: begin
937: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
938: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
939: else
940: fnd_gfm.download_blob(file_id);
941:

Line 940: fnd_gfm.download_blob(file_id);

936: begin
937: if (fnd_gfm.authenticate(access, file_id) = FALSE) then
938: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
939: else
940: fnd_gfm.download_blob(file_id);
941:
942: if (purge = 'yes') then
943: /* Instead of deleting the data immediatlely we are setting the
944: * expiration data.

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

949: end if;
950: end if;
951: exception
952: when others then
953: fnd_gfm.err_msg('download');
954: raise;
955: end download;
956: /*--------------------------------------------------------------------------*/
957: /*

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

1013:
1014: fnd_profile.get_specific('FND_NATIVE_CLIENT_ENCODING',fnd_global.user_id,NULL,NULL,nce,bb);
1015:
1016: if (pn = 'export' and nce is not null) then
1017: cs := fnd_gfm.oracle_to_iana(nce);
1018: nce := 'american_america.'||nce;
1019: ocs := 'american_america.'||ocs;
1020: dbms_lob.createtemporary(lob_loc,TRUE);
1021: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);

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

1081: htp.hr;
1082: htp.p(Fnd_Message.Get_String('GMD','LM_BAD_FILENAME'));
1083: htp.bodyClose; htp.htmlClose;
1084: when others then
1085: fnd_gfm.err_msg('download_blob');
1086: raise;
1087: end download_blob;
1088:
1089: /*

Line 1207: l_module_source := 'FND_GFM.GET';

1203: exp_date date;
1204: p_purge_on_view varchar2(1) := 'N';
1205: l_module_source varchar2(256);
1206: begin
1207: l_module_source := 'FND_GFM.GET';
1208:
1209: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1210: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'Begin');
1211: end if;

Line 1217: if (fnd_gfm.authenticate(access, l_file_id) = FALSE) then

1213: bool := icx_sec.validatesession();
1214: access := substr(p_path,instr(p_path,'/',1)+1,instr(p_path,'/',2)-2);
1215: l_file_id := substr(p_path,instr(p_path,'/',2)+1,(instr(p_path,'/',-1)-instr(p_path,'/',2)-1));
1216:
1217: if (fnd_gfm.authenticate(access, l_file_id) = FALSE) then
1218: htp.p(Fnd_Message.Get_String('PAY','HR_51401_WEB_NOT_AUTHORIZED'));
1219: else
1220:
1221: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then

Line 1225: fnd_gfm.download_blob(l_file_id);

1221: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1222: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'Downloading file_id '||to_char(l_file_id));
1223: end if;
1224:
1225: fnd_gfm.download_blob(l_file_id);
1226:
1227: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1228: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'Done downloading file. Determine if this was an export that needs to be purged');
1229: end if;

Line 1248: fnd_gfm.delete_lob(l_file_id);

1244: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1245: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'Deleting lob');
1246: end if;
1247:
1248: fnd_gfm.delete_lob(l_file_id);
1249: end if;
1250: end if;
1251: end if;
1252:

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

1255: end if;
1256:
1257: exception
1258: when others then
1259: fnd_gfm.err_msg('get');
1260: raise;
1261: end get;
1262: /*--------------------------------------------------------------------------*/
1263: /*

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

1325: return fid_to;
1326:
1327: exception
1328: when others then
1329: fnd_gfm.err_msg('copy_lob');
1330: raise;
1331: end copy_lob;
1332: /*--------------------------------------------------------------------------*/
1333: /*

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

1442: 'FNDAPI',
1443: null,
1444: empty_blob(),
1445: v_language,
1446: fnd_gfm.iana_to_oracle(fnd_gfm.get_iso_charset),
1447: fnd_gfm.set_file_format(v_content_type));
1448:
1449: select file_data into l_blob_loc from fnd_lobs
1450: where file_id = fid;

Line 1447: fnd_gfm.set_file_format(v_content_type));

1443: null,
1444: empty_blob(),
1445: v_language,
1446: fnd_gfm.iana_to_oracle(fnd_gfm.get_iso_charset),
1447: fnd_gfm.set_file_format(v_content_type));
1448:
1449: select file_data into l_blob_loc from fnd_lobs
1450: where file_id = fid;
1451:

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

1508: delete from fnd_lobs where file_id = fid;
1509: commit;
1510: exception
1511: when others then
1512: fnd_gfm.err_msg('delete_lob');
1513: raise;
1514: END delete_lob;
1515: /*--------------------------------------------------------------------------*/
1516:

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

1521: begin
1522: return construct_download_url2(gfm_agent,file_id,purge_on_view,false,true);
1523: exception
1524: when others then
1525: fnd_gfm.err_msg('construct_download_url');
1526: raise;
1527: end;
1528:
1529: ------------------------------------------------------------------------------

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

1566:
1567: return g_release_version;
1568: exception
1569: when others then
1570: fnd_gfm.err_msg('getRelease');
1571: raise;
1572: end;
1573:
1574:

Line 1593: l_module_source := 'FND_GFM.VERIFY_FILE_TYPE';

1589: l_ext_pos number;
1590:
1591: begin
1592:
1593: l_module_source := 'FND_GFM.VERIFY_FILE_TYPE';
1594: l_file_ext := file_ext;
1595:
1596: if (fnd_log.level_statement >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1597: fnd_log.string(fnd_log.LEVEL_STATEMENT,l_module_source,'Begin');

Line 1695: fnd_gfm.err_msg('verify_file_type');

1691: if (fnd_log.level_statement >= fnd_log.G_CURRENT_RUNTIME_LEVEL) then
1692: fnd_log.string(fnd_log.LEVEL_STATEMENT,l_module_source,'When others exception occurred');
1693: end if;
1694:
1695: fnd_gfm.err_msg('verify_file_type');
1696: raise;
1697: end verify_file_type;
1698:
1699:

Line 1700: end FND_GFM;

1696: raise;
1697: end verify_file_type;
1698:
1699:
1700: end FND_GFM;