DBA Data[Home] [Help]

PACKAGE: APPS.IMC_OBJECT_METADATA_PUB

Source


1 PACKAGE IMC_OBJECT_METADATA_PUB AUTHID CURRENT_USER AS
2 /* $Header: imcomds.pls 115.4 2002/11/12 21:52:47 tsli noship $ */
3 
4 TYPE ref_cursor_obj_metadata IS REF CURSOR;
5 
6 g_module CONSTANT VARCHAR2(30) := 'IMC_OBJECT_METADATA';
7 
8 /* Messages */
9 g_invalid_object_type CONSTANT VARCHAR2(30) := 'IMC_INVALID_OBJ_TYPE';
10 g_metadata_api_others_ex CONSTANT VARCHAR2(30) := 'IMC_METADATA_API_OTHERS_EX';
11 g_no_metadata_for_obj_type CONSTANT VARCHAR2(30) := 'IMC_NO_METADATA_FOR_OBJ_TYPE';
12 
13 /* Profiles */
14 
15 /* Profile defaults */
16 
17 ---------------------------------------------------------------------------------
18 --
19 -- API name  : Add_Object_Metadata
20 --
21 -- TYPE      : Public
22 --
23 -- FUNCTION  : Add metadata for an object. If a record already exists for
24 --             this object, update fields. Otherwise, create a fresh entry.
25 --
26 -- Parameters:
27 --
28 --     IN    :
29 --             p_object_type IN VARCHAR2 (required)
30 --             Type of Object for which metadata should be created.
31 --
32 --             p_description IN VARCHAR2 (optional)
33 --             Description of the metadata being added.
34 --
35 --             p_function_name IN VARCHAR2 (optional)
36 --             Function name.
37 --
38 --             p_parameter_name IN VARCHAR2 (optional)
39 --             Parameter name for function.
40 --
41 --             p_enabled IN VARCHAR2 (optional)
42 --             Application recording metadata for object.
43 --             Defaulted to 'Y'.
44 --
45 --             p_application_id IN VARCHAR2 (optional)
46 --             Application recording metadata for object.
47 --
48 --             p_additional_value1 IN VARCHAR2 (optional)
49 --             Additional value for this entry.
50 --
51 --             p_additional_value2 IN VARCHAR2 (optional)
52 --             Additional value for this entry.
53 --
54 --             p_additional_value3 IN VARCHAR2 (optional)
55 --             Additional value for this entry.
56 --
57 --             p_additional_value4 IN VARCHAR2 (optional)
58 --             Additional value for this entry.
59 --
60 --             p_additional_value5 IN VARCHAR2 (optional)
61 --             Additional value for this entry.
62 --
63 --     OUT NOCOPY   :
64 --             x_return_status
65 --             1 byte result code:
66 --                'S'  Success  (FND_API.G_RET_STS_SUCCESS)
67 --                'E'  Error  (FND_API.G_RET_STS_ERROR)
68 --                'U'  Unexpected Error (FND_API.G_RET_STS_UNEXP_ERROR)
69 --
70 --             x_msg_count
71 --             Number of messages in message stack.
72 --             If 'E' or 'U' is returned, there will be an error message on the
73 --             FND_MESSAGE stack which can be retrieved with
74 --             FND_MESSAGE.GET_ENCODED().
75 --
76 --             x_msg_data
77 --             The first message in the FND_MESSAGE stack
78 --
79 -- Version: Current Version 1.0
80 -- Previous Version :  None
81 --
82 -- Notes     :
83 --
84 ---------------------------------------------------------------------------------
85 PROCEDURE Add_Object_Metadata (
86   p_object_type			IN IMC_OBJECT_METADATA.object_type%TYPE,
87   p_description			IN IMC_OBJECT_METADATA.description%TYPE,
88   p_function_name		IN IMC_OBJECT_METADATA.function_name%TYPE,
89   p_parameter_name		IN IMC_OBJECT_METADATA.parameter_name%TYPE,
90   p_enabled			IN IMC_OBJECT_METADATA.enabled%TYPE,
91   p_application_id		IN IMC_OBJECT_METADATA.application_id%TYPE,
92   p_additional_value1		IN IMC_OBJECT_METADATA.additional_value1%TYPE,
93   p_additional_value2		IN IMC_OBJECT_METADATA.additional_value2%TYPE,
94   p_additional_value3		IN IMC_OBJECT_METADATA.additional_value3%TYPE,
95   p_additional_value4		IN IMC_OBJECT_METADATA.additional_value4%TYPE,
96   p_additional_value5		IN IMC_OBJECT_METADATA.additional_value5%TYPE,
97   x_return_status		OUT NOCOPY VARCHAR2,
98   x_msg_count			OUT NOCOPY VARCHAR2,
99   x_msg_data			OUT NOCOPY VARCHAR2
100 );
101 
102 ---------------------------------------------------------------------------------
103 --
104 -- API name  : Remove_Object_Metadata
105 --
106 -- TYPE      : Public
107 --
108 -- FUNCTION  : Remove metadata for an object. If a record doesn't exist for
109 --             this object, return success but with message.
110 --
111 -- Parameters:
112 --
113 --     IN    :
114 --             p_object_type IN VARCHAR2 (required)
115 --             Type of Object for which metadata should be created.
116 --
117 --     OUT NOCOPY   :
118 --             x_return_status
119 --             1 byte result code:
120 --                'S'  Success  (FND_API.G_RET_STS_SUCCESS)
121 --                'E'  Error  (FND_API.G_RET_STS_ERROR)
122 --                'U'  Unexpected Error (FND_API.G_RET_STS_UNEXP_ERROR)
123 --
124 --             x_msg_count
125 --             Number of messages in message stack.
126 --             If 'E' or 'U' is returned, there will be an error message on the
127 --             FND_MESSAGE stack which can be retrieved with
128 --             FND_MESSAGE.GET_ENCODED().
129 --
130 --             x_msg_data
131 --             The first message in the FND_MESSAGE stack
132 --
133 -- Version: Current Version 1.0
134 -- Previous Version :  None
135 --
136 -- Notes     :
137 --
138 ---------------------------------------------------------------------------------
139 PROCEDURE Remove_Object_Metadata (
140   p_object_type			IN IMC_OBJECT_METADATA.object_type%TYPE,
141   x_return_status		OUT NOCOPY VARCHAR2,
142   x_msg_count			OUT NOCOPY VARCHAR2,
143   x_msg_data			OUT NOCOPY VARCHAR2
144 );
145 
146 ---------------------------------------------------------------------------------
147 --
148 -- API name  : Get_Object_Metadata
149 --
150 -- TYPE      : Public
151 --
152 -- FUNCTION  : Retrieve metadata for an object. The description, function name,
153 --             parameter name, and enabled flag are returned.
154 --
155 -- Parameters:
156 --
157 --     IN    :
158 --             p_object_type IN VARCHAR2 (required)
159 --             Object for which metadata information should be retrieved.
160 --
161 --     OUT NOCOPY   :
162 --             x_metadata_info
163 --             A reference cursor returns the description, function name,
164 --             parameter name, and enabled flag, application id and
165 --             additional values (1 thru 5) for this object.
166 --
167 --             x_return_status
168 --             1 byte result code:
169 --                'S'  Success  (FND_API.G_RET_STS_SUCCESS)
170 --                'E'  Error  (FND_API.G_RET_STS_ERROR)
171 --                'U'  Unexpected Error (FND_API.G_RET_STS_UNEXP_ERROR)
172 --
173 --             x_msg_count
174 --             Number of messages in message stack.
175 --             If 'E' or 'U' is returned, there will be an error message on the
176 --             FND_MESSAGE stack which can be retrieved with
177 --             FND_MESSAGE.GET_ENCODED().
178 --
179 --             x_msg_data
180 --             The first message in the FND_MESSAGE stack
181 --
182 -- Version: Current Version 1.0
183 -- Previous Version :  None
184 --
185 -- Notes     :
186 --
187 ---------------------------------------------------------------------------------
188 PROCEDURE Get_Object_Metadata (
189   p_object_type                 IN IMC_OBJECT_METADATA.object_type%TYPE,
190   x_metadata_info		OUT NOCOPY ref_cursor_obj_metadata,
191   x_return_status		OUT NOCOPY VARCHAR2,
192   x_msg_count			OUT NOCOPY VARCHAR2,
193   x_msg_data			OUT NOCOPY VARCHAR2
194 );
195 
196 ---------------------------------------------------------------------------------
197 --
198 -- API name  : Get_Function_Name
199 --
200 -- TYPE      : Public
201 --
202 -- FUNCTION  : Fetch the function name for an object.
203 --
204 -- Parameters:
205 --
206 --     IN    :
207 --             p_object_type IN VARCHAR2 (required)
208 --             Object type for which function name should be retrieved.
209 --             If object type is invalid or if the function name has not been
210 --             set for the object type, NULL is returned.
211 --
212 --     OUT NOCOPY   :
213 --
214 -- Version: Current Version 1.0
215 -- Previous Version :  None
216 --
217 -- Notes     :
218 --
219 ---------------------------------------------------------------------------------
220 FUNCTION Get_Function_Name (
221   p_object_type			IN IMC_OBJECT_METADATA.object_type%TYPE
222 ) RETURN IMC_OBJECT_METADATA.function_name%TYPE;
223 
224 ---------------------------------------------------------------------------------
225 --
226 -- API name  : Get_Parameter_Name
227 --
228 -- TYPE      : Public
229 --
230 -- FUNCTION  : Fetch the parameter name for an object.
231 --
232 -- Parameters:
233 --
234 --     IN    :
235 --             p_object_type IN VARCHAR2 (required)
236 --             Object type for which parameter name should be retrieved.
237 --             If object type is invalid or if the parameter name has not been
238 --             set for the object type, NULL is returned.
239 --
240 --     OUT NOCOPY   :
241 --
242 -- Version: Current Version 1.0
243 -- Previous Version :  None
244 --
245 -- Notes     :
246 --
247 ---------------------------------------------------------------------------------
248 FUNCTION Get_Parameter_Name (
249   p_object_type			IN IMC_OBJECT_METADATA.object_type%TYPE
250 ) RETURN IMC_OBJECT_METADATA.parameter_name%TYPE;
251 
252 ---------------------------------------------------------------------------------
253 --
254 -- API name  : Get_Additional_Value
255 --
256 -- TYPE      : Public
257 --
258 -- FUNCTION  : Fetch the value of the "ADDITIONAL_VALUE" column (specified by
259 --             index -- there are five additional value columns) for this object
260 --             type.
261 --
262 -- Parameters:
263 --
264 --     IN    :
265 --             p_object_type IN VARCHAR2 (required)
266 --             Object type for which additional value should be retrieved.
267 --             If object type is invalid or if the function name has not been
268 --             set for the object type, NULL is returned.
269 --
270 --             p_index
271 --             Number (1-5) of the additional value column.
272 --
273 --     OUT NOCOPY   :
274 --
275 -- Version: Current Version 1.0
276 -- Previous Version :  None
277 --
278 -- Notes     :
279 --
280 ---------------------------------------------------------------------------------
281 FUNCTION Get_Additional_Value (
282   p_object_type                 IN IMC_OBJECT_METADATA.object_type%TYPE,
283   p_index                       IN NUMBER
284 ) RETURN VARCHAR2;
285 
286 ---------------------------------------------------------------------------------
287 --
288 -- API name  : Get_File_Name
289 --
290 -- TYPE      : Public
291 --
292 -- FUNCTION  : Fetch the name of the file corresponding to the function name
293 --             stored for this object.
294 --
295 -- Parameters:
296 --
297 --     IN    :
298 --             p_object_type IN VARCHAR2 (required)
299 --             Object type for which file name should be retrieved.
300 --             If object type is invalid or if the function name has not been
301 --             set for the object type, NULL is returned.
302 --
303 --     OUT NOCOPY   :
304 --
305 -- Version: Current Version 1.0
306 -- Previous Version :  None
307 --
308 -- Notes     :
309 --
310 ---------------------------------------------------------------------------------
311 FUNCTION Get_File_Name (
312   p_object_type			IN IMC_OBJECT_METADATA.object_type%TYPE
313 ) RETURN VARCHAR2;
314 
315 END IMC_OBJECT_METADATA_PUB;