1 package IMC_BOOKMARK_PUB AS
2 /* $Header: imcbmas.pls 120.0 2004/01/24 03:03:59 appldev noship $ */
3
4 TYPE ref_cursor_bookmarks IS REF CURSOR;
5 G_MODLUE CONSTANT VARCHAR2(15) := 'IMC_BOOKMARKS';
6 G_CATEGORY_ORG CONSTANT VARCHAR2(30) := 'BOOKMARKED_ORGANIZATION';
7 G_CATEGORY_PERSON CONSTANT VARCHAR2(30) := 'BOOKMARKED_PERSON';
8 G_CATEGORY_REL CONSTANT VARCHAR2(30) := 'BOOKMARKED_PARTY_RELATIONSHIP';
9 G_PREFERENCE_CODE CONSTANT VARCHAR2(10) := 'PARTY_ID';
10 G_OBJECT_VERSION_NUMBER CONSTANT NUMBER := 1; /* Default to value used by TCA API */
11 G_MAX_REACHED_ERROR CONSTANT VARCHAR2(1) := 'M';
12 G_FND_USER_TYPE CONSTANT VARCHAR2(10) := 'FND';
13 G_PARTY_USER_TYPE CONSTANT VARCHAR2(10) := 'PARTY';
14
15 ----------------------------------------------------------------
16 -- API name : Add_Bookmark
17 -- TYPE : Public
18 -- FUNCTION : Add a bookmark for a party. The bookmark can be an
19 -- organization, a person, or a contact relationship.
20 -- Before adding a bookmark, the profile option for max
21 -- number of bookmarks will be checked to ensure it is
22 -- enforced. Returns error code if adding bookmark will
23 -- make it over the limit.
24 -- Do nothing if bookmark already exists.
25 -- Parameters:
26 -- IN : p_party_id IN NUMBER (required)
27 -- Party on which the bookmark will be added
28 --
29 -- p_bookmarked_party_id IN NUMBER(required)
30 -- Party that is going to be added as a bookmark
31 --
32 -- OUT :
33 -- x_return_status 1 byte result code:
34 -- 'S' Success
35 -- 'L' Over max number of bookmark limit
36 -- 'E' Error
37 -- 'U' Unexpected Error
38 --
39 -- x_msg_count
40 -- Number of messages in message stack
41 -- If 'E' or 'U' is returned, there will be an
42 -- error message on the FND_MESSAGE stack which
43 -- can be retrieved with FND_MESSAGE.GET_ENCODED()
44 -- x_msg_data
45 -- The first message in the FND_MESSAGE stack
46 --
47 -- Version: Current Version 1.0
48 -- Previous Version : None
49 -- Notes :
50 --
51 --
52 ---------------------------------------------------------------
53 PROCEDURE Add_Bookmark(
54 p_party_id IN NUMBER,
55 p_bookmarked_party_id IN NUMBER,
56 x_return_status OUT NOCOPY VARCHAR2,
57 x_msg_count OUT NOCOPY VARCHAR2,
58 x_msg_data OUT NOCOPY VARCHAR2
59 );
60
61 ----------------------------------------------------------------
62 -- API name : Add_Bookmark
63 -- TYPE : Public
64 -- FUNCTION : Add a bookmark for a FND user. This is an overloaded
65 -- function. It will find out the party_id of the FND user
66 -- and assign the bookmark to the party because we cannot
67 -- add bookmark to a FND user directly. If no party exists
68 -- for the FND user, a party will be created and the
69 -- party_id will be returned as well. The bookmark can be
70 -- an organization, a person, or a contact relationship.
71 -- Before adding a bookmark, the profile option for max
72 -- number of bookmarks will be checked to ensure it is
73 -- enforced. Returns error code if adding bookmark will
74 -- make it over the limit or FND user does not exist.
75 -- Do nothing if bookmark already exists.
76 -- Parameters:
77 -- IN : p_fnd_user_id IN NUMBER (required)
78 -- FND user on which the bookmark will be added
79 --
80 -- p_bookmarked_party_id IN NUMBER(required)
81 -- Party that is going to be added as a bookmark
82 --
83 -- OUT :
84 -- x_party_id
85 -- Party ID of the FND user
86 -- x_return_status 1 byte result code:
87 -- 'S' Success
88 -- 'L' Over max number of bookmark limit
89 -- 'E' Error
90 -- 'U' Unexpected Error
91 --
92 -- x_msg_count
93 -- Number of messages in message stack
94 -- If 'E' or 'U' is returned, there will be an
95 -- error message on the FND_MESSAGE stack which
96 -- can be retrieved with FND_MESSAGE.GET_ENCODED()
97 -- x_msg_data
98 -- The first message in the FND_MESSAGE stack
99 --
100 -- Version: Current Version 1.0
101 -- Previous Version : None
102 -- Notes :
103 --
104 --
105 ---------------------------------------------------------------
106 PROCEDURE Add_Bookmark(
107 p_fnd_user_id IN NUMBER,
108 p_bookmarked_party_id IN NUMBER,
109 x_party_id OUT NOCOPY NUMBER,
110 x_return_status OUT NOCOPY VARCHAR2,
111 x_msg_count OUT NOCOPY VARCHAR2,
112 x_msg_data OUT NOCOPY VARCHAR2
113 );
114
115 ----------------------------------------------------------------
116 -- API name : Remove_Bookmark
117 -- TYPE : Public
118 -- FUNCTION : Remove bookmark for a party. Do nothing if neither
119 -- party nor bookmark exists.
120 -- Parameters:
121 -- IN : p_party_id IN NUMBER (required)
122 -- Party on which the bookmark will be removed
123 --
124 -- p_bookmarked_party_id IN NUMBER(required)
125 -- Bookmark that is going to be removed
126 --
127 -- OUT :
128 -- x_return_status 1 byte result code:
129 -- 'S' Success
130 -- 'E' Error
131 -- 'U' Unexpected Error
132 --
133 -- x_msg_count
134 -- Number of messages in message stack
135 -- If 'E' or 'U' is returned, there will be an
136 -- error message on the FND_MESSAGE stack which
137 -- can be retrieved with FND_MESSAGE.GET_ENCODED()
138 -- x_msg_data
139 -- The first message in the FND_MESSAGE stack
140 --
141 -- Version: Current Version 1.0
142 -- Previous Version : None
143 -- Notes :
144 --
145 --
146 ---------------------------------------------------------------
147 PROCEDURE Remove_Bookmark(
148 p_party_id IN NUMBER,
149 p_user_type IN VARCHAR2,
150 p_bookmarked_party_id IN NUMBER,
151 x_return_status OUT NOCOPY VARCHAR2,
152 x_msg_count OUT NOCOPY VARCHAR2,
153 x_msg_data OUT NOCOPY VARCHAR2
154 );
155
156 ----------------------------------------------------------------
157 -- API name : Get_Bookmarked_Parties
158 -- TYPE : Public
159 -- FUNCTION : Retrieve bookmark Ids for a party. The values will
160 -- be retrieved as a reference cursor.
161 --
162 -- Parameters:
163 -- IN : p_party_id IN NUMBER (required)
164 -- Party on which the bookmarks will be returned
165 --
166 -- p_bookmarked_party_type IN VARCHAR2(optional)
167 -- Valid values are ORGANIZATION, PARTY_RELATIONSHIP,
168 -- PERSON and NULL. For non-null value, bookmarks of
169 -- that type will be returned. For null, all bookmarks
170 -- are returned.
171 --
172 -- OUT : x_bookmarked_party_ids
173 -- A reference cursor returns party Ids of bookmarks
174 -- for a party. Returns NULL if no bookmark exists for
175 -- the party or p_party_id does not exist.
176 --
177 -- x_return_status 1 byte result code:
178 -- 'S' Success
179 -- 'E' Error
180 -- 'U' Unexpected Error
181 -- x_msg_count
182 -- Number of messages in message stack
183 -- If 'E' or 'U' is returned, there will be an
184 -- error message on the FND_MESSAGE stack which
185 -- can be retrieved with FND_MESSAGE.GET_ENCODED()
186 -- x_msg_data
187 -- The first message in the FND_MESSAGE stack
188 --
189 -- Version: Current Version 1.0
190 -- Previous Version : None
191 -- Notes :
192 --
193 --
194 ---------------------------------------------------------------
195 PROCEDURE Get_Bookmarked_Parties(
196 p_party_id IN NUMBER,
197 p_bookmarked_party_type IN VARCHAR2 DEFAULT NULL, -- Default to return all types
198 x_bookmarked_party_ids OUT NOCOPY ref_cursor_bookmarks,
199 x_return_status OUT NOCOPY VARCHAR2,
200 x_msg_count OUT NOCOPY VARCHAR2,
201 x_msg_data OUT NOCOPY VARCHAR2
202 );
203
204 ----------------------------------------------------------------
205 -- API name : Bookmark_Exists
206 -- TYPE : Public
207 -- FUNCTION : Check if a party has been bookmarked for a user.
208 -- Returns TRUE if the bookmark exist, else returns FALSE.
209 --
210 -- Parameters:
211 -- IN : p_party_id IN NUMBER (required)
212 -- Party to check if the bookmark exists
213 --
214 -- p_bookmarked_party_id IN VARCHAR2(required)
215 -- Party id of the bookmark you want to check.
216 --
217 -- Version: Current Version 1.0
218 -- Previous Version : None
219 -- Notes :
220 --
221 --
222 ---------------------------------------------------------------
223 FUNCTION Bookmark_Exists(
224 p_party_id IN NUMBER,
225 p_user_type IN VARCHAR2,
226 p_bookmarked_party_id IN NUMBER
227 ) RETURN VARCHAR2;
228
229 ----------------------------------------------------------------
230 -- API name : Disable_Bookmark
231 -- TYPE : Public
232 -- FUNCTION : Check if bookmark is allowed for a party (e.g.
233 -- relationship party between 2 orgs
234 -- Returns Y if bookmark is not allowed, else returns N.
235 --
236 -- Parameters:
237 -- IN : p_party_id IN NUMBER (required)
238 --
239 -- Version: Current Version 1.0
240 -- Previous Version : None
241 -- Notes :
242 --
243 --
244 ---------------------------------------------------------------
245 FUNCTION Disable_Bookmark(
246 p_party_id IN NUMBER
247 ) RETURN VARCHAR2;
248
249 END IMC_BOOKMARK_PUB;