[Home] [Help]
2: /* $Header: jtfdiagadptutl_b.pls 120.13.12020000.2 2012/07/17 12:06:43 rlandows ship $ */
3:
4: -----------------------------------------------------------
5: -- checkValidApi takes in the test package name and
6: -- queries the all_arguments data dictionary to check if the
7: -- api required for this to be a valid diagnostic test exist.
8: -- checks for the runTest procedure call in the package name
9: -- and then checks if the API exists. Currently it is just the
10: -- runTest method that is checked.
23: b_false NUMBER :=0;
24: BEGIN
25: -- checking if a valid RUNTEST API has been written.
26: select nvl(TYPE_NAME,PLS_TYPE) into arg1
27: from all_arguments z
28: where UPPER(z.package_name) = UPPER(packageName)
29: and upper(z.owner) in ('APPS', 'JTF', 'APPLSYS')
30: and UPPER(z.object_name) = 'RUNTEST'
31: and z.position = 1
31: and z.position = 1
32: and z.IN_OUT = 'IN';
33:
34: select nvl(z.TYPE_NAME,z.PLS_TYPE) into arg2
35: from all_arguments z
36: where UPPER(z.package_name) = UPPER(packageName)
37: and upper(z.owner) in ('APPS', 'JTF', 'APPLSYS')
38: and UPPER(z.object_name) = 'RUNTEST'
39: and z.position = 2
39: and z.position = 2
40: and z.IN_OUT = 'OUT';
41:
42: select nvl(z.TYPE_NAME,z.PLS_TYPE) into arg3
43: from all_arguments z
44: where UPPER(z.package_name) = UPPER(packageName)
45: and upper(z.owner) in ('APPS', 'JTF', 'APPLSYS')
46: and UPPER(z.object_name) = 'RUNTEST'
47: and z.position = 3
48: and z.IN_OUT = 'OUT';
49:
50: -- make sure that function has correct no of params.
51: select max(z.position) into maxPos
52: from all_arguments z
53: where UPPER(z.package_name) = UPPER(packageName)
54: and upper(z.owner) in ('APPS', 'JTF', 'APPLSYS')
55: and UPPER(z.object_name) = 'RUNTEST';
56: IF maxPos > 3 THEN
535: v_size NUMBER := 0;
536: cursor testNameCursor IS
537:
538: select distinct a.package_name, a.object_name
539: from all_arguments a, all_objects b
540: where
541: -- a.owner like 'APPS' and b.owner like 'APPS'
542: -- and a.object_id = b.object_id
543: a.object_id = b.object_id
549: and a.object_name like 'TEST%'
550: and a.sequence = 0;
551:
552: -- select distinct package_name,object_name
553: -- from all_arguments
554: -- where owner like 'APPS'
555: -- where owner like USER
556: -- and upper(package_name) like upper(pkgName)
557: -- and upper(package_name) like upper(pkgName)||'%'
582: testName VARCHAR2(4000);
583: v_size NUMBER := 0;
584: cursor testNameCursor IS
585: select distinct package_name
586: from all_arguments
587: -- where owner like 'APPS'
588: where -- owner like USER
589: -- and upper(package_name) like upper(pkgName)||'%'
590: upper(package_name) like upper(pkgName)||'%'
616: testName VARCHAR2(4000);
617: v_size NUMBER := 0;
618: cursor testNameCursor IS
619: select distinct package_name
620: from all_arguments
621: -- where owner like 'APPS'
622: where -- owner like USER
623: -- and upper(package_name) like upper(pkgName)||'%'
624: upper(package_name) like upper(pkgName)||'%'