DBA Data[Home] [Help]

PACKAGE: APPS.WF_ENTITY_MGR

Source


1 package WF_ENTITY_MGR AUTHID CURRENT_USER as
2 /* $Header: WFEMGRS.pls 120.2 2010/03/09 20:55:43 alsosa ship $ */
3 ------------------------------------------------------------------------------
4 /*
5 ** process_changes - This procedure checks the attribute cache for changes
6 **                   to this particular entity.  If none, exits.
7 **                   Otherwise, updates LDAP (if present) and raises the
8 **                   "oracle.apps.global.<entity_type>.change" event.
9 **                   (or optionally the event you specify in p_event_name)
10 **
11 **                   Usually called after a series of put_attribute_value()
12 **                   calls.  This is how you inform the entity manager that
13 **                   this particular entity may have recent changes to
14 **                   propagate.
15 **
16 **                   Change source identifies the source of the change
17 **                   so that echoes of your own changes can be ignored.
18 **                   Standard change source is <package>.<procedure>.
19 **                   For example, "FND_USER_PKG.UPDATE_USER"
20 **
21 **                   Change type can currently be LOAD or DELETE.
22 **
23 **                   The optional event_name parameter is to specify the event
24 **                   you would like entmgr to raise if you are not satisfied
25 **                   with the standard derived name of
26 **                     oracle.apps.global.'||lower(p_entity_type)||'.change'
27 */
28 PROCEDURE process_changes(p_entity_type      in varchar2,
29                           p_entity_key_value in varchar2,
30                           p_change_source    in varchar2,
31                           p_change_type      in varchar2 default 'LOAD',
32                           p_event_name       in varchar2 default null);
33 ------------------------------------------------------------------------------
34 /*
35 ** get_attribute_value - fetch an entity attribute value from the
36 **                       attribute cache.
37 */
38 FUNCTION get_attribute_value(p_entity_type      in varchar2,
39                              p_entity_key_value in varchar2,
40                              p_attribute        in varchar2) return varchar2;
41 ------------------------------------------------------------------------------
42 /*
43 ** put_attribute_value - set an entity attribute value into the
44 **                       attribute cache.  Does nothing if new value is
45 **                       equal to current or null.  Otherwise, sets the new
46 **                       value and updates the internal CACHE_CHANGED
47 **                       attribute to "YES".
48 **
49 **                       Non-varchar2 attribute values must be converted
50 **                       to their cannonical varchar2 equivalent values
51 **                       using standard conversion conventions.
52 **
53 **                          FND_DATE.date_to_canonical()
54 **                          FND_NUMBER.number_to_canonical().
55 **
56 **                       Use "*NULL*" to indicate a null value.
57 */
58 PROCEDURE put_attribute_value(p_entity_type      in varchar2,
59                               p_entity_key_value in varchar2,
60                               p_attribute        in varchar2,
61                               p_attribute_value  in varchar2);
62 ------------------------------------------------------------------------------
63 /*
64 ** flush_cache - Deletes cached records that match the specified
65 **               entity info.  The special entity_type "*ALL*" will
66 **               truncate the entire table.
67 */
68 PROCEDURE flush_cache(p_entity_type      in varchar2 default null,
69                       p_entity_key_value in varchar2 default null);
70 ------------------------------------------------------------------------------
71 /*
72 ** get_entity_type - fetch the entity type from an entmgr event name.
73 **                   Should be kept in synch with the code in process_changes()
74 **                   which derives the event name to raise.
75 */
76 FUNCTION get_entity_type(p_event_name in varchar2) return varchar2;
77 ------------------------------------------------------------------------------
78 /*
79 ** gen_xml_payload - construct the xml equivalent of the cached attribute
80 **                   data for the event payload.  Useful for folks who
81 **                   don't have access to the attribute cache or who need
82 **                   to persist the data for more than one transaction.
83 */
84 FUNCTION gen_xml_payload(p_event_name in varchar2,
85                          p_event_key  in varchar2) return clob;
86 ------------------------------------------------------------------------------
87 /*
88 ** isChanged - compare new and existing attribute values, taking into account
89 **             special values *NULL* and *UNKNOWN*
90 */
91 FUNCTION isChanged(p_new_val in varchar2,
92                    p_old_val in varchar2) return boolean;
93 ------------------------------------------------------------------------------
94 /*
95 ** purge_cache_attributes - This procedure purges/removes obsolete data from
96 **                  table WF_ATTROBITE_CACHE based on the age parameter
97 **                  specified in the concurrent program FNDWFPRG
98 **                  This proceduce is added as per the fix to bug 5576885.
99 */
100 PROCEDURE purge_cache_attributes (p_enddate date);
101 ------------------------------------------------------------------------------
102 end WF_ENTITY_MGR;