[Home] [Help]
PACKAGE BODY: APPS.AD_JAR
Source
1 package body AD_JAR as
2 /* $Header: ADJRIB.pls 120.0.12020000.2 2013/05/16 04:29:40 mkumandu noship $ */
3
4
5 /*-----------------------------------------------------------------+
6 | |
7 | get_jripasswords - Gets JRI passwords from FND_VAULT. |
8 | |
9 +-----------------------------------------------------------------*/
10 procedure get_jripasswords(storepass OUT NOCOPY varchar2,
11 keypass OUT NOCOPY varchar2)
12 is
13 l_storepass varchar2(30);
14 l_keypass varchar2(30);
15 begin
16
17 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'Y');
18
19 l_storepass := fnd_vault.get('AD_JAR', 'STOREPASS');
20 l_keypass := fnd_vault.get('AD_JAR', 'KEYPASS');
21
22 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'N');
23
24 storepass := nvl(l_storepass, 'NOT-EXIST');
25 keypass := nvl(l_keypass, 'NOT-EXIST');
26
27 end get_jripasswords;
28
29 /*-----------------------------------------------------------------+
30 | |
31 | put_jripasswords - Puts JRI passwords into FND_VAULT. |
32 | |
33 +-----------------------------------------------------------------*/
34 procedure put_jripasswords(storepass in varchar2 default null,
35 keypass in varchar2 default null)
36 is
37 begin
38
39 if (storepass is null and keypass is null)
40 then
41 raise_application_error(-20001, 'Both Store Password and Key Password cannot be null');
42 end if;
43
44 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'Y');
45
46 if (storepass is not null)
47 then
48 fnd_vault.puts('AD_JAR', 'STOREPASS', storepass);
49 end if;
50
51 if (keypass is not null)
52 then
53 fnd_vault.puts('AD_JAR', 'KEYPASS', keypass);
54 end if;
55
56 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'N');
57
58 end put_jripasswords;
59
60
61 /*-----------------------------------------------------------------+
62 | |
63 | del_jripasswords - Deletes JRI passwords from FND_VAULT. |
64 | |
65 +-----------------------------------------------------------------*/
66 procedure del_jripasswords
67 is
68 begin
69
70 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'Y');
71
72 fnd_vault.del('AD_JAR', 'STOREPASS');
73 fnd_vault.del('AD_JAR', 'KEYPASS');
74
75 dbms_session.set_context('AD_JAR', 'VAULT_ACCESS', 'N');
76
77 end del_jripasswords;
78
79
80 end AD_JAR;