1 PACKAGE IBE_DSP_HIERARCHY_SETUP_PUB AS
2 /* $Header: IBEPCHSS.pls 120.10 2006/04/18 16:12:37 abhandar ship $ */
3 /*#
4 * This is the public package for the creation of the catalog.
5 * @rep:scope public
6 * @rep:product IBE
7 * @rep:lifecycle active
8 * @rep:displayname Catalog Setup API
9 * @rep:category BUSINESS_ENTITY IBE_SECTION
10 */
11
12 -- section record type
13 TYPE SECTION_REC_TYPE IS RECORD (
14 parent_section_id NUMBER := FND_API.G_MISS_NUM,
15 parent_section_access_name VARCHAR2(240):= FND_API.G_MISS_CHAR,
16 access_name VARCHAR2(240):= FND_API.G_MISS_CHAR,
17 start_date_active DATE,
18 end_date_active DATE := FND_API.G_MISS_DATE,
19 section_type_code VARCHAR2(30),
20 status_code VARCHAR2(30),
21 display_name VARCHAR2(120),
22 description VARCHAR2(240) := FND_API.G_MISS_CHAR,
23 long_description VARCHAR2(4000):= FND_API.G_MISS_CHAR,
24 keywords VARCHAR2(1000):= FND_API.G_MISS_CHAR,
25 attribute_category VARCHAR2(150) := FND_API.G_MISS_CHAR,
26 attribute1 VARCHAR2(150) := FND_API.G_MISS_CHAR,
27 attribute2 VARCHAR2(150) := FND_API.G_MISS_CHAR,
28 attribute3 VARCHAR2(150) := FND_API.G_MISS_CHAR,
29 attribute4 VARCHAR2(150) := FND_API.G_MISS_CHAR,
30 attribute5 VARCHAR2(150) := FND_API.G_MISS_CHAR,
31 attribute6 VARCHAR2(150) := FND_API.G_MISS_CHAR,
32 attribute7 VARCHAR2(150) := FND_API.G_MISS_CHAR,
33 attribute8 VARCHAR2(150) := FND_API.G_MISS_CHAR,
34 attribute9 VARCHAR2(150) := FND_API.G_MISS_CHAR,
35 attribute10 VARCHAR2(150) := FND_API.G_MISS_CHAR,
36 attribute11 VARCHAR2(150) := FND_API.G_MISS_CHAR,
37 attribute12 VARCHAR2(150) := FND_API.G_MISS_CHAR,
38 attribute13 VARCHAR2(150) := FND_API.G_MISS_CHAR,
39 attribute14 VARCHAR2(150) := FND_API.G_MISS_CHAR,
40 attribute15 VARCHAR2(150) := FND_API.G_MISS_CHAR
41 );
42
43 /*#
44 * Creates a section with Configurable Layout
45 *
46 * Description of the record SECTION_REC_TYPE
47 * SECTION_REC_TYPE.parent_section_id - unique identifier of the parent section.
48 * SECTION_REC_TYPE.parent_section_access_name - unique access name of the parent section.
49 * SECTION_REC_TYPE.access_name - unique access name of the section.
50 * SECTION_REC_TYPE.start_date_active - start date of the section.
51 * SECTION_REC_TYPE.end_date_active - end date of the section
52 * SECTION_REC_TYPE.section_type_code - type of section Navigational(N) or Featured(F).
53 * SECTION_REC_TYPE.status_code - status of the section.
54 * SECTION_REC_TYPE.display_name - name of the section.
55 * SECTION_REC_TYPE.description - description of the section.
56 * SECTION_REC_TYPE.long_description - long description of the sections.
57 * SECTION_REC_TYPE.keywords - keywords.
58 *
59 * @param p_api_version Stores the version number of the API. This is the local constant set by the API code.
60 * @param p_init_msg_list Initializes the API message list.
61 * @param p_commit Commits the transaction.
62 * @param p_hierachy_section_rec Inputs the record structure containing information of the section to be created.
63 * @param x_return_status Return the status of the API operation
64 * @param x_msg_count Stores the number of messages in the API message list.
65 * @param x_msg_data Stores the message data in an encoded format if the message count is 1.
66 * @param x_section_id Stores the unique identifier of the newly created section.
67 * @rep:scope public
68 * @rep:lifecycle active
69 * @rep:displayname Create Section
70 */
71 PROCEDURE Create_Section(
72 p_api_version IN NUMBER,
73 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
74 p_commit IN VARCHAR2 := FND_API.G_FALSE,
75 x_return_status OUT NOCOPY VARCHAR2,
76 x_msg_count OUT NOCOPY NUMBER,
77 x_msg_data OUT NOCOPY VARCHAR2,
78 p_hierachy_section_rec IN SECTION_REC_TYPE,
79 x_section_id OUT NOCOPY NUMBER);
80
81
82 -- Section Item record type
83 TYPE SECTION_ITEM_REC_TYPE IS RECORD (
84 section_item_id NUMBER :=FND_API.G_MISS_NUM,
85 section_id NUMBER :=FND_API.G_MISS_NUM,
86 inventory_item_id NUMBER,
87 organization_id NUMBER,
88 start_date_active DATE,
89 end_date_active DATE := FND_API.G_MISS_DATE,
90 sort_order NUMBER := FND_API.G_MISS_NUM,
91 association_reason_code VARCHAR2(300) := FND_API.G_MISS_CHAR
92 );
93
94
95 TYPE SECTION_ITEM_TBL_TYPE IS TABLE OF SECTION_ITEM_REC_TYPE
96 INDEX BY BINARY_INTEGER;
97
98 /** Item Assoc out Record Type */
99 TYPE SECTION_ITEM_OUT_REC_TYPE IS RECORD (
100 section_item_id NUMBER,
101 inventory_item_id NUMBER,
102 organization_id NUMBER,
103 x_return_status VARCHAR2(1)
104 );
105
106 TYPE SECTION_ITEM_OUT_TBL_TYPE IS TABLE OF SECTION_ITEM_OUT_REC_TYPE
107 INDEX BY BINARY_INTEGER;
108
109
110 /*#
111 * Associate Inventory items to the section
112 * Description of the SECTION_ITEM_REC_TYPE
113 * SECTION_ITEM_REC_TYPE.section_item_id - unique identifier of the section_item association.
114 * SECTION_ITEM_REC_TYPE.section_id - unique identifier of the section.
115 * SECTION_ITEM_REC_TYPE.inventory_item_id - unique identifier of the inventory item.
116 * SECTION_ITEM_REC_TYPE.organization_id - unique identifier of the inventory organization.
117 * SECTION_ITEM_REC_TYPE.start_date_active - start date of the section item association.
118 * SECTION_ITEM_REC_TYPE.end_date_active - end date of the section item association.
119 * SECTION_ITEM_REC_TYPE.sort_order - the order in which the items will be displayed under a section.
120 * SECTION_ITEM_REC_TYPE.association_reason_code- reason why/how the item was related to the section.
121 *
122 * @param p_api_version Stores the version number of the API. This is the local constant set by the API code.
123 * @param p_init_msg_list Initializes the API message list.
124 * @param p_commit Commits the transaction.
125 * @param p_section_id Stores the ID of the section to which Inventory items are to be associated.
126 * @param p_section_item_tbl This is the input table for the Inventory items to be associated with the section.
127 The table should mandatory have values for the Inventory item ID and organization ID and start date.
128 The value of section id in the input table is not referenced for this API, hence need not be populated.
129 * @param x_return_status Return the status of the API operation.
130 * @param x_msg_count Stores the number of messages in the API message list.
131 * @param x_msg_data Stores the message data in an encoded format if the message count is 1.
132 * @param x_section_item_out_tbl This is an output table containing return status for every instance of section-item association.
133 * @rep:scope public
134 * @rep:lifecycle active
135 * @rep:displayname Section Item Association
136 */
137 PROCEDURE Create_Section_Items(
138 p_api_version IN NUMBER,
139 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
140 p_commit IN VARCHAR2 := FND_API.G_FALSE,
141 x_return_status OUT NOCOPY VARCHAR2,
142 x_msg_count OUT NOCOPY NUMBER,
143 x_msg_data OUT NOCOPY VARCHAR2,
144 p_section_id IN NUMBER,
145 p_section_item_tbl IN SECTION_ITEM_TBL_TYPE,
146 x_section_item_out_tbl OUT NOCOPY SECTION_ITEM_OUT_TBL_TYPE);
147
148
149 /* Record to hold object (item/section) , context ID and the deliverable_id(template) */
150 TYPE OBJ_LGL_CTNT_REC_TYPE IS RECORD (
151 object_id NUMBER,
152 context_id NUMBER,
153 deliverable_id NUMBER );
154
155 /* hold the records of above type */
156 TYPE obj_lgl_ctnt_tbl_type IS TABLE OF
157 obj_lgl_ctnt_rec_type INDEX BY BINARY_INTEGER;
158
159 /* object lgl content out Record Type to store the results of API execution */
160 TYPE OBJ_LGL_CTNT_OUT_REC_TYPE IS RECORD (
161 object_id NUMBER,
162 context_id NUMBER,
163 deliverable_id NUMBER,
164 x_return_status VARCHAR2(1) );
165
166 /* table structure to hold the above types */
167 TYPE OBJ_LGL_CTNT_OUT_TBL_TYPE IS TABLE OF OBJ_LGL_CTNT_OUT_REC_TYPE
168 INDEX BY BINARY_INTEGER;
169
170 /*#
171 * Associate logical content (media object/ display template) to objects(Inventory item/section)
172 *
173 * This API is used for following purposes: Item-media object association,item-display template association ,section-media object association,
174 * section-layout component template association(for Configurable Layout) and section-display template association(for Configurable Layout).
175 *
176 * (1) Item-media object association : The required input parameters are
177 * object_type - 'I'
178 * OBJ_LGL_CTNT_REC_TYPE.object_id - value of inventory_item_id from mtl_system_items_b
179 * OBJ_LGL_CTNT_REC_TYPE.context_id - value of context_id from from ibe_dsp_context_vl where context_type_code= 'MEDIA' and component_type_code in ('PRODUCT','GENERIC').
180 * OBJ_LGL_CTNT_REC_TYPE.deliverable_id - value of item_id from jtf_amv_items_vl where deliverable_type_code='TEMPLATE' and applicable_to_code='PRODUCT_SECTION').
181 *
182 * (2) Item-display template association : The required input parameters are
183 * object_type - 'I'.
184 * OBJ_LGL_CTNT_REC_TYPE.object_id - value of inventory_item_id from mtl_system_items_b.
185 * OBJ_LGL_CTNT_REC_TYPE.context_id - value of context_id from from ibe_dsp_context_vl where where context_type_code='TEMPLATE'.
186 * OBJ_LGL_CTNT_REC_TYPE.deliverable_id - value of item_id from jtf_amv_items_vl where deliverable_type_code='TEMPLATE' and applicable_to_code='PRODUCT_SECTION'.
187 *
188 * (3) Section-media object association: The required input parameters are
189 * object_type - 'S'
190 * OBJ_LGL_CTNT_REC_TYPE.object_id - value of section_id from ibe_dsp_sections_b.
191 * OBJ_LGL_CTNT_REC_TYPE.context_id - value of context_id from ibe_dsp_context_vl where context_type_code='MEDIA' and component_type_code in ('SECTION','GENERIC').
192 * OBJ_LGL_CTNT_REC_TYPE.deliverable_id - value of item_id from jtf_amv_items_vl where deliverable_type_code='MEDIA' and applicable_to_code='SECTION'.
193 *
194 * (4) Section-layout component template association(for Configurable Layout)- The required input parameters are
195 * object_type - 'S'
196 * OBJ_LGL_CTNT_REC_TYPE.object_id - value of section_id from ibe_dsp_sections_b.
197 * OBJ_LGL_CTNT_REC_TYPE.context_id - value of context_id from ibe_dsp_context_vl where context_type_code='LAYOUT_COMPONENT' and component_type_code='SECTION' and access_name not in ('CENTER').
198 * OBJ_LGL_CTNT_REC_TYPE.deliverable_id - value of item_id from jtf_amv_items_vl where deliverable_type_code='TEMPLATE' and applicable_to_code='COMPONENT_SECTION'.
199 *
200 * (5) Section-display template association(for Configurable Layout) : The required input parameters are
201 * object_type - 'S'
202 * OBJ_LGL_CTNT_REC_TYPE.object_id - value of section_id from ibe_dsp_sections_b.
203 * OBJ_LGL_CTNT_REC_TYPE.context_id - value of context_id from ibe_dsp_context_vl where context_type_code='LAYOUT_COMPONENT' and component_type_code='SECTION' and access_name='CENTER'.
204 * OBJ_LGL_CTNT_REC_TYPE.deliverable_id - value of item_id from jtf_amv_items_vl where deliverable_type_code='TEMPLATE' and applicable_to_code like 'COMPONENT_SECT_%') and applicable_to_code not in ('COMPONENT_SECTION').
205 *
206 * @param p_api_version Stores the version number of the API. This is the local constant set by the API code.
207 * @param p_init_msg_list Initializes the API message list.
208 * @param p_commit Commits the transaction.
209 * @param p_object_type Stores the object type, valid values are namely 'S' (section) and 'I'(item).
210 * @param p_obj_lgl_ctnt_tbl This is the input table for the object, deliverable and context to be associated.
211 * @param x_return_status Return the status of the API operation.
212 * @param x_msg_count Stores the number of messages in the API message list.
213 * @param x_msg_data Stores the message data in an encoded format if the message count is 1.
214 * @param x_obj_lgl_ctnt_out_tbl This is the ouput table containing the return status for every instance of object and logical content association.
215 * @rep:scope public
216 * @rep:lifecycle active
217 * @rep:displayname Create Object Logical Content
218 */
219 PROCEDURE Create_Object_Logical_Content (
220 p_api_version IN NUMBER,
221 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
222 p_commit IN VARCHAR2 := FND_API.g_false,
223 p_object_type IN VARCHAR2,
224 p_obj_lgl_ctnt_tbl IN OBJ_LGL_CTNT_TBL_TYPE,
225 x_return_status OUT NOCOPY VARCHAR2,
226 x_msg_count OUT NOCOPY NUMBER,
227 x_msg_data OUT NOCOPY VARCHAR2,
228 x_obj_lgl_ctnt_out_tbl OUT NOCOPY OBJ_LGL_CTNT_OUT_TBL_TYPE
229 );
230
231 END IBE_DSP_HIERARCHY_SETUP_PUB;