DBA Data[Home] [Help]

PACKAGE: APPS.WF_NOTIFICATION_UTIL

Source


1 package WF_NOTIFICATION_UTIL as
2 /* $Header: wfntfs.pls 120.9.12010000.7 2009/02/26 01:36:28 alepe ship $ */
3 
4 
5   -- Global variables
6   g_NId                       number;
7 
8   g_init                      BOOLEAN := false;
9 
10   g_nls_language             varchar2(120)  ;
11   g_nls_territory            varchar2(120)  ;
12   g_nls_codeset              varchar2(30)   ;
13 
14   -- set default value if available
15   g_nls_date_format        VARCHAR2(120);
16   g_nls_Date_Language      varchar2(120);
17   g_nls_Calendar          varchar2(120);
18   g_nls_Sort              varchar2(120);
19   g_nls_Numeric_Characters varchar2(30);
20 
21   -- private
22   g_allowDeferDenormalize boolean := true; -- 8286459
23 
24 -- SetAttrEvent  Bug# 2376197
25 --   Set the value of a event notification attribute.
26 --   Attribute must be a EVENT-type attribute.
27 -- IN:
28 --   nid - Notification id
29 --   aname - Attribute Name
30 --   avalue - New value for attribute
31 --
32 procedure SetAttrEvent (nid    in  number,
33                         aname  in  varchar2,
34                         avalue in  wf_event_t);
35 
36 -- GetAttrEvent  Bug# 2376197
37 --   Get the value of a event notification attribute.
38 --   Attribute must be a EVENT-type attribute.
39 -- IN:
40 --   nid - Notification id
41 --   aname - Attribute Name
42 -- RETURNS:
43 --   Attribute value
44 
45 function GetAttrEvent (nid   in  number,
46                        aname in  varchar2)
47 return wf_event_t;
48 
49 
50 FUNCTION denormalize_rf(p_subscription_guid in     raw,
51                         p_event in out nocopy wf_event_t)
52 return varchar2;
53 
54 function CheckIllegalChar(bindparam  in  varchar2,
55                           raise_error in boolean default null)
56 return boolean;
57 
58 -- getNLSContext
59 --   get the NLS session parameters from USER ENV.
60 --
61 -- OUT:
62 --   p_nlsLanguage     : a varchar2 of the NLS_LANGUAGE
63 --   p_nlsTerritory    : a varchar2 of the NLS_TERRITORY
64 --   p_nlsCode
65 --   p_nlsDateFormat   : a varchar2 of the NLS_DATE_FORMAT
66 --   p_nlsDateLanguage : a varchar2 of the NLS_DATE_LANGUAGE
67 --   p_nlsNumericCharacters : a varchar2 of the nls numeric characters
68 --   p_nlsSort             : a varchar2 of the NLS_SORT
69 --   p_nlsCalendar         :    not will be used as of now but for future
70 --
71 procedure getNLSContext( p_nlsLanguage out NOCOPY varchar2,
72                          p_nlsTerritory out NOCOPY varchar2,
73                          p_nlsCode       out NOCOPY varchar2,
74                          p_nlsDateFormat out NOCOPY varchar2,
75                          p_nlsDateLanguage out NOCOPY varchar2,
76                          p_nlsNumericCharacters out NOCOPY varchar2,
77                          p_nlsSort out NOCOPY varchar2,
78                          p_nlsCalendar out NOCOPY varchar2 );
79 
80 --
81 -- SetNLSContext the NLS parameters like lang and territory of the current session
82 --
83 -- IN
84 --   p_nlsLanguage     - a varchar2 of the language code
85 --   p_nlsTerritory    - a varchar2 of the territory code.
86 --   p_nlsDateFormat   - a varchar2 of the nls_date_format
87 --   p_nlsDateLanguage - a varchar2 of the nls_date_language
88 --   p_nlsCalendar     - a varchar2 of the nls_calendar
89 --   p_nlsNumericCharacters - a varchar2 of the nls numeric characters
90 --   p_nlsSort              - a varchar2 of the NLS_SORT
91 
92 procedure SetNLSContext(p_nid  IN NUMBER DEFAULT null,
93                         p_nlsLanguage  in VARCHAR2 default null,
94                         p_nlsTerritory in VARCHAR2 default null,
95                         p_nlsDateFormat in VARCHAR2 default null,
96                         p_nlsDateLanguage in VARCHAR2 default null ,
97                         p_nlsNumericCharacters in VARCHAR2 default null,
98                         p_nlsSort in VARCHAR2 default null ,
99                         p_nlsCalendar in VARCHAR2 default null);
100 
101 --
102 --
103 -- setCurrentCalendar :
104 --       Sets NLS_CALENDAR parameter's value in global variables for fast accessing.
105 --       as this parameters may NOT be altered for a SESSION( Per IPG team : Database stores
106 --       all dates in Gregorian calendar)
107 --
108 -- in
109 --  p_nlsCalendar : varchar2
110 --
111 PROCEDURE setCurrentCalendar( p_nlsCalendar in varchar2) ;
112 
113 --
114 --
115 -- GetCurrentCalendar :
116 --       Gets NLS_CALENDAR parameter's value from global variables
117 --
118 --
119 --
120 FUNCTION GetCurrentCalendar RETURN varchar2;
121 
122 --
123 --
124 -- setGlobalNID :
125 --       Sets notification id parameter's value from global variables for fast accessing
126 --
127 -- IN
128 --  p_nid - A number for notification id
129 --
130 PROCEDURE SetCurrentNID ( p_nid in number) ;
131 
132 --
133 --
134 -- getGlobalNID :
135 --       Gets NLS_CALENDAR parameter's value from global variables for fast accessing
136 --
137 -- OUT
138 --  p_nlsCalendar
139 -- RETURN
140 --    a number of the Notification Id
141 FUNCTION GetCurrentNID  RETURN number;
142 
143 -- isLanguageInstalled
144 --   Checks if language is installed or not by querying on WF_LANGUAGE view.
145 -- IN
146 --   p_language : varchar2 The language to be checked.
147 -- RETURN
148 --   true if installed otherwise false
149 --
150 FUNCTION isLanguageInstalled( p_language IN VARCHAR2 DEFAULT null) RETURN boolean;
151 
152   /* (private)
153    *
154    * Returns date as formated text
155    * Parameters
156    * IN
157    *   p_nid         the notification_id, if you have it.
158    *   p_date        the date to convert from.
159    *   p_date_format the date mask, if you have it
160    *   p_addTime     TRUE to add time to the resulting text, FALSE otherwise
161    *                 (and if p_date_format does not include time format).
162    *
163    */
164   function GetCalendarDate(p_nid number default -1
165                          , p_date in date
166                          , p_date_format in varchar2 default null
167                          , p_addTime in boolean default false) return varchar2;
168 
169 end WF_NOTIFICATION_UTIL;