DBA Data[Home] [Help]

PACKAGE: APPS.ARP_MESSAGE

Source


1 PACKAGE ARP_MESSAGE AUTHID CURRENT_USER as
2 /* $Header: ARHAMSGS.pls 115.1 2002/12/04 21:28:34 jypandey noship $ */
3 
4 /*------------------------------- EXCEPTIONS --------------------------------*/
5 ABORT EXCEPTION;	-- Raise when server program should abort and
6 			-- return processing to the client.
7 
8 /*-------------------------------- ROUTINES ---------------------------------*/
9 
10 --
11 -- NAME
12 --   Initialize
13 --
14 -- PURPOSE
15 --   Initializes package ARP_MESSAGE to control how messages are stored
16 --   (either in a db table or in memory) and sets the request_id of
17 --   the concurrent program using this package.
18 --
19 -- ARGUMENTS
20 --   Output_Code	Possible values are 'TABLE' and 'STACK'
21 --   			'TABLE' specifies that messages should be inserted
22 --			into the table AR_CONC_REQUEST_MESSAGES
23 --
24 --			'STACK' specifies that messages should be stored
25 --			in memory on the message stack.
26 --
27 --   Debug_Flag		Enables or Disables Debug Mode.  ('Y' or 'N')
28 --   Debug_Outut_Code	Same logic as above but applies to debugging
29 --			messages.
30 -- NOTES
31 --   Initialize should be the first call to package ARP_MESSAGE.
32 --   Output_Code defaults to 'STACK' and Conc_Request_Id defaults to 0
33 --   if Initialize is not called.
34 --   References to 'Output Buffer' below refer to AR_CONC_REQUEST_MESSAGES or
35 --   the message stack depending on initialization.
36 --
37 PROCEDURE Initialize(Output_Code 	VARCHAR2,
38 		     Conc_Request_Id 	NUMBER,
39 		     Debug_Flag		VARCHAR2 Default 'N',
40 		     Debug_Output_Code 	VARCHAR2 Default 'STACK');
41 
42 --
43 -- NAME
44 --   Put_Line
45 --
46 -- PURPOSE
47 --   Writes a NON-TRANSLATED message to the output buffer.
48 --
49 -- NOTES
50 --   Same as Set_Line.  This will be removed eventually.
51 --
52 --
53 PROCEDURE Put_Line(Message_Text IN VARCHAR2);
54 
55 
56 --
57 -- NAME
58 --   Set_Line
59 --
60 -- PURPOSE
61 --   Writes a NON-TRANSLATED message to the output buffer.
62 --
63 PROCEDURE Set_Line(Message_Text IN VARCHAR2);
64 
65 
66 --
67 -- NAME
68 --   Flush
69 --
70 -- PURPOSE
71 --   Flush is called to ensure that all translated messages that have
72 --   been set with Set_Name will be inserted in AR_CONC_REQUEST_MESSAGES
73 --   if Initialize has been called with Output_Code = 'TABLE'
74 --
75 -- USAGE
76 --   Flush is not applicable when Output_Code = 'STACK'.
77 --   Flush should be called after the last call to ARP_MESSAGE before
78 --   program control is returned to the client calling program.
79 --
80 PROCEDURE Flush;
81 
82 --
83 -- NAME
84 --   Debug
85 --
86 -- PURPOSE
87 --   Writes a non-translated message to the output buffer only when
88 --   the value for profile option AR_DEBUG = 'Y' or is NULL.
89 --
90 PROCEDURE Debug(Message_Text IN VARCHAR2);
91 
92 
93 --
94 -- NAME
95 --   Set_Name
96 --
97 -- PURPOSE
98 --   Puts a Message Dictionary message on the message stack.
99 --   (Same syntax as FND_MESSAGE.Set_Name)
100 --
101 PROCEDURE Set_Name(Appl_Short_Name IN VARCHAR2,
102 		   Message_Name    IN VARCHAR2);
103 
104 --
105 -- NAME
106 --   Set_Token
107 --
108 -- PURPOSE
109 --   Sets the token of the current message on the message stack.
110 --   (Same syntax as FND_MESSAGE.Set_Token
111 --
112 PROCEDURE Set_Token(Token_Name 	IN VARCHAR2,
113 		    Token_Value IN VARCHAR2,
114 		    Translate   IN BOOLEAN Default False);
115 
116 --
117 -- NAME
118 --   Get
119 --
120 -- PURPOSE
121 --   Gets the current message from the output buffer.
122 --
123 -- Arguments
124 --   Message_Buf	The target variable for the message.
125 --   Message_Type	The target variable for the message type.
126 --   Status 		The Target variable for the length of the message
127 --			retrieved.  If no more messages are stored in the
128 --			output buffer then Status = 0;
129 --
130 PROCEDURE Get(Message_Buf    OUT NOCOPY VARCHAR2,
131 	      Message_Type   OUT NOCOPY VARCHAR2,
132 	      Status         OUT NOCOPY NUMBER);
133 
134 --
135 -- NAME
136 --   Get
137 --
138 -- PURPOSE
139 --   Gets the current message from the output buffer.
140 --
141 -- Arguments
142 --   Message_Buf        The target variable for the message.
143 --   Message_Type       The target variable for the message type.
144 --   Creation_Date      The target variable for the message creation date.
145 --   Status             The Target variable for the length of the message
146 --                      retrieved.  If no more messages are stored in the
147 --                      output buffer then Status = 0;
148 --
149 PROCEDURE Get(Message_Buf    OUT NOCOPY VARCHAR2,
150               Message_Type   OUT NOCOPY VARCHAR2,
151               Creation_Date  OUT NOCOPY VARCHAR2,
152               Status         OUT NOCOPY NUMBER);
153 --
154 -- NAME
155 --   Set_Error
156 --
157 -- PURPOSE
158 --   Writes the error message of the most recently encountered
159 --   Oracle Error to the output buffer.
160 --
161 -- Arguments
162 --   Routine		The name of the routine where the Oracle Error
163 --			occured. (Optional)
164 --   Context		Any context information relating to the error
165 --			(e.g. Customer_Id) (Optional)
166 --
167 PROCEDURE Set_Error(Routine IN VARCHAR2 Default NULL,
168 		    Context IN VARCHAR2 Default NULL);
169 
170 --
171 -- Obsolete.  This will be deleted shortly.
172 -- Use Set_Error instead.
173 --
174 PROCEDURE Put_DB_Error(Routine IN VARCHAR2 Default NULL,
175 		       Context IN VARCHAR2 Default NULL);
176 
177 --
178 -- NAME
179 --   Clear
180 --
181 -- PURPOSE
182 --   Clears the message stack and frees memory used by it.
183 --
184 PROCEDURE Clear;
185 
186 
187 --
188 -- NAME
189 --
190 -- PURPOSE
191 --   Returns the number of messages currently on the message stack.
192 --
193 FUNCTION Message_Count Return NUMBER;
194 
195 
196 --
197 -- NAME
198 --   Purge_Messages
199 --
200 -- PURPOSE
201 --   When the output buffer is AR_CONC_REQUEST_MESSAGES, this procedure will
202 --   delete any messages from AR_CONC_REQUEST_MESSAGES for the current
203 --   request id.
204 --
205 -- USAGE
206 --   Call Purge_Messages after the client calling program has
207 --   completed writing a log file or displayed the appropriate messages
208 --   in a report.
209 --
210 PROCEDURE Purge_Messages(X_Request_Id IN NUMBER);
211 
212 
213 --
214 -- NAME
215 --   Last_Message_Sequence
216 --
217 -- PURPOSE
218 --   Returns the last value for
219 --   AR_CONC_REQUEST_MESSAGES.Conc_Request_Message_Id used by the current
220 --   session.
221 --
222 FUNCTION Last_Message_Sequence RETURN NUMBER;
223 
224 --
225 -- NAME
226 --   Get_Last_Few_Messages
227 --
228 -- PURPOSE
229 --   Returns the last specified number of messages concatenated
230 --
231 FUNCTION Get_Last_Few_Messages(num IN NUMBER) RETURN VARCHAR2;
232 
233 END ARP_MESSAGE;