DBA Data[Home] [Help]

PACKAGE: APPS.XDP_ADAPTER

Source


1 PACKAGE XDP_ADAPTER AUTHID CURRENT_USER AS
2 /* $Header: XDPADBOS.pls 120.1 2005/06/08 23:40:12 appldev  $ */
3 
4  pv_SMParamDelimiter varchar2(1) 	:= ':';
5  pv_SMParamSpace varchar2(1) 		:= ' ';
6  pv_logFileExtension varchar2(4)        := '.log';
7 
8  -- TODO Statuses to be changed - sacsharm
9  -- pv_statusRunning varchar2(30) 	:= 'RUNNING';
10  -- pv_statusInUse varchar2(30) 	:= 'IN-USE';
11  -- pv_statusStopped varchar2(30) 	:= 'STOPPED';
12  -- pv_statusStarting varchar2(30) 	:= 'STARTING';
13  -- pv_statusSuspending varchar2(30) 	:= 'SUSPENDING';
14  -- pv_statusDisconnecting varchar2(30) := 'DISCONNECTING';
15  -- pv_statusStopping varchar2(30) 	:= 'STOPPING';
16 
17  pv_statusRunning varchar2(30) 		:= 'IDLE';
18  pv_statusInUse varchar2(30) 		:= 'BUSY';
19  pv_statusStopped varchar2(30) 		:= 'SHUTDOWN';
20  pv_statusStarting varchar2(30) 	:= 'STARTING UP';
21  pv_statusSuspending varchar2(30) 	:= 'MARKED FOR SUSPEND';
22  pv_statusDisconnecting varchar2(30) 	:= 'MARKED FOR DISCONNECT';
23  pv_statusStopping varchar2(30) 	:= 'MARKED FOR SHUTDOWN';
24 
25  -- Statuses - no changes
26  pv_statusSuspended varchar2(30) 	:= 'SUSPENDED';
27  pv_statusDisconnected varchar2(30) 	:= 'DISCONNECTED';
28  pv_statusError varchar2(30) 		:= 'ERROR';
29  pv_statusSessionLost varchar2(30) 	:= 'SESSION_LOST';
30  pv_statusReconnecting varchar2(30) 	:= 'RECONNECTING';
31 
32  -- New statuses 11.5.6
33  pv_statusConnecting varchar2(30) 	:= 'CONNECTING';
34  pv_statusTerminating varchar2(30) 	:= 'TERMINATING';
35  pv_statusResuming varchar2(30) 	:= 'RESUMING';
36  pv_statusNotAvailable varchar2(30) 	:= 'NOT_AVAILABLE';
37 
38 -- New statuses 11.5.6.1
39 pv_statusStoppedError varchar2(30) 	:= 'SHUTDOWN_ERROR';
40 pv_statusTerminated varchar2(30)	:= 'TERMINATED';
41 
42 -- New statuses 11.5.7G
43  pv_statusDeactivated varchar2(30) 	:= 'DEACTIVATED';
44  pv_statusDeactivatedSystem varchar2(30):= 'DEACTIVATED_SYSTEM';
45 
46  pv_startAutomatic varchar2(30) 	:= 'AUTOMATIC';
47  pv_startManual varchar2(30) 		:= 'MANUAL';
48  pv_startDisabled varchar2(30) 		:= 'DISABLED';
49 
50 -- New Startup modes 11.5.7G
51  pv_startGroup varchar2(30) 		:= 'GROUP';
52  pv_startOnDemand varchar2(30) 		:= 'START_ON_DEMAND';
53 
54  pv_opStartup varchar2(30) 		:= 'STARTUP';
55  pv_opStop varchar2(30) 		:= 'SHUTDOWN';
56  pv_opConnect varchar2(30) 		:= 'OPEN';
57  pv_opDisconnect varchar2(30) 		:= 'CLOSE';
58  pv_opSuspend varchar2(30) 		:= 'SUSPEND';
59  pv_opResume varchar2(30) 		:= 'RESUME';
60  pv_opFtpFile varchar2(30) 		:= 'FTP_FILE';
61  pv_opVerify varchar2(30) 		:= 'VERIFY';
62  pv_opTerminate varchar2(30) 		:= 'TERMINATE';
63 
64  pv_opDelete varchar2(30) 		:= 'DELETE';
65  pv_opUpdate varchar2(30) 		:= 'UPDATE';
66  pv_opGeneric varchar2(30) 		:= 'GENERIC';
67 
68  -- Added - sacsharm
69  pv_AppID number 			:= 535;
70 
71  --pv_retAdapterAsyncParamWrong number	:= 197020;
72  pv_retAdapterImplParamWrong number	:= 197021;
73  pv_retAdapterConnParamWrong number	:= 197022;
74  pv_retAdapterInboundParamWrong number	:= 197024;
75  pv_retAdapterCannotLock number 	:= 191392;
76  pv_retAdapterCannotLockReqSub number	:= 191405;
77  pv_retAdapterInvalidState number 	:= 191395;
78  pv_retAdapterOpFailed number 		:= 191394;
79  pv_retAdapterCommFailed number		:= 191407;
80  pv_retAdapterCtrlNotRunning number 	:= 191396;
81  pv_retAdapterOtherError number 	:= 20001;
82  pv_retAdapterMaxNumReached number 	:= 191194;
83  pv_retAdapterInvalidReqDate number	:= 191236;
84  pv_retFEAdapterRunning number		:= 191171;
85  pv_retAdapterNoGenExists number	:= 197012;
86  pv_retAdapterConfigNA number           := 197013;
87  pv_retAdapterAbnormalExit number       := 191107;
88  pv_retAdapterPipeError number		:= 197029;
89 
90  pv_AdapterTimeOut number 		:= -20620;
91  pv_AdapterSessionLost number		:= -20610;
92  pv_AdapterFailure number 		:= -20300;
93  pv_AdapterWarning number 		:= -20500;
94 
95  --pv_adminStatusPending varchar2(30) 	:= 'PENDING';
96  pv_adminStatusCompleted varchar2(30) 	:= 'COMPLETED';
97  pv_adminStatusSkipped varchar2(30) 	:= 'SKIPPED';
98  -- TODO Change to ERRORED
99  pv_adminStatusErrored varchar2(30) 	:= 'ERROR';
100 
101  pv_adminReqBySystem varchar2(30) 	:= 'SYSTEM';
102 
103  pv_errorObjectTypeAdapter varchar2(30)	:= 'ADAPTER';
104 
105  pv_AdapterExitCode			varchar2(40);
106 
107  pv_callerContextUser varchar2(30)	:= 'USER';
108  pv_callerContextAdmin varchar2(30)	:= 'ADMIN';
109  pv_callerContext varchar2(30)		:= pv_CallerContextUser;
110 
111  pv_applModeQueue varchar2(30) 		:= 'QUEUE';
112  pv_applModePipe varchar2(30) 		:= 'PIPE';
113  pv_applModeNone varchar2(30) 		:= 'NONE';
114 
115  -- Added end - sacsharm
116 
117   --Added - mviswana
118  pv_rolledStatusError  varchar2(30)      := 'ROLLED_STATUS_ERROR';
119  pv_rolledStatusRunning varchar2(30)     := 'ROLLED_STATUS_RUNNING';
120  pv_rolledStatusUnavailable varchar2(30) := 'ROLLED_STATUS_UNAVAILABLE';
121   --Added end -mviswana
122 
123  e_OperationFailure  	EXCEPTION;
124  e_OperationError  	EXCEPTION;
125  e_InvalidAdapterState  EXCEPTION;
126  e_UnabletoLockAdapter  EXCEPTION;
127  e_ControllerNotRunning EXCEPTION;
128 
129 -- Start of comments
130 --	API name	: Create_Adapter
131 --	Type		: Private
132 --	Purpose		: Creates a new adapter in the registration table
133 --	Pre-reqs	: None.
134 --	Parameters	:
135 --
136 --	IN		:
137 --			  p_FeName		VARCHAR2 	Required
138 --				The name of the fulfillment element for	which
139 --				this adapter is being created
140 --			  p_AdapterType		VARCHAR2	Required
141 --				The type of communication between SFM and the
142 --				fulfillment element.
143 --			  p_AdapterName 	VARCHAR2	Required
144 --				The adapter's consumer name, which only
145 --				applies with a usage mode of messaging.
146 --			  p_AdapterDispName	VARCHAR2	Required
147 --				The adapter's display name
148 --			  p_ConcQID		NUMBER		Required
149 --				The ID of the concurrent queue, the controller
150 -- 				that spawns the adapter instance
151 --			  p_startupMode	VARCHAR2	Optional
152 --				The startup mode which defines the adapter's
153 -- 				behavior when the SFM app
154 --			  p_UsageCode 		VARCHAR2	Optional
155 --				The usage mode which identifies a specific
156 -- 				use for the adapter
157 --			  p_LogLevel		VARCHAR2	Optional
158 --				The log level indicates the amount of
159 -- 				information to write to the adapter log file
160 --			  p_CODFlag		VARCHAR2	Optional
161 --				The connect on demand flag.  When this flag is
162 -- 				enabled, the connection between SFM and the
163 -- 				fulfillment element is established only when
164 -- 				there are orders to be processed
165 --			  p_MaxIdleTime		NUMBER		Optional
166 --				If the COD flag is enabled, this is the number
167 -- 				of minutes the adapter instance remains
168 -- 				connected to the remote system after there are
169 --				no more orders
170 --				to be processed
171 --			  p_LogFileName		VARCHAR2	Optional
172 --				The name of the file where log messages for
173 --				the adapter instances are written
174 --			  p_SeqINFE		NUMBER		Optional
175 --				The order in which the adapter instance	is
176 -- 				accessed when multiple adapter instances are
177 --				running for the same
178 --				fulfillment element
179 --			  p_CmdLineOpts		VARCHAR2	Optional
180 --				User defined command line options for the
181 -- 				adapter program
182 --			  p_CmdLineArgs		VARCHAR2	Optional
183 --			 	User defined command line arguments for	the
184 -- 				adapter program.  Only static values can be
185 --				passed as initialization args
186 --
187 --	OUT		:
188 --			  p_retcode  		NUMBER
189 --				This output argument is to indicate if the API
190 -- 				call has been made sucessfully.  The value of
191 --				0 means the call was made sucessfully, while
192 --				any non-zero value means otherwise.  The
193 -- 				caller must examine this parameter value after
194 --				the call is completed.  If the value is 0, the
195 -- 				caller routine must do commit, otherwise, the
196 -- 				caller routine must do a rollback
197 --			  p_errbuf  		VARCHAR2
198 --				The decription of the error encountered	when
199 --				the return_code is not 0
200 --
201 --	Version		: Current version	11.5
202 --	Notes		: None
203 --
204 -- End of comments
205  Procedure Create_Adapter(p_FeName in varchar2,
206 			    p_AdapterType in varchar2,
207 			    p_AdapterName in varchar2 default NULL,
208 			    p_AdapterDispName in varchar2,
209 			    p_ConcQID in number,
210 			    p_StartupMode in varchar2 default 'MANUAL',
211 			    p_UsageCode in varchar2 default 'NORMAL',
212 			    p_LogLevel in varchar2 default 'ERROR',
213 			    p_CODFlag in varchar2 default 'N',
214 			    p_MaxIdleTime in number default 0,
215 			    p_LogFileName in varchar2 default NULL,
216 			    p_SeqInFE in number default null,
217 			    p_CmdLineOpts in varchar2 default NULL,
218                             p_CmdLineArgs in varchar2 default NULL,
219 			    p_retcode	OUT NOCOPY NUMBER,
220 			    p_errbuf	OUT NOCOPY VARCHAR2
221 			);
222 
223 -- ************* Added - sacsharm - START *****************************
224 
225 -- Start of comments
226 --	API name	: Update_Adapter
227 --	Type		: Private
228 --	Purpose		: Updates an adapter
229 --	Pre-reqs	: None.
230 --	Parameters	:
231 --
232 --	IN		:
233 --			  p_ChannelName		VARCHAR2 	Required
234 --				Internally generated and unique name used by
235 --				the adapter instance to communicate with SFM
236 --			  p_AdapterName	VARCHAR2	Required
237 --			  p_AdapterDispName	VARCHAR2	Required
238 --			  p_ConcQID		NUMBER		Required
239 --				The ID of the concurrent queue, the controller
240 -- 				that spawns the adapter instance
241 --			  p_startupMode		VARCHAR2	Optional
242 --				The startup mode which defines the adapter's
243 -- 				behavior when the SFM app
244 --			  p_UsageCode 		VARCHAR2	Optional
245 --				The usage mode which identifies a specific
246 -- 				use for the adapter
247 --			  p_LogLevel		VARCHAR2	Optional
248 --				The log level indicates the amount of
249 -- 				information to write to the adapter log file
250 --			  p_CODFlag		VARCHAR2	Optional
251 --				The connect on demand flag.  When this flag is
252 -- 				enabled, the connection between SFM and the
253 -- 				fulfillment element is established only when
254 -- 				there are orders to be processed
255 --			  p_MaxIdleTime		NUMBER		Optional
256 --				If the COD flag is enabled, this is the number
257 -- 				of minutes the adapter instance remains
258 -- 				connected to the remote system after there are
259 --				no more orders
260 --				to be processed
261 --			  p_LogFileName		VARCHAR2	Optional
262 --				The name of the file where log messages for
263 --				the adapter instances are written
264 --			  p_SeqINFE		NUMBER		Optional
265 --				The order in which the adapter instance	is
266 -- 				accessed when multiple adapter instances are
267 --				running for the same
268 --				fulfillment element
269 --			  p_CmdLineOpts		VARCHAR2	Optional
270 --				User defined command line options for the
271 -- 				adapter program
272 --			  p_CmdLineArgs		VARCHAR2	Optional
273 --			 	User defined command line arguments for	the
274 -- 				adapter program.  Only static values can be
275 --				passed as initialization args
276 --	OUT		:
277 --			  p_retcode  		NUMBER
278 --				This output argument is to indicate if the API
279 -- 				call has been made sucessfully.  The value of
280 --				0 means the call was made sucessfully, while
281 --				any non-zero value means otherwise.  The
282 -- 				caller must examine this parameter value after
283 --				the call is completed.  If the value is 0, the
284 -- 				caller routine must do commit, otherwise, the
285 -- 				caller routine must do a rollback
286 --			  p_errbuf  		VARCHAR2
287 --				The decription of the error encountered	when
288 --				the return_code is not 0
289 --
290 --	Version 	: Current version	11.5
291 --	Notes		: None
292 --
293 --
294 -- End of comments
295 Procedure Update_Adapter(p_ChannelName in varchar2,
296 			    p_AdapterName in varchar2,
297 			    p_AdapterDispName in varchar2,
298 			    p_ConcQID in number,
299 			    p_StartupMode in varchar2 default 'MANUAL',
300 			    p_UsageCode in varchar2 default 'NORMAL',
301 			    p_LogLevel in varchar2 default 'ERROR',
302 			    p_CODFlag in varchar2 default 'N',
303 			    p_MaxIdleTime in number default 0,
304 			    p_LogFileName in varchar2 default NULL,
305 			    p_SeqInFE in number default null,
306 			    p_CmdLineOpts in varchar2 default NULL,
307                             p_CmdLineArgs in varchar2 default NULL,
308 			    p_retcode	OUT NOCOPY NUMBER,
309 			    p_errbuf	OUT NOCOPY VARCHAR2
310 			);
311 
312 -- Start of comments
313 --	API name	: Delete_Adapter
314 --	Type		: Private
315 --	Purpose		: Deletes an adapter
316 --	Pre-reqs	: None.
317 --	Parameters	:
318 --
319 --	IN		:
320 --			  p_ChannelName		VARCHAR2 	Required
321 --				Internally generated and unique name for the
322 --				adapter to be deleted
323 --
324 --	OUT		:
325 --			  p_retcode  		NUMBER
326 --				This output argument is to indicate if the API
327 -- 				call has been made sucessfully.  The value of
328 --				0 means the call was made sucessfully, while
329 --				any non-zero value means otherwise.  The
330 -- 				caller must examine this parameter value after
331 --				the call is completed.  If the value is 0, the
332 -- 				caller routine must do commit, otherwise, the
333 -- 				caller routine must do a rollback
334 --			  p_errbuf  		VARCHAR2
335 --				The decription of the error encountered	when
336 --				the return_code is not 0
337 --
338 --	Version		: Current version	11.5
339 --	Notes		: None
340 --
341 --
342 -- End of comments
343 PROCEDURE Delete_Adapter (p_ChannelName IN VARCHAR2,
344 			  p_retcode	OUT NOCOPY NUMBER,
345 			  p_errbuf	OUT NOCOPY VARCHAR2
346 			  );
347 
348 -- Start of comments
349 --	API name	: Delete_All_For_FE
350 --	Type		: Private
351 --	Purpose		: Deletes all adapters for an fulfillment element
352 --	Pre-reqs	: None.
353 --	Parameters	:
354 --
355 --	IN		:
356 --			  p_FeName		VARCHAR2 	Required
357 --				The name of the fulfillment element for whom
358 --				all adapters will be deleted
359 --
360 --	OUT		:
361 --			  p_retcode  		NUMBER
362 --				This output argument is to indicate if the API
363 -- 				call has been made sucessfully.  The value of
364 --				0 means the call was made sucessfully, while
365 --				any non-zero value means otherwise.  The
369 -- 				caller routine must do a rollback
366 -- 				caller must examine this parameter value after
367 --				the call is completed.  If the value is 0, the
368 -- 				caller routine must do commit, otherwise, the
370 --			  p_errbuf:  		VARCHAR2
371 --				The decription of the error encountered	when
372 --				the return_code is not 0
373 --
374 --	Version		: Current version	11.5
375 --	Notes		: None
376 --
377 --
378 -- End of comments
379 PROCEDURE Delete_All_For_FE (p_FeName IN VARCHAR2,
380 			  	  p_retcode	OUT NOCOPY NUMBER,
381 				  p_errbuf	OUT NOCOPY VARCHAR2
382 				);
383 
384 
385 -- Start of comments
386 --	API name	: Generic_Operation
387 --	Type		: Group
388 --	Purpose		: Runs the specified operation
389 --	Pre-reqs	: None.
390 --	Parameters	:
391 --
392 --	IN		:
393 --			  p_ChannelName	VARCHAR2 	Required
394 --				Internally generated and unique name for the
395 --				adapter
396 --			  p_OperationName	VARCHAR2	Required
397 --			  p_OperationParam 	VARCHAR2	Optional
398 --
399 --	OUT		:
400 --			  p_retcode  		NUMBER
401 --				This output argument is to indicate if the API
402 -- 				call has been made sucessfully.  The value of
403 --				0 means the call was made sucessfully, while
404 --				any non-zero value means otherwise.  The
405 -- 				caller must examine this parameter value after
406 --				the call is completed.  If the value is 0, the
407 -- 				caller routine must do commit, otherwise, the
408 -- 				caller routine must do a rollback
409 --			  p_errbuf  		VARCHAR2
410 --				The decription of the error encountered	when
411 --				the return_code is not 0
412 --
413 --	Version		: Current version	11.5
414 --	Notes		: None
415 --
416 --
417 -- End of comments
418 PROCEDURE Generic_Operation (p_ChannelName in varchar2,
419 				p_OperationName in varchar2,
420 				p_OperationParam in varchar2 default null,
421 				p_retcode	OUT NOCOPY NUMBER,
422 				p_errbuf	OUT NOCOPY VARCHAR2
423 				);
424 -- Start of comments
425 --	API name	: Verify_Adapter
426 --	Type		: Private
427 --	Purpose		: Checks the status of an adapter
428 --	Pre-reqs	: None.
429 --	Parameters	:
430 --
431 --	IN		:
432 --			  p_ChannelName		VARCHAR2 	Required
433 --				Internally generated and unique name for the
434 --				adapter
435 --			  p_OperationName	VARCHAR2	Required
436 --			  p_OperationParam 	VARCHAR2	Optional
437 --
438 --	OUT		:
439 --			  p_retcode  		NUMBER
440 --				This output argument is to indicate if the API
441 -- 				call has been made sucessfully.  The value of
442 --				0 means the call was made sucessfully, while
443 --				any non-zero value means otherwise.  The
444 -- 				caller must examine this parameter value after
445 --				the call is completed.  If the value is 0, the
446 -- 				caller routine must do commit, otherwise, the
447 -- 				caller routine must do a rollback
448 --			  p_errbuf  		VARCHAR2
449 --				The decription of the error encountered	when
450 --				the return_code is not 0
451 --
452 --	Version		: Current version	11.5
453 --	Notes		: None
454 --
455 --
456 -- End of comments
457 Procedure Verify_Adapter (p_ChannelName in varchar2,
458 				p_retcode	OUT NOCOPY NUMBER,
459 				p_errbuf	OUT NOCOPY VARCHAR2
460 				);
461 
462 -- ************* Added - sacsharm - END *****************************
463 
464 -- Start of comments
465 --	API name	: Create_Admin_Request
466 --	Type		: Private
467 --	Purpose		: Submits an adapter admin request
468 --	Pre-reqs	: None.
469 --	Parameters	:
470 --
471 --	IN		:
472 --			  p_ChannelName		VARCHAR2 	Required
473 --				Internally generated and unique name for the
474 --				adapter
475 --			  p_RequestType 	VARCHAR2	Required
476 --			  p_RequestDate		DATE		Optional
477 --			  p_RequestedBy		VARCHAR2	Optional
478 --			  p_Freq		NUMBER		Optional
479 --
480 --	OUT		:
481 --			  p_RequestID		NUMBER
482 --				The request ID for the created admin request
483 --			  p_JobID		NUMBER
484 --				The job ID for the created admin request
485 --			  p_retcode  		NUMBER
486 --				This output argument is to indicate if the API
487 -- 				call has been made sucessfully.  The value of
488 --				0 means the call was made sucessfully, while
489 --				any non-zero value means otherwise.  The
490 -- 				caller must examine this parameter value after
491 --				the call is completed.  If the value is 0, the
492 -- 				caller routine must do commit, otherwise, the
493 -- 				caller routine must do a rollback
494 --			  p_errbuf  		VARCHAR2
495 --				The decription of the error encountered	when
496 --				the return_code is not 0
497 --
498 --	Version		: Current version	11.5
499 --	Notes		: None
500 --
501 --
502 -- End of comments
503 Procedure Create_Admin_Request (p_ChannelName in varchar2,
504 				 p_RequestType in varchar2,
505 				 p_RequestDate in date default sysdate,
506 				 p_RequestedBy in varchar2 default null,
507 				 p_Freq in number default null,
508 				 p_RequestID OUT NOCOPY number,
509 				 p_JobID OUT NOCOPY number,
510 				 p_retcode	OUT NOCOPY NUMBER,
511 				 p_errbuf	OUT NOCOPY VARCHAR2
512 				);
516 --	Type		: Private
513 
514 -- Start of comments
515 --	API name	: Update_Admin_Request
517 --	Purpose		: Updates an adapter admin request
518 --	Pre-reqs	: None.
519 --	Parameters	:
520 --
521 --	IN		:
522 --			  p_RequestID		NUMBER		Required
523 --			  p_RequestDate		DATE		Optional
524 --			  p_RequestedBy		VARCHAR2	Optional
525 --			  p_Freq		NUMBER		Optional
526 --	OUT		:
527 --			  p_retcode  		NUMBER
528 --				This output argument is to indicate if the API
529 -- 				call has been made sucessfully.  The value of
530 --				0 means the call was made sucessfully, while
531 --				any non-zero value means otherwise.  The
532 -- 				caller must examine this parameter value after
533 --				the call is completed.  If the value is 0, the
534 -- 				caller routine must do commit, otherwise, the
535 -- 				caller routine must do a rollback
536 --			  p_errbuf  		VARCHAR2
537 --				The decription of the error encountered	when
538 --				the return_code is not 0
539 --
540 --	Version		: Current version	11.5
541 --	Notes		: None
542 --
543 --
544 -- End of comments
545 Procedure Update_Admin_Request (p_RequestID in number,
546 				p_RequestDate in date default sysdate,
547 				p_RequestedBy in varchar2 default null,
548 				p_Freq in number default null,
549 				p_retcode	OUT NOCOPY NUMBER,
550 				p_errbuf	OUT NOCOPY VARCHAR2
551 				);
552 
553 -- Start of comments
554 --	API name	: Delete_Admin_Request
555 --	Type		: Private
556 --	Purpose		: Removes an adapter admin request
557 --	Pre-reqs	: None.
558 --	Parameters	:
559 --
560 --	IN		:
561 --			  p_RequestID		NUMBER		Required
562 --	OUT		:
563 --			  p_retcode  		NUMBER
564 --				This output argument is to indicate if the API
565 -- 				call has been made sucessfully.  The value of
566 --				0 means the call was made sucessfully, while
567 --				any non-zero value means otherwise.  The
568 -- 				caller must examine this parameter value after
569 --				the call is completed.  If the value is 0, the
570 -- 				caller routine must do commit, otherwise, the
571 -- 				caller routine must do a rollback
572 --			  p_errbuf  		VARCHAR2
573 --				The decription of the error encountered	when
574 --				the return_code is not 0
575 --
576 --	Version		: Current version	11.5
577 --	Notes		: None
578 --
579 -- End of comments
580 Procedure Delete_Admin_Request (p_RequestID in number,
581 				p_retcode	OUT NOCOPY NUMBER,
582 				p_errbuf	OUT NOCOPY VARCHAR2
583 				);
584 
585 -- End of Adapter Admin Request Procedures
586 
587 --
588 -- The following procedures are used to perform Control operations on adapters
589 
590 -- Start of comments
591 --	API name	: Start_Adapter
592 --	Type		: Group
593 --	Purpose		: Performs startup control operation on an adapter
594 --	Pre-reqs	: None.
595 --	Parameters	:
596 --
597 --	IN		:
598 --			  p_ChannelName		VARCHAR2 	Required
599 --				Internally generated and unique name for an
600 --				adapter
601 --	OUT		:
602 --			  p_retcode   		NUMBER
603 --				This output argument is to indicate if the API
604 -- 				call has been made sucessfully.  The value of
605 --				0 means the call was made sucessfully, while
606 --				any non-zero value means otherwise.  The
607 -- 				caller must examine this parameter value after
608 --				the call is completed.  If the value is 0, the
609 -- 				caller routine must do commit, otherwise, the
610 -- 				caller routine must do a rollback
611 --			  p_errbuf   		VARCHAR2
612 --				The decription of the error encountered	when
613 --				the return_code is not 0
614 --
615 --	Version		: Current version	11.5
616 --	Notes		: None
617 --
618 -- End of comments
619 Procedure Start_Adapter	(p_ChannelName in varchar2,
620 				p_retcode	OUT NOCOPY NUMBER,
621 				p_errbuf	OUT NOCOPY VARCHAR2
622 				);
623 
624 -- Start of comments
625 --	API name	: Stop_Adapter
626 --	Type		: Group
627 --	Purpose		: Performs stop control operation on an adapter
628 --	Pre-reqs	: None.
629 --	Parameters	:
630 --
631 --	IN		:
632 --			  p_ChannelName 	VARCHAR2 	Required
633 --				Internally generated and unique name for an
634 --				adapter
635 --	OUT		:
636 --			  p_retcode   		NUMBER
637 --				This output argument is to indicate if the API
638 -- 				call has been made sucessfully.  The value of
639 --				0 means the call was made sucessfully, while
640 --				any non-zero value means otherwise.  The
641 -- 				caller must examine this parameter value after
642 --				the call is completed.  If the value is 0, the
643 -- 				caller routine must do commit, otherwise, the
644 -- 				caller routine must do a rollback
645 --			  p_errbuf   		VARCHAR2
646 --				The decription of the error encountered	when
647 --				the return_code is not 0
648 --
649 --	Version		: Current version	11.5
650 --	Notes		: None
651 --
652 --
653 -- End of comments
654 Procedure Stop_Adapter	(p_ChannelName in varchar2,
655 				p_retcode	OUT NOCOPY NUMBER,
656 				p_errbuf	OUT NOCOPY VARCHAR2
657 				);
658 
659 
660 -- Start of comments
661 --	API name	: Suspend_Adapter
662 --	Type		: Group
666 --			  maintains its connection to the remote system
663 --	Purpose		: Performs suspend control operation on an adapter.
664 --			  Stops the adapter instance from processing any
665 --			  inbound or outbound messages.  The adapter instance
667 --	Pre-reqs	: None.
668 --	Parameters	:
669 --
670 --	IN		:
671 --			  p_ChannelName 	VARCHAR2 	Required
672 --				Internally generated and unique name for an
673 --				adapter
674 --	OUT		:
675 --			  p_retcode   		NUMBER
676 --				This output argument is to indicate if the API
677 -- 				call has been made sucessfully.  The value of
678 --				0 means the call was made sucessfully, while
679 --				any non-zero value means otherwise.  The
680 -- 				caller must examine this parameter value after
681 --				the call is completed.  If the value is 0, the
682 -- 				caller routine must do commit, otherwise, the
683 -- 				caller routine must do a rollback
684 --			  p_errbuf   		VARCHAR2
685 --				The decription of the error encountered	when
686 --				the return_code is not 0
687 --
688 --	Version		: Current version	11.5
689 --	Notes		: None
690 --
691 -- End of comments
692 Procedure Suspend_Adapter (p_ChannelName in varchar2,
693 				p_retcode	OUT NOCOPY NUMBER,
694 				p_errbuf	OUT NOCOPY VARCHAR2
695 				);
696 -- Start of comments
697 --	API name	: Resume_Adapter
698 --	Type		: Group
699 --	Purpose		: Performs resume control operation on an adapter.
700 --			  Allows the adapter instance to process inbound and
701 --			  outbound messages
702 --	Pre-reqs	: None.
703 --	Parameters	:
704 --
705 --	IN		:
706 --			  p_ChannelName 	VARCHAR2 	Required
707 --				Internally generated and unique name for an
708 --				adapter
709 --	OUT		:
710 --			  p_retcode   		NUMBER
711 --				This output argument is to indicate if the API
712 -- 				call has been made sucessfully.  The value of
713 --				0 means the call was made sucessfully, while
714 --				any non-zero value means otherwise.  The
715 -- 				caller must examine this parameter value after
716 --				the call is completed.  If the value is 0, the
717 -- 				caller routine must do commit, otherwise, the
718 -- 				caller routine must do a rollback
719 --			  p_errbuf   		VARCHAR2
720 --				The decription of the error encountered	when
721 --				the return_code is not 0
722 --
723 --	Version		: Current version	11.5
724 --	Notes		: None
725 --
726 -- End of comments
727 Procedure Resume_Adapter (p_ChannelName in varchar2,
728 				p_retcode	OUT NOCOPY NUMBER,
729 				p_errbuf	OUT NOCOPY VARCHAR2
730 				);
731 -- Start of comments
732 --	API name	: Connect_Adapter
733 --	Type		: Group
734 --	Purpose		: Performs connect control operation on an adapter.
735 --			  Establishes a connection between the adapter instance
736 --			  and the remote system
737 --	Pre-reqs	: None.
738 --	Parameters	:
739 --
740 --	IN		:
741 --			  p_ChannelName 	VARCHAR2 	Required
742 --				Internally generated and unique name for an
743 --				adapter
744 --	OUT		:
745 --			  p_retcode   		NUMBER
746 --				This output argument is to indicate if the API
747 -- 				call has been made sucessfully.  The value of
748 --				0 means the call was made sucessfully, while
749 --				any non-zero value means otherwise.  The
750 -- 				caller must examine this parameter value after
751 --				the call is completed.  If the value is 0, the
752 -- 				caller routine must do commit, otherwise, the
753 -- 				caller routine must do a rollback
754 --			  p_errbuf   		VARCHAR2
755 --				The decription of the error encountered	when
756 --				the return_code is not 0
757 --
758 --	Version		: Current version	11.5
759 --	Notes		: None
760 --
761 -- End of comments
762 Procedure Connect_Adapter (p_ChannelName in varchar2,
763 				p_retcode	OUT NOCOPY NUMBER,
764 				p_errbuf	OUT NOCOPY VARCHAR2
765 				);
766 -- Start of comments
767 --	API name	: Disconnect_Adapter
768 --	Type		: Group
769 --	Purpose		: Performs disconnect control operation on an adapter.
770 --			  Releases the cnonection between the adapter instance
771 --			  and the remote system
772 --	Pre-reqs	: None.
773 --	Parameters	:
774 --
775 --	IN		:
776 --			  p_ChannelName 	VARCHAR2 	Required
777 --				Internally generated and unique name for an
778 --				adapter
779 --	OUT		:
780 --			  p_retcode   		NUMBER
781 --				This output argument is to indicate if the API
782 -- 				call has been made sucessfully.  The value of
783 --				0 means the call was made sucessfully, while
784 --				any non-zero value means otherwise.  The
785 -- 				caller must examine this parameter value after
786 --				the call is completed.  If the value is 0, the
787 -- 				caller routine must do commit, otherwise, the
788 -- 				caller routine must do a rollback
789 --			  p_errbuf   		VARCHAR2
790 --				The decription of the error encountered	when
791 --				the return_code is not 0
792 --
793 --	Version		: Current version	11.5
794 --	Notes		: None
795 --
796 -- End of comments
797 Procedure Disconnect_Adapter (p_ChannelName in varchar2,
798 				p_retcode	OUT NOCOPY NUMBER,
799 				p_errbuf	OUT NOCOPY VARCHAR2
800 				);
801 -- Start of comments
802 --	API name	: Terminate_Adapter
803 --	Type		: Group
804 --	Purpose		: Performs terminate control operation on an adapter.
805 --			  Kills the adapter process, a forceful shutdown
809 --	IN		:
806 --	Pre-reqs	: None.
807 --	Parameters	:
808 --
810 --			  p_ChannelName 	VARCHAR2 	Required
811 --				Internally generated and unique name for an
812 --				adapter
813 --	OUT		:
814 --			  p_retcode   		NUMBER
815 --				This output argument is to indicate if the API
816 -- 				call has been made sucessfully.  The value of
817 --				0 means the call was made sucessfully, while
818 --				any non-zero value means otherwise.  The
819 -- 				caller must examine this parameter value after
820 --				the call is completed.  If the value is 0, the
821 -- 				caller routine must do commit, otherwise, the
822 -- 				caller routine must do a rollback
823 --			  p_errbuf   		VARCHAR2
824 --				The decription of the error encountered	when
825 --				the return_code is not 0
826 --
827 --	Version		: Current version	11.5
828 --	Notes		: None
829 --
830 -- End of comments
831 Procedure Terminate_Adapter (p_ChannelName in varchar2,
832 				p_retcode	OUT NOCOPY NUMBER,
833 				p_errbuf	OUT NOCOPY VARCHAR2
834 				);
835 
836 -- Start of comments
837 --	API name	: Get_Adapter_Exit_Code
838 --	Type		: Private
839 --	Purpose		: Performs terminate control operation on an adapter.
840 --			  Kills the adapter process, a forceful shutdown
841 --	Pre-reqs	: None.
842 --	Parameters	:
843 --
844 --		IN	:
845 --			  p_ChannelName 	VARCHAR2 	Required
846 --				Internally generated and unique name for an
847 --				adapter
848 --	Returns 	: VARCHAR2
849 --				The adapter's exit code
850 --	Version		: Current version	11.5
851 --	Notes		: None
852 --
853 -- End of comments
854 
855 Function get_adapter_exit_code return varchar2;
856 FUNCTION  Is_Adapter_Configured(p_fe_id in number) return BOOLEAN;
857 
858 PROCEDURE Verify_Running_Adapters (p_controller_instance_id IN NUMBER,
859 				x_adapter_info OUT NOCOPY VARCHAR2,
860 				p_retcode	OUT NOCOPY NUMBER,
861 				p_errbuf	OUT NOCOPY VARCHAR2
862 				);
863 
864 -- Start of comments
865 --	API name	: Get_Adapter_Log_File_URL
866 --	Type		: Private
867 --	Purpose		: Returns the URL from which the user can view the
868 --			  adapter log file.  This URL can only be accessed
869 --			  once.
870 --	Pre-reqs	: None.
871 --	Parameters	:
872 --
873 --		IN	:
874 --			  p_ChannelName 	VARCHAR2 	Required
875 --				Internally generated and unique name for an
876 --				adapter
877 --			  p_gwyuid		VARCHAR2	Required
878 --				The guest user id for the database instance
879 --			  p_two_task		VARCHAR2	Required
880 --				TWO_TASK of the database instance
881 --	Returns 	: VARCHAR2
882 --				The URL to access the adapter log file
883 --	Version		: Current version	11.5
884 --	Notes		: This API will only work if the log file ends
885 --			  in '.log'.
886 --
887 -- End of comments
888 FUNCTION Get_Adapter_Log_File_URL(p_channel_name in VARCHAR2,
889                              p_gwyuid in VARCHAR2,
890                              p_two_task in VARCHAR2) return VARCHAR2;
891 
892 -- Start of comments
893 --	API name	: Get_Adapter_Log_File_URL
894 --	Type		: Private
895 --	Purpose		: Appends '.log' to the specified string if it
896 --			  is not already appended.
897 --	Pre-reqs	: None.
898 --	Parameters	:
899 --
900 --		IN	:
901 --			  p_file_name 	VARCHAR2 	Required
902 --				The string to append to
903 --	Returns 	: VARCHAR2
904 --				The adapter log file name with '.log'
905 --				appended if it was not present already.
906 --	Version		: Current version	11.5
907 --	Notes		: None
908 --
909 -- End of comments
910 FUNCTION Add_Log_File_Extension(p_file_name in VARCHAR2) return VARCHAR2;
911 
912 Procedure Verify_All_Adapters ( p_retcode	OUT NOCOPY NUMBER,
913 				p_errbuf	OUT NOCOPY VARCHAR2
914 				);
915 
916 Procedure Verify_Adapters (p_FilterType IN varchar2,
917 				p_FilterKey 	IN VARCHAR2,
918 				p_retcode	OUT NOCOPY NUMBER,
919 				p_errbuf	OUT NOCOPY VARCHAR2
920 				);
921 
922 Procedure Reset_SysDeactivated_Adapter (p_ChannelName in varchar2,
923 			p_ResetStatusFlag in boolean default true);
924 
925 PROCEDURE Reset_SysDeactivated_Adapters (p_controller_instance_id IN NUMBER);
926 
927 END XDP_ADAPTER;