DBA Data[Home] [Help]

PACKAGE: APPS.FND_SVC_COMPONENT

Source


1 package FND_SVC_COMPONENT authid current_user as
2 /* $Header: AFSVCMPS.pls 120.1 2005/07/02 04:18:47 appldev ship $ */
3 
4 --
5 -- Package variables
6 --
7 pv_Package_Name VARCHAR2(30)           := 'FND_SVC_COMPONENT';
8 pv_Connection_Name_Prefix VARCHAR2(30) := 'SVC';
9 
10 pv_Container_Status_Running varchar2(30) := 'RUNNING';
11 pv_Container_Status_Stopping varchar2(30) := 'STOPPING';
12 pv_Container_Status_Stopped varchar2(30) := 'STOPPED';
13 
14 pv_callerContextUser varchar2(30)	:= 'USER';
15 pv_callerContextAdmin varchar2(30)	:= 'ADMIN';
16 pv_callerContext varchar2(30)		:= pv_CallerContextUser;
17 
18 pv_retOtherComponentError number 	:= 7000;
19 pv_retInvalidComponentState number 	:= 7001;
20 pv_retContainerNotRunning number 	:= 7002;
21 
22 --
23 -- Keep the following constants in sync with those in
24 -- oracle.apps.oam.common.OAMConstants
25 --
26 pv_OAM_Status_Down         NUMBER := 0;
27 pv_OAM_Status_Warning      NUMBER := 1;
28 pv_OAM_Status_Up           NUMBER := 2;
29 pv_OAM_Status_NA           NUMBER := 3;
30 pv_OAM_Status_Not_Started  NUMBER := 5;
31 pv_OAM_Status_Cancel       NUMBER := 7;
32 
33 --
34 -- Keep the following constants in sync with those in
35 -- oracle.apps.cp.gsc.SvcComponentContainerInterface
36 --
37 pv_Key_Container_Log_Level VARCHAR2(30) := 'SVC_CONTAINER_LOG_LEVEL';
38 
39 --
40 -- Keep the following constants in sync with those in
41 -- oracle.apps.cp.gsc.server.SvcComponentEO
42 --
43 pv_Container_Type_GSM VARCHAR2(30)     := 'GSM';
44 pv_Container_Type_Servlet VARCHAR2(30) := 'SERV';
45 
46 pv_Status_Not_Configured varchar2(30) 	:= 'NOT_CONFIGURED';
47 pv_Status_Starting varchar2(30) 	:= 'STARTING';
48 pv_Status_Running varchar2(30) 		:= 'RUNNING';
49 pv_Status_Suspending varchar2(30) 	:= 'SUSPENDING';
50 pv_Status_Suspended varchar2(30) 	:= 'SUSPENDED';
51 pv_Status_Resuming varchar2(30) 	:= 'RESUMING';
52 pv_Status_Stopping varchar2(30) 	:= 'STOPPING';
53 pv_Status_Stopped varchar2(30) 		:= 'STOPPED';
54 pv_Status_Stopped_Error varchar2(30) 	:= 'STOPPED_ERROR';
55 pv_Status_Deactivated_User varchar2(30) := 'DEACTIVATED_USER';
56 pv_Status_Deactivated_System varchar2(30):= 'DEACTIVATED_SYSTEM';
57 
58 pv_Startup_Mode_Automatic varchar2(30) 	:= 'AUTOMATIC';
59 pv_Startup_Mode_Manual varchar2(30) 	:= 'MANUAL';
60 pv_Startup_Mode_On_Demand varchar2(30) 	:= 'ON_DEMAND';
61 
62 pv_opStart varchar2(30) 		:= 'START';
63 pv_opStop varchar2(30) 			:= 'STOP';
64 pv_opSuspend varchar2(30) 		:= 'SUSPEND';
65 pv_opResume varchar2(30) 		:= 'RESUME';
66 pv_opRefresh varchar2(30) 		:= 'REFRESH';
67 pv_opUpdate varchar2(30) 		:= 'UPDATE';
68 pv_opDelete varchar2(30) 		:= 'DELETE';
69 pv_opGeneric varchar2(30) 		:= 'GENERIC';
70 
71 pv_Event_Start varchar2(100) 		:= 'oracle.apps.fnd.cp.gsc.SvcComponent.start';
72 pv_Event_Stop varchar2(100) 		:= 'oracle.apps.fnd.cp.gsc.SvcComponent.stop';
73 pv_Event_Suspend varchar2(100) 		:= 'oracle.apps.fnd.cp.gsc.SvcComponent.suspend';
74 pv_Event_Resume varchar2(100) 		:= 'oracle.apps.fnd.cp.gsc.SvcComponent.resume';
75 pv_Event_Refresh varchar2(100) 		:= 'oracle.apps.fnd.cp.gsc.SvcComponent.refresh';
76 
77 pv_adminStatusCompleted varchar2(30) 	:= 'COMPLETED';
78 pv_adminStatusSkipped varchar2(30) 	:= 'SKIPPED';
79 pv_adminStatusErrored varchar2(30) 	:= 'ERRORER';
80 
81 PROCEDURE Delete_Request
82           ( p_component_request_id IN NUMBER);
83 
84 FUNCTION Get_OAM_Rolled_Status_By_Type
85          ( p_component_type    IN VARCHAR2 default NULL)
86          RETURN NUMBER;
87 
88 PROCEDURE Execute_Request
89           ( p_component_request_id IN NUMBER);
90 
91 PROCEDURE Insert_Param_Vals
92           ( p_component_type    IN VARCHAR2
93           , p_component_id      IN NUMBER);
94 
95 PROCEDURE Validate_Operation
96 		(p_Component_Id        IN NUMBER,
97 		p_Control_Operation   IN VARCHAR2,
98 		p_retcode	OUT NOCOPY NUMBER,
99 		p_errbuf	OUT NOCOPY VARCHAR2);
100 
101 PROCEDURE Get_Container_Status
102          ( p_container_type     IN VARCHAR2
103          , p_container_name     IN VARCHAR2
104 	 , p_container_status	OUT NOCOPY VARCHAR2
105 	 , p_process_id		OUT NOCOPY NUMBER);
106 
107 PROCEDURE Name_Container_Session
108           ( p_container_type IN VARCHAR2
109           , p_container_name IN VARCHAR2
110 	  , p_process_id IN NUMBER
111 	  , p_action_name IN VARCHAR2 default null);
112 
113 FUNCTION Retrieve_Parameter_Value
114           ( p_parameter_name    IN VARCHAR2
115           , p_component_id      IN NUMBER)
116          RETURN VARCHAR2;
117 
118 PROCEDURE Reset_Container_Components
119          ( p_container_type     IN VARCHAR2
120          , p_container_name     IN VARCHAR2);
121 
122 Function Get_Current_Status (p_Component_Id in NUMBER) return varchar2;
123 
124 
125 -- Start of comments
126 --	API name	: Start
127 --	Type		: Group
128 --	Purpose		: Performs startup control operation on an component
129 --	Pre-reqs	: None.
130 --	Parameters	:
131 --
132 --	IN		:
133 --			  p_Component_Id	NUMBER 	Required
134 --				Internally generated and unique id for an
135 --				component
136 --	OUT		:
137 --			  p_retcode   		NUMBER
138 --				This output argument is to indicate if the API
139 -- 				call has been made sucessfully.  The value of
140 --				0 means the call was made sucessfully, while
141 --				any non-zero value means otherwise.  The
142 -- 				caller must examine this parameter value after
143 --				the call is completed.  If the value is 0, the
144 -- 				caller routine must do commit, otherwise, the
145 -- 				caller routine must do a rollback
146 --			  p_errbuf   		VARCHAR2
147 --				The decription of the error encountered	when
148 --				the return_code is not 0
149 --
150 --	Version		: Current version	11.5
151 --	Notes		: None
152 --
153 -- End of comments
154 
155 Procedure Start_Component (p_Component_Id in number,
156 		p_retcode	OUT NOCOPY NUMBER,
157 		p_errbuf	OUT NOCOPY VARCHAR2
158 		);
159 
160 -- Start of comments
161 --	API name	: Stop
162 --	Type		: Group
163 --	Purpose		: Performs stop control operation on an component
164 --	Pre-reqs	: None.
165 --	Parameters	:
166 --
167 --	IN		:
168 --			  p_Component_Id 	NUMBER 	Required
169 --				Internally generated and unique id for an
170 --				component
171 --	OUT		:
172 --			  p_retcode   		NUMBER
173 --				This output argument is to indicate if the API
174 -- 				call has been made sucessfully.  The value of
175 --				0 means the call was made sucessfully, while
176 --				any non-zero value means otherwise.  The
177 -- 				caller must examine this parameter value after
178 --				the call is completed.  If the value is 0, the
179 -- 				caller routine must do commit, otherwise, the
180 -- 				caller routine must do a rollback
181 --			  p_errbuf   		VARCHAR2
182 --				The decription of the error encountered	when
183 --				the return_code is not 0
184 --
185 --	Version		: Current version	11.5
186 --	Notes		: None
187 --
188 --
189 -- End of comments
190 
191 Procedure Stop_Component	(p_Component_Id in NUMBER,
192 				p_retcode	OUT NOCOPY NUMBER,
193 				p_errbuf	OUT NOCOPY VARCHAR2
194 				);
195 
196 
197 -- Start of comments
198 --	API name	: Suspend
199 --	Type		: Group
200 --	Purpose		: Performs suspend control operation on an component.
201 --			  Stops the component instance from processing any
202 --			  messages.  The component instance
203 --			  may maintains its connection to the remote system
204 --	Pre-reqs	: None.
205 --	Parameters	:
206 --
207 --	IN		:
208 --			  p_Component_Id 	NUMBER 	Required
209 --				Internally generated and unique id for an
210 --				component
211 --	OUT		:
212 --			  p_retcode   		NUMBER
213 --				This output argument is to indicate if the API
214 -- 				call has been made sucessfully.  The value of
215 --				0 means the call was made sucessfully, while
216 --				any non-zero value means otherwise.  The
217 -- 				caller must examine this parameter value after
218 --				the call is completed.  If the value is 0, the
219 -- 				caller routine must do commit, otherwise, the
220 -- 				caller routine must do a rollback
221 --			  p_errbuf   		VARCHAR2
222 --				The decription of the error encountered	when
223 --				the return_code is not 0
224 --
225 --	Version		: Current version	11.5
226 --	Notes		: None
227 --
228 -- End of comments
229 Procedure Suspend_Component (p_Component_Id in NUMBER,
230 				p_retcode	OUT NOCOPY NUMBER,
231 				p_errbuf	OUT NOCOPY VARCHAR2
232 				);
233 
234 -- Start of comments
235 --	API name	: Resume
236 --	Type		: Group
237 --	Purpose		: Performs resume control operation on an component.
238 --			  Allows the component instance to process messages
239 --	Pre-reqs	: None.
240 --	Parameters	:
241 --
242 --	IN		:
243 --			  p_Component_Id 	NUMBER 	Required
244 --				Internally generated and unique id for an
245 --				component
246 --	OUT		:
247 --			  p_retcode   		NUMBER
248 --				This output argument is to indicate if the API
249 -- 				call has been made sucessfully.  The value of
250 --				0 means the call was made sucessfully, while
251 --				any non-zero value means otherwise.  The
252 -- 				caller must examine this parameter value after
253 --				the call is completed.  If the value is 0, the
254 -- 				caller routine must do commit, otherwise, the
255 -- 				caller routine must do a rollback
256 --			  p_errbuf   		VARCHAR2
257 --				The decription of the error encountered	when
258 --				the return_code is not 0
259 --
260 --	Version		: Current version	11.5
261 --	Notes		: None
262 --
263 -- End of comments
264 Procedure Resume_Component (p_Component_Id in NUMBER,
265 				p_retcode	OUT NOCOPY NUMBER,
266 				p_errbuf	OUT NOCOPY VARCHAR2
267 				);
268 
269 
270 Procedure Refresh_Component (p_Component_Id in NUMBER,
271 				p_params	IN VARCHAR2,
272 				p_retcode	OUT NOCOPY NUMBER,
273 				p_errbuf	OUT NOCOPY VARCHAR2
274 				);
275 
276 Procedure Generic_Operation (p_Component_Id in NUMBER,
277 				p_Control_Event	IN VARCHAR2,
278 				p_params	IN VARCHAR2,
279 				p_retcode	OUT NOCOPY NUMBER,
280 				p_errbuf	OUT NOCOPY VARCHAR2
281 				);
282 
283 PROCEDURE Refresh_Container_Log_Level
284          ( p_container_type     IN VARCHAR2,
285            p_container_name     IN VARCHAR2,
286            p_log_level		IN NUMBER,
287            p_retcode		OUT NOCOPY NUMBER,
288            p_errbuf		OUT NOCOPY VARCHAR2);
289 
290 PROCEDURE Verify_Container
291          ( p_container_type     IN VARCHAR2
292          , p_container_name     IN VARCHAR2);
293 
294 PROCEDURE Verify_All_Containers ;
295 
296 --
297 -- Update_Status
298 --   Procedure to update the status of the given Service Component
299 --   If the component staus is either STOPPED_ERROR or DEACTIVATED_SYSTEM
300 --   then a System Alert is raised with the pre-defined message.
301 --   For more information, refer Bug 3786007.
302 --
303 PROCEDURE Update_Status (p_Component_Id      IN NUMBER,
304 			 p_Status            IN VARCHAR2,
305 			 p_Status_Info       IN VARCHAR2 default null,
306 			 p_Last_Updated_By   IN NUMBER   default 0,
307 			 p_Last_Update_Login IN NUMBER   default null);
308 
309 --
310 -- Get_Component_Status
311 --   Function that returns the current status of the given Component
312 --   after verifying its Container status
313 -- IN
314 --   p_Component_Name     - Component Name
315 --
316 FUNCTION Get_Component_Status
317          (p_Component_Name IN VARCHAR2)
318          RETURN VARCHAR2;
319 
320 END FND_SVC_COMPONENT;