1 package WF_BES_CACHE AUTHID CURRENT_USER as
2 /* $Header: WFBECACS.pls 120.0 2005/09/02 15:15:18 vshanmug noship $ */
3
4 -- Timestamp at which the session's cache was initialized
5 g_LastCacheUpdate date := null;
6
7 -- Local system information
8 g_local_system_name varchar2(30);
9 g_local_system_guid raw(16);
10 g_local_system_status varchar2(30);
11 g_schema_name varchar2(80);
12
13 -- SetMetaDataUploaded
14 -- This procedure is called from the BES table handlers when meta-data
15 -- is being uploaded to the database tables. This procedure sets a BES
16 -- caching context with the sysdate when the meta-data is loaded.
17 procedure SetMetaDataUploaded;
18
19 -- CacheValid
20 -- This function validates if the current session's cache is valid or
21 -- not. This procedure compares the time at which the meta-data was
22 -- loaded into the database with the time at which the sessions cache
23 -- was initialized. If the former is greater than the latter, new data
24 -- has been uploaded to the database and cache is invalid.
25 -- RETURN
26 -- Boolean status of whether cache is valid or not
27 function CacheValid
28 return boolean;
29
30 -- GetEventByName
31 -- This function returns an instance of WF_Event_Obj object type which
32 -- contains the complete event information along with valid subscriptions
33 -- to the event. The information could come from the cache memory or from
34 -- the database.
35 -- IN
36 -- p_event_name - Event name whose information is required
37 function GetEventByName(p_event_name in varchar2)
38 return wf_event_obj;
39
40 -- GetSubscriptions
41 -- This function returns a table of WF_EVENT_SUBS_OBJ that are the valid
42 -- subscriptions to the given event.
43 function GetSubscriptions(p_event_name in varchar2,
44 p_source_type in varchar2,
45 p_source_agent in raw)
46 return wf_event_subs_tab;
47
48 -- GetSubscriptionByGUID
49 -- This function returns a WF_EVENT_SUBS_OBJ that contains the subscription
50 -- to the given event and mathing the given subscription GUID.
51 function GetSubscriptionByGUID(p_event_name in varchar2,
52 p_sub_guid in raw)
53 return wf_event_subs_obj;
54
55 -- GetAgentByName
56 -- This function returns an instance of WF_AGENT_OBJ that contains the
57 -- information about the specified Agent name + System name
58 function GetAgentByName(p_agent_name in varchar2,
59 p_system_name in varchar2)
60 return wf_agent_obj;
61
62 -- GetAgentByGUID
63 -- This function returns an instance of WF_AGENT_OBJ that contains the
64 -- information about the specified Agent GUID
65 function GetAgentByGUID(p_agent_guid in raw)
66 return wf_agent_obj;
67
68 -- GetAgentByQH
69 -- This function returns an instance of WF_AGENT_OBJ that contains the
70 -- information about first agent that matches the specified Queue Handler
71 function GetAgentByQH(p_agent_qh in varchar2,
72 p_direction in varchar2)
73 return wf_agent_obj;
74
75 -- GetSystemByName
76 -- This function returns an instance of WF_SYSTEM_OBJ that contains the
77 -- information about the specified System name.
78 function GetSystemByName(p_system_name in varchar2)
79 return wf_system_obj;
80
81 -- ClearCache
82 -- Clears the cached objects from memory and resets requires variables
83 -- given the name of the cache.
84 procedure ClearCache;
85
86 end WF_BES_CACHE;