1 PACKAGE fnd_vault AUTHID CURRENT_USER AS
2 /* $Header: AFSCVLTS.pls 120.3.12000000.2 2007/03/09 01:51:02 jnurthen ship $ */
3
4 ----------------------------------------------------------
5 -- GET or GETR(aw) a value based upon service and variable name.
6 --
7 -- Arguments:
8 -- p_svc - Service name. This is the Service name previously set
9 -- using the put routines.
10 -- p_var - Variable name.
11 -- Returns:
12 -- Value previously stored under this service/variable combination.
13 -- (getr returns the RAW version, GET the VARCHAR2 string)
14 --
15 -----------------------------------------------------------
16
17
18 FUNCTION get(p_svc IN VARCHAR2,
19 p_var IN VARCHAR2) RETURN VARCHAR2;
20
21 FUNCTION getr(p_svc IN VARCHAR2,
22 p_var IN VARCHAR2) RETURN RAW;
23
24 ----------------------------------------------------------
25 -- PUT or PUTR(aw) a value based upon service and variable name.
26 -- If the service name / variable name combination already
27 -- exists - this will replace the current value.
28 --
29 -- Arguments:
30 -- p_svc - Service name. This is the Service name previously set
31 -- using the put routines.
32 -- p_var - Variable name.
33 -- p_val - The value you wish to store
34 --
35 -----------------------------------------------------------
36
37 PROCEDURE put(p_svc IN VARCHAR2,
38 p_var IN VARCHAR2,
39 p_val IN VARCHAR2);
40
41 PROCEDURE puts(p_svc IN VARCHAR2,
42 p_var IN VARCHAR2,
43 p_val IN VARCHAR2);
44
45 PROCEDURE putr(p_svc IN VARCHAR2,
46 p_var IN VARCHAR2,
47 p_val IN RAW,
48 p_secure IN BOOLEAN DEFAULT FALSE);
49
50 ------------------------------------------------------------
51 -- PUTS a value based upon service and variable name.
52 -- If the service name / variable name combination already
53 -- exists - this will replace the current value.
54 --
55 -- This version of the package sets the value in such a way
56 -- that it is not accessible from a select/update statement
57 -- only from within PL/SQL code... Any attempt to get this value
58 -- in a select statement will raise a Security Error
59 --
60 -- The value is secured by one or more namespace attribute combinations.
61 -- In order to use this version of the package the following
62 -- rules must be followed:
63 --
64 -- Create a Context which is settable from the calling package
65 -- (use CREATE CONTEXT p_nsp USING APPS.packagename
66 -- Before calling the package set the context attribute to 'Y'
67 -- using the following
68 -- DBMS_SESSION.SET_CONTEXT (p_nsp,p_atr,'Y');
69 -- p_ctx := p_nsp||'.'||p_atr
70 -- fnd_vault.puts(p_svc,p_var,p_val,p_ctx);
71 -- DBMS_SESSION.SET_CONTEXT (p_nsp,p_atr,'N');
72 --
73 -- Then to get the value subsequently do the following
74 -- DBMS_SESSION.SET_CONTEXT (p_nsp,p_atr,'Y');
75 -- value := fnd_vault.get(p_svc,p_var);
76 -- DBMS_SESSION.SET_CONTEXT (p_nsp,p_atr,'N');
77 --
78 -- Failure to follow the above will result in a Security Exception.
79 --
80 -- Arguments:
81 -- p_svc - Service name. This is the Service name previously set
82 -- using the put routines.
83 -- p_var - Variable name.
84 -- p_val - The value you wish to store
85 -- p_ctx - The context. This is a : separated list of valid namespace.attribute
86 -- combinations. i.e. if the variable can be accessed when the either
87 -- of the 2 context variable defined by
88 -- DBMS_SESSION.set_context('MYCONTEXT','MYATTRIBUTE','Y') or
89 -- DBMS_SESSION.set_context('ANOTHERCONTEXT','ANOTHERATTRIBUTE','Y')
90 -- then set p_ctx to 'MYCONTEXT.MYATTRIBUTE:ANOTHERCONTEXT.ANOTHERATTRIBUTE'
91 --
92 -- Notes:
93 -- Any subsequent call to ANY of the put variants above requires the correct
94 -- context to be set. If the above PUTS is called again the new p_ctx will
95 -- replace any previous p_ctx which was set - but the correct context must be
96 -- set before this call takes place.
97 --
98 -----------------------------------------------------------
99
100 PROCEDURE puts(p_svc IN VARCHAR2,
101 p_var IN VARCHAR2,
102 p_val IN VARCHAR2,
103 p_ctx IN VARCHAR2);
104 ----------------------------------------------------------
105 -- T(e)ST if a value has been set based upon service and variable name.
106 --
107 -- Arguments:
108 -- p_svc - Service name. This is the Service name previously set
109 -- using the put routines.
110 -- p_var - Variable name.
111 -- Returns:
112 -- TRUE if the value has been set, FALSE otherwise
113 --
114 -----------------------------------------------------------
115
116
117 FUNCTION tst(p_svc IN VARCHAR2,
118 p_var IN VARCHAR2) RETURN BOOLEAN;
119
120 ----------------------------------------------------------
121 -- DEL(ete) a value based upon service and variable name.
122 --
123 -- Arguments:
124 -- p_svc - Service name. This is the Service name previously set
125 -- using the put routines.
126 -- p_var - Variable name.
127 --
128 -----------------------------------------------------------
129
130
131 PROCEDURE del(p_svc IN VARCHAR2,
132 p_var IN VARCHAR2);
133 ----------------------------------------------------------
134 -- DEL(ete) all values based upon service
135 --
136 -- Arguments:
137 -- p_svc - Service name. This is the Service name previously set
138 -- using the put routines.
139 --
140 -----------------------------------------------------------
141
142
143 PROCEDURE del(p_svc IN VARCHAR2);
144 ----------------------------------------------------------
145 -- REKEY all of the data in FND_VAULT
146 --
147 -----------------------------------------------------------
148 PROCEDURE rekey;
149
150 ----------------------------------------------------------
151 -- Concurrent program version of REKEY
152 --
153 -----------------------------------------------------------
154 PROCEDURE rekey_concurrent(errbuf out NOCOPY varchar2,
155 retcode out NOCOPY varchar2);
156
157
158 -----------------------------------------------------------
159 -- Internal Use only
160 -----------------------------------------------------------
161
162 FUNCTION ALLOWED (object_schema IN VARCHAR2, object_name IN VARCHAR2)
163 RETURN VARCHAR2;
164
165 -- The following are debug only bits. These should never be there for real.
166 --
167 -- -- debug procedures (remove these!!!)
168 -- PROCEDURE reset;
169 -- PROCEDURE debug(p_tm IN INTEGER);
170 --
171 -- PROCEDURE block;
172
173 END;