The following lines contain the word 'select', 'insert', 'update' or 'delete':
G_COMMAND_UPDATE CHAR(1) := 'U';
G_COMMAND_POST_APPROVAL_UPDATE CHAR(1) := 'P';
SELECT 'X'
FROM ibc_content_items
WHERE content_item_id <> NVL(p_content_item_id, -1)
AND item_reference_code = UPPER(p_reference_code);
FUNCTION deleteAttributeBundle(
f_citem_ver_id IN NUMBER
,f_language IN VARCHAR2 DEFAULT USERENV('LANG')
,f_log_action IN VARCHAR2 DEFAULT FND_API.g_true
)
RETURN VARCHAR2
IS
old_file_id NUMBER;
SELECT
attribute_file_id
FROM
ibc_citem_versions_tl
WHERE
citem_version_id = f_citem_ver_id
AND
LANGUAGE = f_language;
p_proc_name => 'DeleteAttributeBundle',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'f_citem_ver_id', f_citem_ver_id,
'f_language', f_language,
'f_log_action', f_log_action
)
)
);
DELETE
FROM ibc_attribute_bundles
WHERE attribute_bundle_id = old_file_id;
SELECT
ibc_attribute_types_b.attribute_type_code
FROM
ibc_attribute_types_b
,ibc_content_items
WHERE
ibc_content_items.content_item_id = f_citem_id
AND
ibc_attribute_types_b.content_type_code = ibc_content_items.content_type_code
AND
ibc_attribute_types_b.data_type_code = Ibc_Utilities_Pub.G_DTC_ATTACHMENT;
SELECT
file_name
FROM
fnd_lobs
WHERE
file_id = f_file_id;
SELECT
attribute_file_id
FROM
ibc_citem_versions_tl
WHERE
citem_version_id = f_citem_ver_id
AND
LANGUAGE = f_language;
SELECT attribute_type_name
FROM ibc_attribute_types_tl
WHERE content_type_code = p_content_type_code
AND attribute_type_code = p_attribute_type_code
AND LANGUAGE = p_language;
SELECT
content_item_status
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id;
SELECT
base_language
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id;
SELECT
content_item_id
FROM
ibc_citem_versions_b
WHERE
citem_version_id = f_citem_version_id;
SELECT
MAX(citem_version_id)
FROM
ibc_citem_versions_b
WHERE
content_item_id = f_content_item_id;
SELECT
locked_by_user_id
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id
AND
( (locked_by_user_id IS NULL)
OR
(locked_by_user_id = FND_GLOBAL.user_id) );
SELECT association_id
FROM IBC_ASSOCIATIONS
WHERE content_item_id = p_content_item_id;
SELECT 'X'
FROM ibc_compound_relations
WHERE content_item_id = p_content_item_id;
SELECT content_item_node_id
FROM IBC_CONTENT_ITEM_NODES
WHERE content_item_id = p_content_item_id;
SELECT 'X'
FROM IBC_STYLESHEETS
WHERE content_item_id = p_content_item_id
AND default_stylesheet_flag = FND_API.g_true;
SELECT
owner_resource_id
,owner_resource_type
,created_by
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id;
SELECT a.reference_code
FROM ibc_attribute_types_b a,
ibc_content_items b
WHERE b.content_item_id = f_content_item_id
AND b.content_type_code = a.content_type_code
AND a.attribute_type_code = f_attribute_type_code
AND a.reference_code = f_content_type_code;
SELECT
directory_node_id
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id;
SELECT
content_type_code
FROM
ibc_content_items
WHERE
content_item_id = f_content_item_id;
SELECT
ibc_content_items.content_type_code
FROM
ibc_content_items
,ibc_citem_versions_b
WHERE
ibc_citem_versions_b.content_item_id = ibc_content_items.content_item_id
AND
ibc_citem_versions_b.citem_version_id = f_citem_ver_id;
SELECT
MAX(version_number)
FROM
ibc_citem_versions_b
WHERE
content_item_id = f_content_item_id;
SELECT
object_version_number
FROM
ibc_content_items
WHERE
content_item_id = f_citem_id;
UPDATE
ibc_content_items
SET
locked_by_user_id = f_new_lock
WHERE
content_item_id = f_content_item_id;
SELECT data_type_code
,data_length
,min_instances
FROM ibc_attribute_types_b
WHERE attribute_type_code = p_attribute_type_code
AND content_type_code = p_ctype_code;
SELECT
citem_id
,NVL(p_new_citem_name,name) name --Added to ensure uniqueness of citem under folder
,version
,description
,start_date
,end_date
,attrib_fid
,attach_fid
,attach_file_name
,default_rendition_mime_type
,object_version_number
FROM
IBC_CITEMS_V
WHERE
citem_ver_id = px_citem_ver_id
AND
LANGUAGE = p_language;
SELECT attribute_bundle_data file_data
FROM IBC_ATTRIBUTE_BUNDLES
WHERE attribute_bundle_id = o_attrib_fid;
SELECT content_item_id ciid
,attribute_type_code atc
,content_type_code ctc
,sort_order sod
FROM ibc_compound_relations
WHERE citem_version_id = p_citem_version_id;
SELECT LANGUAGE,
file_id,
file_name,
mime_type
FROM ibc_renditions
WHERE citem_version_id = p_citem_version_id
AND LANGUAGE = p_language;
Ibc_Utilities_Pvt.insert_attribute_bundle(
x_lob_file_id => new_attrib_fid
,p_new_bundle => o_attrib_bundle
,x_return_status => x_return_status
);
IBC_CITEM_VERSIONS_PKG.insert_base_lang(
x_rowid => row_id
,px_citem_version_id => new_citem_ver_id
,p_content_item_id => px_content_item_id
,p_version_number => new_ver_num
,p_citem_version_status => IBC_UTILITIES_PUB.G_STV_WORK_IN_PROGRESS
,p_start_date => o_start_date
,p_end_date => o_end_date
,px_object_version_number => px_object_version_number
,p_attribute_file_id => new_attrib_fid
,p_attachment_attribute_code => o_attach_attrib_code
,p_attachment_file_id => o_attach_fid
,p_content_item_name => o_name
,p_attachment_file_name => o_attach_fname
,p_default_rendition_mime_type => o_default_rendition_mime_type
,p_description => o_description
,p_source_lang => p_language
);
INSERT INTO IBC_CITEM_VERSIONS_TL (
CITEM_VERSION_ID,
ATTRIBUTE_FILE_ID,
ATTACHMENT_ATTRIBUTE_CODE,
CONTENT_ITEM_NAME,
ATTACHMENT_FILE_ID,
ATTACHMENT_FILE_NAME,
DESCRIPTION,
DEFAULT_RENDITION_MIME_TYPE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
LANGUAGE,
SOURCE_LANG,
CITEM_TRANSLATION_STATUS
) SELECT new_citem_ver_id,
attribute_file_id,
attachment_attribute_code,
content_item_name,
attachment_file_id,
attachment_file_name,
description,
default_rendition_mime_type,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
LANGUAGE,
source_lang,
IBC_UTILITIES_PUB.g_stv_work_in_progress
FROM IBC_CITEM_VERSIONS_TL
WHERE citem_version_id = px_citem_ver_id
AND LANGUAGE <> p_language;
IBC_RENDITIONS_PKG.insert_row(
Px_rowid => row_id
,Px_RENDITION_ID => l_rendition_id
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,P_LANGUAGE => r_rendition.LANGUAGE
,P_FILE_ID => r_rendition.file_id
,P_FILE_NAME => r_rendition.file_name
,P_CITEM_VERSION_ID => new_citem_ver_id
,P_MIME_TYPE => r_rendition.mime_type
);
IBC_COMPOUND_RELATIONS_PKG.insert_row(
x_rowid => row_id
,px_compound_relation_id => compound_id
,p_content_item_id => r_component.ciid
,p_attribute_type_code => r_component.atc
,p_content_type_code => r_component.ctc
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,p_citem_version_id => new_citem_ver_id
,p_sort_order => r_component.sod
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => px_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => NULL
);
SELECT
attl.attribute_type_name,
atb.data_type_code
INTO
atn,
dtc
FROM
IBC_ATTRIBUTE_TYPES_TL attl,
IBC_ATTRIBUTE_TYPES_B atb
WHERE
atb.attribute_type_code = attl.attribute_type_code
AND
atb.content_type_code = attl.content_type_code
AND
attl.LANGUAGE = p_language
AND
attl.attribute_type_code = atc
AND
attl.content_type_code = p_ctype_code;
PROCEDURE insert_citem_associations_int(
p_content_item_id IN NUMBER
,p_citem_version_id IN NUMBER
,p_assoc_type_codes IN JTF_VARCHAR2_TABLE_100
,p_assoc_objects1 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects2 IN JTF_VARCHAR2_TABLE_300 DEFAULT NULL
,p_assoc_objects3 IN JTF_VARCHAR2_TABLE_300 DEFAULT NULL
,p_assoc_objects4 IN JTF_VARCHAR2_TABLE_300 DEFAULT NULL
,p_assoc_objects5 IN JTF_VARCHAR2_TABLE_300 DEFAULT NULL
,p_log_action IN VARCHAR2 DEFAULT FND_API.g_true
,x_return_status OUT NOCOPY VARCHAR2
)
IS
qty_codes NUMBER;
insert_data CHAR(1); -- flag to tell if this association is okay to insert
p_proc_name => 'Insert_Citem_Associations_Int',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_content_item_id', p_content_item_id,
'p_citem_version_id', p_citem_version_id,
'p_assoc_type_codes', IBC_DEBUG_PVT.make_list(p_assoc_type_codes),
'p_assoc_objects1', IBC_DEBUG_PVT.make_list(p_assoc_objects1),
'p_assoc_objects2', IBC_DEBUG_PVT.make_list(p_assoc_objects2),
'p_assoc_objects3', IBC_DEBUG_PVT.make_list(p_assoc_objects3),
'p_assoc_objects4', IBC_DEBUG_PVT.make_list(p_assoc_objects4),
'p_assoc_objects5', IBC_DEBUG_PVT.make_list(p_assoc_objects5),
'p_log_action', p_log_action
)
)
);
insert_data := FND_API.g_true;
insert_data := FND_API.g_false;
IF (insert_data = FND_API.g_true) THEN
-- resetting id
assoc_id := NULL;
Ibc_Associations_Pkg.insert_row (
px_association_id => assoc_id
,p_content_item_id => p_content_item_id
,p_citem_version_id => p_citem_version_id
,p_association_type_code => p_assoc_type_codes(counter)
,p_associated_object_val1 => p_assoc_objects1(counter)
,p_associated_object_val2 => a2
,p_associated_object_val3 => a3
,p_associated_object_val4 => a4
,p_associated_object_val5 => a5
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,x_rowid => row_id
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => p_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updated item'
);
PROCEDURE insert_component_items_int(
p_citem_ver_id IN NUMBER
,p_content_item_id IN NUMBER
,p_content_item_ids IN JTF_NUMBER_TABLE
,p_citem_ver_ids IN JTF_NUMBER_TABLE DEFAULT NULL
,p_attribute_type_codes IN JTF_VARCHAR2_TABLE_100
,p_ctype_code IN VARCHAR2
,p_sort_order IN JTF_NUMBER_TABLE DEFAULT NULL
,p_log_action IN VARCHAR2 DEFAULT FND_API.g_true
,x_return_status OUT NOCOPY VARCHAR2
)
IS
qty_codes NUMBER;
insert_data CHAR(1);
SELECT default_value, updateable_flag
FROM ibc_attribute_types_b
WHERE content_type_code = p_content_type
AND attribute_type_code = p_attribute_type;
p_proc_name => 'insert_component_items_int',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_citem_ver_id', p_citem_ver_id,
'p_content_item_id', p_content_item_id,
'p_content_item_ids', IBC_DEBUG_PVT.make_list(p_content_item_ids),
'p_citem_ver_ids', IBC_DEBUG_PVT.make_list(p_citem_ver_ids),
'p_attribute_type_codes', IBC_DEBUG_PVT.make_list(p_attribute_type_codes),
'p_ctype_code', p_ctype_code,
'p_sort_order', IBC_DEBUG_PVT.make_list(p_sort_order),
'p_log_action', p_log_action
)
)
);
insert_data := FND_API.g_true;
insert_data := FND_API.g_false;
IF (insert_data = FND_API.g_true AND
p_citem_ver_ids IS NOT NULL AND
p_citem_ver_ids IS NOT NULL AND
p_citem_ver_ids(counter) NOT IN (0, -1, -999, FND_API.G_MISS_NUM) AND
IBC_VALIDATE_PVT.isValidCitemVerForCitem(p_content_item_ids(counter), p_citem_ver_ids(counter)) = FND_API.g_false)
THEN
insert_data := FND_API.g_false;
IF ( (insert_data = FND_API.g_true) AND (IBC_VALIDATE_PVT.isValidAttrCode(p_attribute_type_codes(counter),p_ctype_code) = FND_API.g_false) ) THEN
--DBMS_OUTPUT.put_line('EX - attribute type');
insert_data := FND_API.g_false;
insert_data := FND_API.g_false;
IF r_comp_info.updateable_flag = FND_API.g_false THEN
IF r_comp_info.default_value IS NOT NULL AND
TO_CHAR(p_content_item_ids(counter)) <> r_comp_info.default_value
THEN
insert_data := FND_API.g_false;
IF (insert_data = FND_API.g_true) THEN
-- determining if the content item id is reusable
SELECT
MIN(parent_item_id)
INTO
temp
FROM
ibc_content_items
WHERE
content_item_id = p_content_item_ids(counter);
insert_data := FND_API.g_false;
IF (insert_data = FND_API.g_true) THEN
-- setting sort order in case of null value
IF ( (p_sort_order IS NULL) OR (p_sort_order(counter) IS NULL) ) THEN
sort_order := 1;
Ibc_Compound_Relations_Pkg.insert_row(
x_ROWID => row_id
,px_COMPOUND_RELATION_ID => compound_id
,p_CONTENT_ITEM_ID => p_content_item_ids(counter)
,p_ATTRIBUTE_TYPE_CODE => p_attribute_type_codes(counter)
,p_CONTENT_TYPE_CODE => p_ctype_code
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,p_CITEM_VERSION_ID => p_citem_ver_id
,p_SORT_ORDER => sort_order
,p_subitem_version_id => l_subitem_version_id
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => p_content_item_ids(counter)
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => p_content_item_ids(counter)
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Adding component'
);
,p_updateable IN VARCHAR2
,p_minimum IN NUMBER
,p_maximum IN NUMBER
,p_language IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
)
IS
temp NUMBER;
SELECT content_item_id
FROM ibc_compound_relations
WHERE attribute_type_code = p_attribute_type_code
AND content_Type_code = p_content_type_code
AND citem_version_id = p_citem_version_id;
IF (p_updateable = FND_API.g_false) THEN
IF (p_default_value IS NOT NULL) THEN
IF(TO_CHAR(citem_id) <> p_default_value) THEN
--DBMS_OUTPUT.put_line('EX - component default value');
SELECT attribute_type_code atc
,data_type_code dtc
,min_instances mini
,max_instances maxi
,reference_code rc
,default_value dv
,updateable_flag upd
,data_length dl
,flex_value_set_id vset
FROM ibc_attribute_types_b
WHERE content_type_code = p_content_type_code;
SELECT COUNT(*)
FROM IBC_RENDITIONS
WHERE CITEM_VERSION_ID = p_citem_ver_id
AND LANGUAGE = p_language;
SELECT
ibc_content_items.content_type_code
,ibc_content_items.content_item_id
,ibc_citem_versions_tl.content_item_name
,ibc_citem_versions_tl.description
,ibc_citem_versions_tl.attachment_file_id
INTO
ctype_code
,content_item_id
,citem_name
,citem_desc
,attach_file_id
FROM
ibc_citem_versions_b
,ibc_citem_versions_tl
,ibc_content_items
WHERE
ibc_content_items.content_item_id = ibc_citem_versions_b.content_item_id
AND
ibc_citem_versions_b.citem_version_id = ibc_citem_versions_tl.citem_version_id
AND
ibc_citem_versions_tl.LANGUAGE = p_language
AND
ibc_citem_versions_b.citem_version_id = p_citem_ver_id;
SELECT
description
INTO
temp_desc
FROM
ibc_citem_versions_tl
WHERE
citem_version_id = p_citem_ver_id
AND
LANGUAGE = p_language;
,p_updateable => r_attribute.upd
,p_minimum => r_attribute.mini
,p_maximum => r_attribute.maxi
,p_language => p_language
,x_return_status => return_status
);
SELECT
IBC_CONTENT_ITEMS.content_item_id
,IBC_CONTENT_ITEMS.content_type_code
,IBC_CONTENT_ITEMS.object_version_number
INTO
x_content_item_id
,x_ctype_code
,x_object_version_number
FROM
ibc_content_items
,ibc_citem_versions_b
WHERE
IBC_CONTENT_ITEMS.content_item_id = IBC_CITEM_VERSIONS_B.content_item_id
AND
IBC_CITEM_VERSIONS_B.citem_version_id = p_citem_ver_id;
SELECT
IBC_CONTENT_ITEMS.object_version_number
,IBC_CITEM_VERSIONS_B.version_number
,IBC_CITEM_VERSIONS_B.start_date
,IBC_CITEM_VERSIONS_B.end_date
,IBC_CITEM_VERSIONS_TL.attribute_file_id
,IBC_CITEM_VERSIONS_TL.attachment_file_id
,IBC_CITEM_VERSIONS_TL.content_item_name
,IBC_CITEM_VERSIONS_TL.description
,IBC_CITEM_VERSIONS_TL.attachment_file_name
,IBC_CITEM_VERSIONS_TL.default_rendition_mime_type
,IBC_CITEM_VERSIONS_TL.attachment_attribute_code
FROM
IBC_CONTENT_ITEMS
,IBC_CITEM_VERSIONS_B
,IBC_CITEM_VERSIONS_TL
WHERE
IBC_CONTENT_ITEMS.content_item_id = IBC_CITEM_VERSIONS_B.content_item_id
AND
IBC_CITEM_VERSIONS_B.citem_version_id = IBC_CITEM_VERSIONS_TL.citem_version_id
AND
IBC_CITEM_VERSIONS_TL.citem_version_id = p_citem_ver_id
AND
IBC_CITEM_VERSIONS_TL.LANGUAGE = p_base_lang;
SELECT file_id
,file_name
,mime_type
FROM ibc_renditions
WHERE citem_version_id = cv_citem_version_id
AND LANGUAGE = cv_language;
SELECT CIVTL.LANGUAGE
FROM ibc_citem_versions_tl CIVTL
WHERE CIVTL.citem_version_id = cv_citem_version_id
AND CIVTL.LANGUAGE <> cv_language;
Ibc_Citem_Versions_Pkg.update_row(
p_CITEM_VERSION_ID => p_citem_ver_id
,p_content_item_id => p_content_item_id
,p_CITEM_VERSION_STATUS => Ibc_Utilities_Pub.G_STV_APPROVED
,P_SOURCE_LANG => p_base_lang
,px_object_version_number => px_object_version_number
,p_citem_translation_status => Ibc_Utilities_Pub.G_STV_APPROVED
);
Ibc_Content_Items_Pkg.update_row (
p_CONTENT_ITEM_ID => p_content_item_id
,p_LIVE_CITEM_VERSION_ID => p_citem_ver_id
,p_CONTENT_ITEM_STATUS => Ibc_Utilities_Pub.G_STI_APPROVED
,p_LOCKED_BY_USER_ID => FND_API.G_MISS_NUM -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
ibc_renditions_pkg.insert_row(
px_rowid => row_id
,px_rendition_id => l_rendition_id
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,p_language => cr_populate_ren.LANGUAGE
,p_file_id => cr_base_ren.file_id
,p_file_name => cr_base_ren.file_name
,p_citem_version_id => p_citem_ver_id
,p_mime_type => cr_base_ren.mime_type
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => p_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Setting status to APPROVED and setting live version id'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => p_content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'APPROVING'
);
x_item_command := G_COMMAND_UPDATE;
x_item_command := G_COMMAND_POST_APPROVAL_UPDATE;
x_version_command := G_COMMAND_POST_APPROVAL_UPDATE;
x_item_command := G_COMMAND_UPDATE;
x_version_command := G_COMMAND_UPDATE;
SELECT 'X'
FROM ibc_citem_versions_b a,
ibc_compound_relations b,
ibc_content_items c
WHERE a.citem_version_id = b.citem_version_id
AND b.content_item_id = c.content_item_id
AND a.citem_version_id = p_citem_ver_id
AND c.content_item_status <> p_status;
SELECT
ibc_content_items.content_item_id
,ibc_content_items.base_language
,ibc_content_items.directory_node_id
INTO
content_item_id
,base_lang
,dir_id
FROM
ibc_content_items
,ibc_citem_versions_b
WHERE
ibc_content_items.content_item_id = ibc_citem_versions_b.content_item_id
AND
ibc_citem_versions_b.citem_version_id = p_citem_ver_id;
SELECT
MIN(ibc_citem_versions_b.citem_version_id)
INTO
temp
FROM
ibc_citem_versions_b
,ibc_citem_versions_tl
WHERE
(
(
ibc_citem_versions_tl.LANGUAGE = ibc_citem_versions_tl.source_lang
AND
ibc_citem_versions_b.citem_version_status = Ibc_Utilities_Pub.G_STV_APPROVED
)
OR
ibc_citem_versions_tl.source_lang = base_lang
)
AND
ibc_citem_versions_b.citem_version_id = ibc_citem_versions_tl.citem_version_id
AND
ibc_citem_versions_b.citem_version_id = p_citem_ver_id;
SELECT created_by
FROM ibc_content_items
WHERE content_item_id = p_content_item_id;
Ibc_Content_Items_Pkg.update_row (
p_content_item_id => p_content_item_id
,p_content_item_status => Ibc_Utilities_Pub.G_STI_ARCHIVED
,p_locked_by_user_id => FND_API.G_MISS_NUM -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
Ibc_Content_Items_Pkg.update_row (
p_content_item_id => p_content_item_id
,p_content_item_status => Ibc_Utilities_Pub.G_STI_ARCHIVED_CASCADE
,p_locked_by_user_id => FND_API.G_MISS_NUM -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
Ibc_Citem_Versions_Pkg.update_row(
p_CITEM_VERSION_ID => p_citem_ver_id
,p_content_item_id => content_item_id
,p_CITEM_VERSION_STATUS => p_new_status
,P_SOURCE_LANG => p_language
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating version'
);
SELECT
content_type_code
,directory_node_id
,parent_item_id
,wd_restricted_flag
,translation_required_flag
FROM
IBC_CONTENT_ITEMS
WHERE
content_item_id = px_content_item_id;
associations VARCHAR2(1000) := 'SELECT
association_type_code
,associated_object_val1
,associated_object_val2
,associated_object_val3
,associated_object_val4
,associated_object_val5
,citem_version_id
FROM
IBC_ASSOCIATIONS
WHERE
content_item_id = :CID
AND (
(citem_version_id IS NULL) OR
(citem_version_id = :CIVID)
)
';
SELECT keyword
FROM ibc_citem_keywords
WHERE content_item_id = p_content_item_id;
IBC_CONTENT_ITEMS_PKG.insert_row(
x_rowid => row_id
,px_content_item_id => new_citem_id
,p_content_type_code => o_ctype_code
,p_item_reference_code => p_item_reference_code
,p_directory_node_id => NVL(p_directory_node_id, o_dir_node)
,p_live_citem_version_id => NULL
,p_content_item_status => IBC_UTILITIES_PUB.G_STI_PENDING
,p_locked_by_user_id => NULL
,p_wd_restricted_flag => o_wd_flag
,p_base_language => lang
,p_translation_required_flag => o_trans_flag
,p_owner_resource_id => FND_GLOBAL.USER_ID
,p_owner_resource_type => 'USER'
,p_application_id => NULL
,p_parent_item_id => NULL
,p_request_id => NULL
,p_object_version_number => px_object_version_number
);
IBC_CITEM_KEYWORDS_PKG.insert_row(
x_rowid => row_id
,p_content_item_id => new_citem_id
,p_keyword => r_keyword.keyword
,p_object_version_number => 1
);
Ibc_Associations_Pkg.insert_row (
px_association_id => assoc_id
,p_content_item_id => new_citem_id
,p_citem_version_id => civid
,p_association_type_code => atc
,p_associated_object_val1 => aov1
,p_associated_object_val2 => aov2
,p_associated_object_val3 => aov3
,p_associated_object_val4 => aov4
,p_associated_object_val5 => aov5
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,x_rowid => row_id
);
PROCEDURE delete_component(
p_attribute_type_code IN VARCHAR2
,p_citem_ver_id IN NUMBER
,p_content_item_id IN NUMBER
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'update_citem_association';--|**|
SAVEPOINT svpt_delete_component; --|**|
p_proc_name => 'Delete_Component',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_attribute_type_code', p_attribute_type_code,
'p_citem_ver_id', p_citem_ver_id,
'p_content_item_id', p_content_item_id,
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list
)
)
);
SELECT
MIN(compound_relation_id)
INTO
temp
FROM
ibc_compound_relations
WHERE
content_item_id = content_item_id
AND
content_type_code = ctype_code
AND
attribute_type_code = p_attribute_type_code
AND
content_item_id = p_content_item_id
AND
citem_version_id = p_citem_ver_id;
Ibc_Compound_Relations_Pkg.delete_row(temp);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Removing component'
);
ROLLBACK TO svpt_delete_component;
ROLLBACK TO svpt_delete_component;
ROLLBACK TO svpt_delete_component;
PROCEDURE delete_association(
p_content_item_id IN NUMBER
,p_association_type_code IN VARCHAR2
,p_associated_object_val1 IN VARCHAR2
,p_associated_object_val2 IN VARCHAR2
,p_associated_object_val3 IN VARCHAR2
,p_associated_object_val4 IN VARCHAR2
,p_associated_object_val5 IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'delete_citem_association';--|**|
A_LIST VARCHAR2(4000) := 'SELECT
association_id
FROM
ibc_associations
WHERE
content_item_id = :CITEM
AND
association_type_code = :ACODE
AND
associated_object_val1 = :VAL1';
SAVEPOINT svpt_delete_association; --|**|
p_proc_name => 'Delete_Association',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_content_item_id', p_content_item_id,
'p_association_type_code', p_association_type_code,
'p_associated_object_val1', p_associated_object_val1,
'p_associated_object_val2', p_associated_object_val2,
'p_associated_object_val3', p_associated_object_val3,
'p_associated_object_val4', p_associated_object_val4,
'p_associated_object_val5', p_associated_object_val5,
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list
)
)
);
Ibc_Associations_Pkg.delete_row(
p_association_id => aid
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => p_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating item'
);
ROLLBACK TO svpt_delete_association;
ROLLBACK TO svpt_delete_association;
ROLLBACK TO svpt_delete_association;
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_32767
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
L_API_NAME CONSTANT VARCHAR2(30) := 'get_trans_item'; --|**|
SELECT MEANING
FROM FND_LOOKUP_VALUES
WHERE LOOKUP_TYPE = IBC_UTILITIES_PVT.G_REND_LOOKUP_TYPE
AND LANGUAGE = p_language
AND LOOKUP_CODE = p_mime_type;
SELECT ibc_compound_relations.content_item_id ciid
,ibc_content_items.owner_resource_id orid
,ibc_content_items.owner_resource_type ort
,ibc_compound_relations.attribute_type_code atc
,ibc_citem_versions_tl.content_item_name cin
,ibc_compound_relations.sort_order sor
,ibc_compound_relations.subitem_version_id svid
FROM ibc_compound_relations
,ibc_content_items
,ibc_citem_versions_b b1
,ibc_citem_versions_tl
WHERE b1.citem_version_id = ibc_citem_versions_tl.citem_version_id
AND b1.content_item_id = ibc_content_items.content_item_id
AND ibc_content_items.content_item_id = ibc_compound_relations.content_item_id
AND b1.version_number = (SELECT MAX(b2.version_number)
FROM ibc_citem_versions_b b2
WHERE b1.content_item_id = b2.content_item_id
)
AND ibc_citem_versions_tl.LANGUAGE = p_language
AND ibc_compound_relations.citem_version_id = p_citem_version_id
ORDER BY ibc_compound_relations.sort_order;
SELECT file_id, file_name, mime_type
FROM ibc_renditions
WHERE citem_version_id = p_citem_version_id
AND LANGUAGE = p_language;
SELECT keyword
FROM ibc_citem_keywords
WHERE content_item_id = p_content_item_id;
SELECT file_name, file_content_type
FROM fnd_lobs
WHERE file_id = p_file_id;
SELECT
citem_id
,name
,version
,dir_node_id
,dir_node_name
,dir_node_code
,item_status
,version_status
,description
,ctype_code
,ctype_name
,start_date
,end_date
,owner
,owner_type
,ref_code
,trans_required
,parent_id
,locked_by
,wd_restricted
,attrib_fid
,attach_fid
,attach_file_name
,default_rendition_mime_type
,object_version_number
,created_by
,creation_date
,last_updated_by
,last_update_date
INTO
x_content_item_id
,x_citem_name
,x_citem_version
,x_dir_node_id
,x_dir_node_name
,x_dir_node_code
,x_item_status
,x_version_status
,x_citem_description
,x_ctype_code
,x_ctype_name
,x_start_date
,x_end_date
,x_owner_resource_id
,x_owner_resource_type
,x_reference_code
,x_trans_required
,x_parent_item_id
,x_locked_by
,x_wd_restricted
,attribute_fid
,x_attach_file_id
,x_attach_file_name
,l_default_rendition_mime_type
,x_object_version_number
,x_created_by
,x_creation_date
,x_last_updated_by
,x_last_update_date
FROM
IBC_CITEMS_V
WHERE
citem_ver_id = p_citem_ver_id
AND
LANGUAGE = lang;
'x_last_updated_by', x_last_updated_by,
'x_attribute_type_codes', IBC_DEBUG_PVT.make_list(x_attribute_type_codes),
'x_attribute_type_names', IBC_DEBUG_PVT.make_list(x_attribute_type_names),
'x_attributes', IBC_DEBUG_PVT.make_list_VC32767(x_attributes),
'x_component_citems', IBC_DEBUG_PVT.make_list(x_component_citems),
'x_component_citem_ver_ids', IBC_DEBUG_PVT.make_list(x_component_citem_ver_ids),
'x_component_attrib_types', IBC_DEBUG_PVT.make_list(x_component_attrib_types),
'x_component_citem_names', IBC_DEBUG_PVT.make_list(x_component_citem_names),
'x_component_owner_ids', IBC_DEBUG_PVT.make_list(x_component_owner_ids),
'x_component_owner_types', IBC_DEBUG_PVT.make_list(x_component_owner_types),
'x_component_sort_orders', IBC_DEBUG_PVT.make_list(x_component_sort_orders),
'x_keywords', IBC_DEBUG_PVT.make_list(x_keywords),
'x_return_status', x_return_status,
'x_msg_count', x_msg_count,
'x_msg_data', x_msg_data
)
)
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_32767
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
get_trans_item(
p_citem_ver_id => p_citem_ver_id
,p_language => p_language
,p_init_msg_list => p_init_msg_list
,p_skip_security => FND_API.g_false
,p_api_version_number => p_api_version_number
,x_content_item_id => x_content_item_id
,x_citem_name => x_citem_name
,x_citem_version => x_citem_version
,x_dir_node_id => x_dir_node_id
,x_dir_node_name => x_dir_node_name
,x_dir_node_code => x_dir_node_code
,x_item_status => x_item_status
,x_version_status => x_version_status
,x_citem_description => x_citem_description
,x_ctype_code => x_ctype_code
,x_ctype_name => x_ctype_name
,x_start_date => x_start_date
,x_end_date => x_end_date
,x_owner_resource_id => x_owner_resource_id
,x_owner_resource_type => x_owner_resource_type
,x_reference_code => x_reference_code
,x_trans_required => x_trans_required
,x_parent_item_id => x_parent_item_id
,x_locked_by => x_locked_by
,x_wd_restricted => x_wd_restricted
,x_attach_file_id => x_attach_file_id
,x_attach_file_name => x_attach_file_name
,x_attach_mime_type => x_attach_mime_type
,x_attach_mime_name => x_attach_mime_name
,x_rendition_file_ids => x_rendition_file_ids
,x_rendition_file_names => x_rendition_file_names
,x_rendition_mime_types => x_rendition_mime_types
,x_rendition_mime_names => x_rendition_mime_names
,x_default_rendition => x_default_rendition
,x_object_version_number => x_object_version_number
,x_created_by => x_created_by
,x_creation_date => x_creation_date
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => x_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_tmp_attributes JTF_VARCHAR2_TABLE_32767;
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => l_tmp_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => x_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_attach_file_id NUMBER;
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => x_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_component_citem_ver_ids JTF_NUMBER_TABLE;
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => l_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_keywords JTF_VARCHAR2_TABLE_100;
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => l_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_attach_file_ids JTF_NUMBER_TABLE;
,x_last_updated_by =>x_last_updated_by
,x_last_update_date =>x_last_update_date
,x_attribute_type_codes =>x_attribute_type_codes
,x_attribute_type_names =>x_attribute_type_names
,x_attributes =>x_attributes
,x_component_citems =>x_component_citems
,x_component_attrib_types =>x_component_attrib_types
,x_component_citem_names =>x_component_citem_names
,x_component_owner_ids =>x_component_owner_ids
,x_component_owner_types =>x_component_owner_types
,x_component_sort_orders =>x_component_sort_orders
,x_return_status =>x_return_status
,x_msg_count =>x_msg_count
,x_msg_data =>x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
--DBMS_OUTPUT.put_line('----- get_item -----');
,x_last_updated_by =>x_last_updated_by
,x_last_update_date =>x_last_update_date
,x_attribute_type_codes =>x_attribute_type_codes
,x_attribute_type_names =>x_attribute_type_names
,x_attributes =>x_attributes
,x_component_citems =>x_component_citems
,x_component_attrib_types =>x_component_attrib_types
,x_component_citem_names =>x_component_citem_names
,x_component_owner_ids =>x_component_owner_ids
,x_component_owner_types =>x_component_owner_types
,x_component_sort_orders =>x_component_sort_orders
,x_return_status =>x_return_status
,x_msg_count =>x_msg_count
,x_msg_data =>x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
--DBMS_OUTPUT.put_line('----- get_item -----');
,x_last_updated_by =>x_last_updated_by
,x_last_update_date =>x_last_update_date
,x_attribute_type_codes =>x_attribute_type_codes
,x_attribute_type_names =>x_attribute_type_names
,x_attributes =>x_attributes
,x_component_citems =>x_component_citems
,x_component_attrib_types =>x_component_attrib_types
,x_component_citem_names =>x_component_citem_names
,x_component_owner_ids =>x_component_owner_ids
,x_component_owner_types =>x_component_owner_types
,x_component_sort_orders =>x_component_sort_orders
,x_return_status =>x_return_status
,x_msg_count =>x_msg_count
,x_msg_data =>x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
--DBMS_OUTPUT.put_line('----- get_item -----');
,x_last_updated_by =>x_last_updated_by
,x_last_update_date =>x_last_update_date
,x_attribute_type_codes =>x_attribute_type_codes
,x_attribute_type_names =>x_attribute_type_names
,x_attributes =>x_attributes
,x_component_citems =>x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types =>x_component_attrib_types
,x_component_citem_names =>x_component_citem_names
,x_component_owner_ids =>x_component_owner_ids
,x_component_owner_types =>x_component_owner_types
,x_component_sort_orders =>x_component_sort_orders
,x_return_status =>x_return_status
,x_msg_count =>x_msg_count
,x_msg_data =>x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
--DBMS_OUTPUT.put_line('----- get_item -----');
,x_last_updated_by =>x_last_updated_by
,x_last_update_date =>x_last_update_date
,x_attribute_type_codes =>x_attribute_type_codes
,x_attribute_type_names =>x_attribute_type_names
,x_attributes =>x_attributes
,x_component_citems =>x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types =>x_component_attrib_types
,x_component_citem_names =>x_component_citem_names
,x_component_owner_ids =>x_component_owner_ids
,x_component_owner_types =>x_component_owner_types
,x_component_sort_orders =>x_component_sort_orders
,x_keywords => x_keywords
,x_return_status =>x_return_status
,x_msg_count =>x_msg_count
,x_msg_data =>x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_4000
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) IS
BEGIN
get_trans_item(
p_citem_ver_id => p_citem_ver_id
,p_language => NULL
,p_init_msg_list => p_init_msg_list
,p_api_version_number => p_api_version_number
,x_content_item_id => x_content_item_id
,x_citem_name => x_citem_name
,x_citem_version => x_citem_version
,x_dir_node_id => x_dir_node_id
,x_dir_node_name => x_dir_node_name
,x_dir_node_code => x_dir_node_code
,x_item_status => x_item_status
,x_version_status => x_version_status
,x_citem_description => x_citem_description
,x_ctype_code => x_ctype_code
,x_ctype_name => x_ctype_name
,x_start_date => x_start_date
,x_end_date => x_end_date
,x_owner_resource_id => x_owner_resource_id
,x_owner_resource_type => x_owner_resource_type
,x_reference_code => x_reference_code
,x_trans_required => x_trans_required
,x_parent_item_id => x_parent_item_id
,x_locked_by => x_locked_by
,x_wd_restricted => x_wd_restricted
,x_attach_file_id => x_attach_file_id
,x_attach_file_name => x_attach_file_name
,x_attach_mime_type => x_attach_mime_type
,x_attach_mime_name => x_attach_mime_name
,x_rendition_file_ids => x_rendition_file_ids
,x_rendition_file_names => x_rendition_file_names
,x_rendition_mime_types => x_rendition_mime_types
,x_rendition_mime_names => x_rendition_mime_names
,x_default_rendition => x_default_rendition
,x_object_version_number => x_object_version_number
,x_created_by => x_created_by
,x_creation_date => x_creation_date
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => x_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_updated_by OUT NOCOPY NUMBER
,x_last_update_date OUT NOCOPY DATE
,x_attribute_type_codes OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_attribute_type_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_attributes OUT NOCOPY JTF_VARCHAR2_TABLE_32767
,x_component_citems OUT NOCOPY JTF_NUMBER_TABLE
,x_component_citem_ver_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_attrib_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_citem_names OUT NOCOPY JTF_VARCHAR2_TABLE_300
,x_component_owner_ids OUT NOCOPY JTF_NUMBER_TABLE
,x_component_owner_types OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_component_sort_orders OUT NOCOPY JTF_NUMBER_TABLE
,x_keywords OUT NOCOPY JTF_VARCHAR2_TABLE_100
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) IS
BEGIN
get_trans_item(
p_citem_ver_id => p_citem_ver_id
,p_language => NULL
,p_init_msg_list => p_init_msg_list
,p_api_version_number => p_api_version_number
,x_content_item_id => x_content_item_id
,x_citem_name => x_citem_name
,x_citem_version => x_citem_version
,x_dir_node_id => x_dir_node_id
,x_dir_node_name => x_dir_node_name
,x_dir_node_code => x_dir_node_code
,x_item_status => x_item_status
,x_version_status => x_version_status
,x_citem_description => x_citem_description
,x_ctype_code => x_ctype_code
,x_ctype_name => x_ctype_name
,x_start_date => x_start_date
,x_end_date => x_end_date
,x_owner_resource_id => x_owner_resource_id
,x_owner_resource_type => x_owner_resource_type
,x_reference_code => x_reference_code
,x_trans_required => x_trans_required
,x_parent_item_id => x_parent_item_id
,x_locked_by => x_locked_by
,x_wd_restricted => x_wd_restricted
,x_attach_file_id => x_attach_file_id
,x_attach_file_name => x_attach_file_name
,x_attach_mime_type => x_attach_mime_type
,x_attach_mime_name => x_attach_mime_name
,x_rendition_file_ids => x_rendition_file_ids
,x_rendition_file_names => x_rendition_file_names
,x_rendition_mime_types => x_rendition_mime_types
,x_rendition_mime_names => x_rendition_mime_names
,x_default_rendition => x_default_rendition
,x_object_version_number => x_object_version_number
,x_created_by => x_created_by
,x_creation_date => x_creation_date
,x_last_updated_by => x_last_updated_by
,x_last_update_date => x_last_update_date
,x_attribute_type_codes => x_attribute_type_codes
,x_attribute_type_names => x_attribute_type_names
,x_attributes => x_attributes
,x_component_citems => x_component_citems
,x_component_citem_ver_ids => x_component_citem_ver_ids
,x_component_attrib_types => x_component_attrib_types
,x_component_citem_names => x_component_citem_names
,x_component_owner_ids => x_component_owner_ids
,x_component_owner_types => x_component_owner_types
,x_component_sort_orders => x_component_sort_orders
,x_keywords => x_keywords
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
PROCEDURE insert_components(
p_citem_ver_id IN NUMBER
,p_content_item_ids IN JTF_NUMBER_TABLE
,p_citem_ver_ids IN JTF_NUMBER_TABLE
,p_attribute_type_codes IN JTF_VARCHAR2_TABLE_100
,p_sort_order IN JTF_NUMBER_TABLE
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'insert_component_items'; --|**|
insert_data CHAR(1);
SAVEPOINT svpt_insert_components;
SAVEPOINT svpt_insert_components; --|**|
p_proc_name => 'Insert_Components',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_citem_ver_id', p_citem_ver_id,
'p_content_item_ids', IBC_DEBUG_PVT.make_list(p_content_item_ids),
'p_attribute_type_codes', IBC_DEBUG_PVT.make_list(p_attribute_type_codes),
'p_sort_order', IBC_DEBUG_PVT.make_list(p_sort_order),
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list
)
)
);
insert_component_items_int(
p_citem_ver_id => p_citem_ver_id
,p_content_item_id => content_item_id
,p_content_item_ids => p_content_item_ids
,p_citem_ver_ids => p_citem_ver_ids
,p_attribute_type_codes => p_attribute_type_codes
,p_ctype_code => ctype_code
,p_sort_order => p_sort_order
,p_log_action => FND_API.g_true
,x_return_status => x_return_status
);
ROLLBACK TO svpt_insert_components;
ROLLBACK TO svpt_insert_components;
ROLLBACK TO svpt_insert_components;
PROCEDURE insert_components(
p_citem_ver_id IN NUMBER
,p_content_item_ids IN JTF_NUMBER_TABLE
,p_attribute_type_codes IN JTF_VARCHAR2_TABLE_100
,p_sort_order IN JTF_NUMBER_TABLE
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
insert_components(
p_citem_ver_id => p_citem_ver_id
,p_content_item_ids => p_content_item_ids
,p_citem_ver_ids => NULL
,p_attribute_type_codes => p_attribute_type_codes
,p_sort_order => p_sort_order
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
END insert_components;
PROCEDURE insert_associations(
p_content_item_id IN NUMBER
,p_assoc_type_codes IN JTF_VARCHAR2_TABLE_100
,p_assoc_objects1 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects2 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects3 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects4 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects5 IN JTF_VARCHAR2_TABLE_300
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
BEGIN
insert_associations(
p_content_item_id => p_content_item_id
,p_citem_version_id => NULL
,p_assoc_type_codes => p_assoc_type_codes
,p_assoc_objects1 => p_assoc_objects1
,p_assoc_objects2 => p_assoc_objects2
,p_assoc_objects3 => p_assoc_objects3
,p_assoc_objects4 => p_assoc_objects4
,p_assoc_objects5 => p_assoc_objects5
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
END insert_associations;
PROCEDURE insert_associations(
p_content_item_id IN NUMBER
,p_citem_version_id IN NUMBER
,p_assoc_type_codes IN JTF_VARCHAR2_TABLE_100
,p_assoc_objects1 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects2 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects3 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects4 IN JTF_VARCHAR2_TABLE_300
,p_assoc_objects5 IN JTF_VARCHAR2_TABLE_300
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'insert_citem_association';--|**|
SAVEPOINT svpt_insert_associations; --|**|
p_proc_name => 'Insert_Associations',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_content_item_id', p_content_item_id,
'p_citem_version_id', p_citem_version_id,
'p_assoc_type_codes', IBC_DEBUG_PVT.make_list(p_assoc_type_codes),
'p_assoc_objects1', IBC_DEBUG_PVT.make_list(p_assoc_objects1),
'p_assoc_objects2', IBC_DEBUG_PVT.make_list(p_assoc_objects2),
'p_assoc_objects3', IBC_DEBUG_PVT.make_list(p_assoc_objects3),
'p_assoc_objects4', IBC_DEBUG_PVT.make_list(p_assoc_objects4),
'p_assoc_objects5', IBC_DEBUG_PVT.make_list(p_assoc_objects5),
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list
)
)
);
insert_citem_associations_int(
p_content_item_id => p_content_item_id
,p_citem_version_id => p_citem_version_id
,p_assoc_type_codes => p_assoc_type_codes
,p_assoc_objects1 => p_assoc_objects1
,p_assoc_objects2 => p_assoc_objects2
,p_assoc_objects3 => p_assoc_objects3
,p_assoc_objects4 => p_assoc_objects4
,p_assoc_objects5 => p_assoc_objects5
,p_log_action => FND_API.g_true
,x_return_status => x_return_status
);
ROLLBACK TO svpt_insert_associations;
ROLLBACK TO svpt_insert_associations;
ROLLBACK TO svpt_insert_associations;
PROCEDURE insert_minimum_item(
p_ctype_code IN VARCHAR2
,p_citem_name IN VARCHAR2
,p_citem_description IN VARCHAR2
,p_lock_flag IN VARCHAR2
,p_dir_node_id IN NUMBER
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_citem_ver_id OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)
IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'insert_minimum_item'; --|**|
SAVEPOINT svpt_insert_minimum_item; --|**|
p_proc_name => 'Insert_Minimum_Item',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_ctype_code', p_ctype_code,
'p_citem_name', p_citem_name,
'p_citem_description', p_citem_description,
'p_lock_flag', p_lock_flag,
'p_dir_node_id', p_dir_node_id,
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list,
'px_content_item_id', px_content_item_id,
'px_object_version_number', px_object_version_number
)
)
);
Ibc_Content_Items_Pkg.insert_row(
x_rowid => row_id
,px_content_item_id => px_content_item_id
,p_content_type_code => p_ctype_code
,p_item_reference_code => NULL
,p_directory_node_id => p_dir_node_id
,p_live_citem_version_id => NULL
,p_content_item_status => status
,p_locked_by_user_id => locked_by
,p_wd_restricted_flag => FND_API.g_false
,p_base_language => USERENV('LANG')
,p_translation_required_flag => FND_API.g_false
,p_owner_resource_id => FND_GLOBAL.USER_ID
,p_owner_resource_type => 'USER'
,p_application_id => NULL
,p_parent_item_id => NULL
,p_request_id => NULL
,p_object_version_number => G_OBJ_VERSION_DEFAULT
);
Ibc_Citem_Versions_Pkg.insert_base_lang(
x_rowid => row_id
,px_citem_version_id => x_citem_ver_id
,p_content_item_id => px_content_item_id
,p_version_number => current_version
,p_citem_version_status => status
,p_start_date => NULL
,p_end_date => NULL
,px_object_version_number => px_object_version_number
,p_attribute_file_id => NULL
,p_attachment_file_id => NULL
,p_attachment_attribute_code => NULL
,p_content_item_name => p_citem_name
,p_attachment_file_name => NULL
,p_description => p_citem_description
);
ROLLBACK TO svpt_insert_minimum_item;
ROLLBACK TO svpt_insert_minimum_item;
ROLLBACK TO svpt_insert_minimum_item;
SELECT
MIN(civtl.attribute_file_id), ci.base_language
INTO
file_id,
base_language
FROM
ibc_citem_versions_tl civtl,
ibc_citem_versions_b civb,
ibc_content_items ci
WHERE
civb.content_item_id = ci.content_item_id
AND
civb.citem_version_id = p_citem_ver_id
AND
civtl.citem_version_id = civb.citem_version_id
AND
civtl.LANGUAGE = ci.base_language -- Updated by Edward to fix bug# 3405512 re: USERENV('LANG');
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
return_status := deleteAttributeBundle(p_citem_ver_id);
Ibc_Utilities_Pvt.insert_attribute_bundle(
x_lob_file_id => file_id
,p_new_bundle => bundle_text
,x_return_status => return_status
);
FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_INSERT_ERROR');
Ibc_Citem_Versions_Pkg.update_row(
p_citem_version_id => p_citem_ver_id
,p_content_item_id => content_item_id
,p_attribute_file_id => file_id
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering content item version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => USERENV('LANG')
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering attribute bundle'
);
SELECT file_name, file_content_type
FROM fnd_lobs
WHERE file_id = p_file_id;
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
SELECT attachment_file_id
INTO l_current_attachment_file_id
FROM ibc_citem_versions_tl
WHERE citem_version_id = p_citem_ver_id;
DELETE FROM ibc_renditions
WHERE citem_version_id = p_citem_ver_id
AND LANGUAGE = p_language
AND file_id = l_current_attachment_file_id;
DELETE FROM ibc_renditions
WHERE citem_version_id = p_citem_ver_id
AND LANGUAGE = p_language;
Ibc_Citem_Versions_Pkg.update_row (
p_citem_version_id => p_citem_ver_id
,p_content_item_id => content_item_id
,p_attachment_file_id => Conv_To_TblHandler(p_attach_file_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_attachment_file_name => Conv_To_TblHandler(att_file_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_attachment_attribute_code => Conv_To_TblHandler(att_type_code) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_default_rendition_mime_type => Conv_To_TblHandler(l_attach_rendition_mtype) -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering content item version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => USERENV('LANG')
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering attachment:'||p_attach_file_id
);
IBC_RENDITIONS_PKG.insert_row(
Px_rowid => l_row_id
,Px_RENDITION_ID => l_rendition_id
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,P_LANGUAGE => p_language
,P_FILE_ID => Conv_To_TblHandler(p_attach_file_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_FILE_NAME => Conv_To_TblHandler(att_file_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_CITEM_VERSION_ID => p_citem_ver_id
,P_MIME_TYPE => Conv_To_TblHandler(l_attach_rendition_mtype) -- Updated for STANDARD/perf change of G_MISS_xxx
);
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
Ibc_Content_Items_Pkg.update_row (
p_content_item_id => p_content_item_id
,p_directory_node_id => Conv_To_TblHandler(directory_node) -- Update for STANDARD/perf change of G_MISS_xxx
,p_wd_restricted_flag => Conv_To_TblHandler(p_wd_restricted) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_translation_required_flag => Conv_To_TblHandler(p_trans_required) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_owner_resource_id => Conv_To_TblHandler(p_new_owner_resource_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_owner_resource_type => Conv_To_TblHandler(p_new_owner_resource_type) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_parent_item_id => Conv_To_TblHandler(p_parent_item_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => p_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering content item meta data'
);
SELECT 'X'
FROM IBC_CONTENT_ITEMS CITEM,
IBC_CITEM_VERSIONS_B CIVER
WHERE CITEM.content_item_id = CIVER.content_item_id
AND CITEM.content_item_id = p_content_item_id
AND CIVER.citem_version_id = p_citem_ver_id;
Ibc_Content_Items_Pkg.update_row (
p_CONTENT_ITEM_ID => p_content_item_id
,p_LIVE_CITEM_VERSION_ID => p_citem_ver_id
,px_object_version_number => px_object_version_number
);
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
Ibc_Citem_Versions_Pkg.update_row (
p_citem_version_id => p_citem_ver_id
,p_content_item_id => content_item_id
,p_start_date => Conv_To_TblHandler(p_start_date) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_end_date => Conv_To_TblHandler(p_end_date) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_content_item_name => Conv_To_TblHandler(p_citem_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_description => Conv_To_TblHandler(p_citem_description) -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering content item version'
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => p_citem_ver_id
,p_object_value2 => USERENV('LANG')
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Altering version meta data'
);
SELECT
content_item_id
,live_citem_version_id
,base_language
,locked_by_user_id
,directory_node_id
INTO
temp
,citem_version_id
,base_lang
,locked_by
,dir_id
FROM
ibc_content_items
WHERE
content_item_id = p_content_item_id;
Ibc_Content_Items_Pkg.update_row (
p_content_item_id => p_content_item_id
,p_content_item_status => new_status
,p_locked_by_user_id => FND_API.G_MISS_NUM -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
UPDATE
ibc_content_items
SET
locked_by_user_id = NULL
WHERE
content_item_id = p_content_item_id;
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)IS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'upsert_item_full'; --|**|
p_object_ver_num NUMBER := 1; -- object version number (static since this is insert only)
SELECT file_name, file_content_type
FROM fnd_lobs
WHERE file_id = p_file_id;
'p_update', p_update,
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list,
'px_content_item_id', px_content_item_id,
'px_citem_ver_id', px_citem_ver_id,
'px_object_version_number', px_object_version_number
)
)
);
Ibc_Content_Items_Pkg.insert_row(
x_ROWID => row_id
,px_CONTENT_ITEM_ID => px_content_item_id
,p_CONTENT_TYPE_CODE => p_ctype_code
,p_ITEM_REFERENCE_CODE => p_reference_code
,p_DIRECTORY_NODE_ID => directory_node
,p_LIVE_CITEM_VERSION_ID => NULL
,p_CONTENT_ITEM_STATUS => Ibc_Utilities_Pub.G_STI_PENDING
,p_LOCKED_BY_USER_ID => locked_by
,p_WD_RESTRICTED_FLAG => p_wd_restricted
,p_BASE_LANGUAGE => lang
,p_TRANSLATION_REQUIRED_FLAG => p_trans_required
,p_OWNER_RESOURCE_ID => p_new_owner_resource_id
,p_OWNER_RESOURCE_TYPE => p_new_owner_resource_type
,p_APPLICATION_ID => NULL
,p_PARENT_ITEM_ID => p_parent_item_id
,p_REQUEST_ID => NULL
,p_object_version_number => px_object_version_number
);
IF (do_item IN (G_COMMAND_UPDATE,G_COMMAND_POST_APPROVAL_UPDATE)) THEN
-- ***************PERMISSION CHECK*********************************************************************
IF (hasPermission(px_content_item_id) = FND_API.g_false) THEN --|*|
--DBMS_OUTPUT.put_line('EX - no lock permissions'); --|*|
Ibc_Content_Items_Pkg.update_row(
p_CONTENT_ITEM_ID => px_content_item_id
,p_ITEM_REFERENCE_CODE => Conv_To_TblHandler(p_reference_code) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_DIRECTORY_NODE_ID => Conv_To_TblHandler(directory_node) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_LOCKED_BY_USER_ID => Conv_To_TblHandler(locked_by) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_WD_RESTRICTED_FLAG => Conv_To_TblHandler(p_wd_restricted) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_TRANSLATION_REQUIRED_FLAG => Conv_To_TblHandler(p_trans_required) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_OWNER_RESOURCE_ID => Conv_To_TblHandler(p_new_owner_resource_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_OWNER_RESOURCE_TYPE => Conv_To_TblHandler(p_new_owner_resource_type) -- Updated for STANDARD/perf change of G_MISS_xxx
,p_PARENT_ITEM_ID => Conv_To_TblHandler(p_parent_item_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,px_object_version_number => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => px_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating content item with upsert api'
);
(do_version <> G_COMMAND_POST_APPROVAL_UPDATE)) THEN
-- Delete all existing renditions
DELETE FROM ibc_renditions
WHERE citem_version_id = px_citem_ver_id
AND LANGUAGE = lang;
(do_version <> G_COMMAND_POST_APPROVAL_UPDATE)) THEN
-- Delete existing renditions
DELETE FROM ibc_renditions
WHERE citem_version_id = px_citem_ver_id
AND LANGUAGE = lang;
(do_version <> G_COMMAND_POST_APPROVAL_UPDATE)) THEN
IF (IBC_VALIDATE_PVT.isValidAttachment(p_attach_file_id) = FND_API.g_false) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
(do_version <> G_COMMAND_POST_APPROVAL_UPDATE) ) THEN
-- creating temporary lob
DBMS_LOB.createtemporary(bundle_text, TRUE, 2);
Ibc_Utilities_Pvt.insert_attribute_bundle(
x_lob_file_id => bundle_file_id
,p_new_bundle => bundle_text
,x_return_status => x_return_status
);
FND_MESSAGE.set_token('SITUATION', 'Insertion');
Ibc_Citem_Versions_Pkg.insert_base_lang(
X_ROWID => row_id
,PX_CITEM_VERSION_ID => px_citem_ver_id
,P_CONTENT_ITEM_ID => px_content_item_id
,P_VERSION_NUMBER => current_version
,P_CITEM_VERSION_STATUS => bulk_status
,P_START_DATE => p_start_date
,P_END_DATE => p_end_date
,P_ATTRIBUTE_FILE_ID => bundle_file_id
,P_ATTACHMENT_FILE_ID => p_attach_file_id
,P_ATTACHMENT_FILE_NAME => l_attach_file_name
,P_DEFAULT_RENDITION_MIME_TYPE => l_attach_rendition_mtype
,P_ATTACHMENT_ATTRIBUTE_CODE => attach_code
,P_SOURCE_LANG => lang
,P_CONTENT_ITEM_NAME => p_citem_name
,P_DESCRIPTION => p_citem_description
,PX_OBJECT_VERSION_NUMBER => px_object_version_number
);
x_return_status := deleteAttributeBundle(
f_citem_ver_id => px_citem_ver_id
,f_language => lang
,f_log_action => p_log_action
);
(do_version IN (G_COMMAND_UPDATE,G_COMMAND_TRANSLATE))) THEN
-- set type of permission check
IF (do_version = G_COMMAND_TRANSLATE) THEN
perm_code.extend;
Ibc_Citem_Versions_Pkg.update_row(
P_CITEM_VERSION_ID => px_citem_ver_id
,P_CONTENT_ITEM_ID => px_content_item_id
,P_SOURCE_LANG => lang
,P_CITEM_VERSION_STATUS => Conv_To_TblHandler(bulk_status) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_START_DATE => Conv_To_TblHandler(p_start_date) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_END_DATE => Conv_To_TblHandler(p_end_date) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_ATTRIBUTE_FILE_ID => Conv_To_TblHandler(bundle_file_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_ATTACHMENT_FILE_ID => Conv_To_TblHandler(p_attach_file_id) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_ATTACHMENT_FILE_NAME => Conv_To_TblHandler(l_attach_file_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_DEFAULT_RENDITION_MIME_TYPE => Conv_To_TblHandler(l_attach_rendition_mtype) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_ATTACHMENT_ATTRIBUTE_CODE => Conv_To_TblHandler(attach_code) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_CONTENT_ITEM_NAME => Conv_To_TblHandler(p_citem_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_DESCRIPTION => Conv_To_TblHandler(p_citem_description) -- Updated for STANDARD/perf change of G_MISS_xxx
,PX_OBJECT_VERSION_NUMBER => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => px_content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => px_citem_ver_id
,p_object_value2 => lang
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating content item version with upsert api'
);
END IF; -- END UPDATE OF CONTENT VERSION -----------------------------------------
(do_version IN (G_COMMAND_POST_APPROVAL_UPDATE))) THEN
-- set type of permission check
IF (do_version = G_COMMAND_POST_APPROVAL_UPDATE) THEN
perm_code.extend;
Ibc_Citem_Versions_Pkg.update_row(
P_CITEM_VERSION_ID => px_citem_ver_id
,P_CONTENT_ITEM_ID => px_content_item_id
,P_SOURCE_LANG => lang
,P_CONTENT_ITEM_NAME => Conv_To_TblHandler(p_citem_name) -- Updated for STANDARD/perf change of G_MISS_xxx
,P_DESCRIPTION => Conv_To_TblHandler(p_citem_description) -- Updated for STANDARD/perf change of G_MISS_xxx
,PX_OBJECT_VERSION_NUMBER => px_object_version_number
);
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => px_content_item_id
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CITEM_VERSION
,p_object_value1 => px_citem_ver_id
,p_object_value2 => lang
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating of content item version post approval with upsert api'
);
END IF; -- END UPDATE POST APPROVAL OF VERSION ----------------------------------
do_version <> G_COMMAND_POST_APPROVAL_UPDATE) THEN
-- Insert all renditions
FOR I IN 1..p_item_renditions.COUNT LOOP
-- The default rendition will be handle by IBC_CIEM_VERSIONS_PKG
-- Here only the non-default renditions will be inserted.
OPEN c_lob(p_item_renditions(I));
IBC_RENDITIONS_PKG.insert_row(
Px_rowid => row_id
,Px_RENDITION_ID => l_rendition_id
,p_object_version_number => G_OBJ_VERSION_DEFAULT
,P_LANGUAGE => lang
,P_FILE_ID => p_item_renditions(I)
,P_FILE_NAME => l_attach_file_name
,P_CITEM_VERSION_ID => px_citem_ver_id
,P_MIME_TYPE => l_attach_rendition_mtype
);
IF ( (do_version = G_COMMAND_UPDATE) AND (p_update = FND_API.g_true) ) THEN
--delete all components before adding new ones!
--DBMS_OUTPUT.put_line('DELETING OLD COMPONENTS');
DELETE FROM
ibc_compound_relations
WHERE
citem_version_id = px_citem_ver_id;
do_version <> G_COMMAND_POST_APPROVAL_UPDATE AND
p_component_citems(1) <> 0) THEN
-- translations cannot update components.
insert_component_items_int(
p_citem_ver_id => px_citem_ver_id
,p_content_item_id => px_content_item_id
,p_content_item_ids => p_component_citems
,p_citem_ver_ids => p_component_citem_ver_ids
,p_attribute_type_codes => p_component_atypes
,p_ctype_code => p_ctype_code
,p_sort_order => p_sort_order
,p_log_action => p_log_action
,x_return_status => x_return_status
);
IF ((do_version IN (G_COMMAND_UPDATE,G_COMMAND_POST_APPROVAL_UPDATE)) AND
(p_update = FND_API.g_true) ) THEN
DELETE
FROM ibc_citem_keywords
WHERE content_item_id = px_content_item_id;
IBC_CITEM_KEYWORDS_PKG.insert_row(
x_rowid => row_id
,p_content_item_id => px_content_item_id
,p_keyword => p_keywords(I)
,p_object_version_number => 1
);
(do_version NOT IN (G_COMMAND_TRANSLATE,G_COMMAND_POST_APPROVAL_UPDATE))) THEN
approve_citem_version_int(
p_citem_ver_id => px_citem_ver_id
,p_content_item_id => px_content_item_id
,p_base_lang => base_lang
,p_log_action => p_log_action
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
);
(do_version = G_COMMAND_POST_APPROVAL_UPDATE)) THEN
IBC_CITEM_WORKFLOW_PVT.Notify_Translator(p_content_item_id => px_content_item_id );
'p_update', p_update,
'p_commit', p_commit,
'p_api_version_number', p_api_version_number,
'p_init_msg_list', p_init_msg_list,
'px_content_item_id', px_content_item_id,
'px_citem_ver_id', px_citem_ver_id,
'px_object_version_number', px_object_version_number
)
)
);
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)IS
l_tmp_attributes JTF_VARCHAR2_TABLE_32767;
,p_update => p_update
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,px_content_item_id => px_content_item_id
,px_citem_ver_id => px_citem_ver_id
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) IS
l_attach_file_id NUMBER;
,p_update => p_update
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,px_content_item_id => px_content_item_id
,px_citem_ver_id => px_citem_ver_id
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)IS
BEGIN
upsert_item_full(
p_ctype_code => p_ctype_code
,p_citem_name => p_citem_name
,p_citem_description => p_citem_description
,p_dir_node_id => p_dir_node_id
,p_owner_resource_id => p_owner_resource_id
,p_owner_resource_type => p_owner_resource_type
,p_reference_code => p_reference_code
,p_trans_required => p_trans_required
,p_parent_item_id => p_parent_item_id
,p_lock_flag => p_lock_flag
,p_wd_restricted => p_wd_restricted
,p_start_date => p_start_date
,p_end_date => p_end_date
,p_attribute_type_codes => p_attribute_type_codes
,p_attributes => p_attributes
,p_attach_file_ids => p_attach_file_ids
,p_default_rendition => p_default_rendition
,p_component_citems => p_component_citems
,p_component_citem_ver_ids => p_component_citem_ver_ids
,p_component_atypes => p_component_atypes
,p_sort_order => p_sort_order
,p_keywords => NULL
,p_status => p_status
,p_log_action => p_log_action
,p_language => p_language
,p_update => p_update
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,px_content_item_id => px_content_item_id
,px_citem_ver_id => px_citem_ver_id
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
)IS
BEGIN
upsert_item_full(
p_ctype_code => p_ctype_code
,p_citem_name => p_citem_name
,p_citem_description => p_citem_description
,p_dir_node_id => p_dir_node_id
,p_owner_resource_id => p_owner_resource_id
,p_owner_resource_type => p_owner_resource_type
,p_reference_code => p_reference_code
,p_trans_required => p_trans_required
,p_parent_item_id => p_parent_item_id
,p_lock_flag => p_lock_flag
,p_wd_restricted => p_wd_restricted
,p_start_date => p_start_date
,p_end_date => p_end_date
,p_attribute_type_codes => p_attribute_type_codes
,p_attributes => p_attributes
,p_attach_file_ids => p_attach_file_ids
,p_default_rendition => p_default_rendition
,p_component_citems => p_component_citems
,p_component_citem_ver_ids => NULL
,p_component_atypes => p_component_atypes
,p_sort_order => p_sort_order
,p_status => p_status
,p_log_action => p_log_action
,p_language => p_language
,p_update => p_update
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,px_content_item_id => px_content_item_id
,px_citem_ver_id => px_citem_ver_id
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,p_update IN VARCHAR2
,p_commit IN VARCHAR2
,p_api_version_number IN NUMBER
,p_init_msg_list IN VARCHAR2
,px_content_item_id IN OUT NOCOPY NUMBER
,px_citem_ver_id IN OUT NOCOPY NUMBER
,px_object_version_number IN OUT NOCOPY NUMBER
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) IS
l_attach_file_ids JTF_NUMBER_TABLE;
,p_update => p_update
,p_commit => p_commit
,p_api_version_number => p_api_version_number
,p_init_msg_list => p_init_msg_list
,px_content_item_id => px_content_item_id
,px_citem_ver_id => px_citem_ver_id
,px_object_version_number => px_object_version_number
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
PROCEDURE hard_delete_item_versions(
p_api_version IN NUMBER
,p_init_msg_list IN VARCHAR2
,p_commit IN VARCHAR2
,p_citem_version_ids IN JTF_NUMBER_TABLE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) AS
--******** local variable for standards **********
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'hard_delete_item_versions';--|**|
SELECT
CITEM_VERSION_STATUS
,ATTRIBUTE_FILE_ID
FROM
IBC_CITEM_VERSIONS_VL
WHERE
CITEM_VERSION_ID = l_citem_version_id;
SAVEPOINT HARD_DELETE_ITEM_VERSIONS_PT;
p_proc_name => 'Hard_Delete_Item_Versions',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_api_version', p_api_version,
'p_init_msg_list', p_init_msg_list,
'p_commit', p_commit,
'p_citem_version_ids', IBC_DEBUG_PVT.make_list(p_citem_version_ids)
)
)
);
FND_MESSAGE.Set_Name('IBC', 'INVALID_HARD_DELETE');
Ibc_Citem_Versions_Pkg.DELETE_ROW(l_citem_version_id);
DELETE FROM ibc_renditions WHERE citem_Version_id = l_citem_version_id;
DELETE FROM IBC_ATTRIBUTE_BUNDLES WHERE attribute_bundle_id = l_citem_version_attr_id;
DELETE FROM IBC_COMPOUND_RELATIONS WHERE CITEM_VERSION_ID = l_citem_version_id;
p_activity => Ibc_Utilities_Pvt.G_ALA_UPDATE
,p_parent_value => NULL
,p_object_type => Ibc_Utilities_Pvt.G_ALO_CONTENT_ITEM
,p_object_value1 => l_content_item_id
,p_object_value2 => NULL
,p_object_value3 => NULL
,p_object_value4 => NULL
,p_object_value5 => NULL
,p_description => 'Updating content item (hard-deleting its versions)'
);
ROLLBACK TO HARD_DELETE_ITEM_VERSIONS_PT;
ROLLBACK TO HARD_DELETE_ITEM_VERSIONS_PT;
ROLLBACK TO HARD_DELETE_ITEM_VERSIONS_PT;
PROCEDURE hard_delete_items (
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
p_commit IN VARCHAR2,
p_content_item_ids IN JTF_NUMBER_TABLE,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2
) AS
--******************* BEGIN REQUIRED VARIABLES *************************
l_api_name CONSTANT VARCHAR2(30) := 'hard_delete_items'; --|**|
SELECT CITEM_VERSION_ID, ATTRIBUTE_FILE_ID
FROM IBC_CITEM_VERSIONS_VL
WHERE CONTENT_ITEM_ID = l_citem_id;
SAVEPOINT HARD_DELETE_ITEMS_PT;
p_proc_name => 'Hard_Delete_Items',
p_parms => IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'PARAMETERS',
p_parms => JTF_VARCHAR2_TABLE_4000(
'p_api_version', p_api_version,
'p_init_msg_list', p_init_msg_list,
'p_commit', p_commit,
'p_content_item_ids', IBC_DEBUG_PVT.make_list(p_content_item_ids)
)
)
);
Ibc_Citem_Versions_Pkg.DELETE_ROW(citem_version_rec.CITEM_VERSION_ID);
DELETE FROM ibc_renditions WHERE citem_version_id = citem_version_Rec.citem_version_id;
DELETE FROM IBC_ATTRIBUTE_BUNDLES WHERE attribute_bundle_id = citem_version_rec.ATTRIBUTE_FILE_ID;
DELETE FROM IBC_COMPOUND_RELATIONS WHERE CITEM_VERSION_ID = citem_version_rec.CITEM_VERSION_ID;
DELETE FROM ibc_citem_keywords WHERE CONTENT_ITEM_ID = l_citem_id;
DELETE FROM IBC_COMPOUND_RELATIONS WHERE CONTENT_ITEM_ID = l_citem_id;
DELETE FROM IBC_CONTENT_ITEMS WHERE CONTENT_ITEM_ID = l_citem_id;
DELETE FROM IBC_CITEM_VERSION_LABELS WHERE CONTENT_ITEM_ID = l_citem_id;
DELETE FROM IBC_ASSOCIATIONS WHERE CONTENT_ITEM_ID = l_citem_id;
ROLLBACK TO HARD_DELETE_ITEMS_PT;
ROLLBACK TO HARD_DELETE_ITEMS_PT;
ROLLBACK TO HARD_DELETE_ITEMS_PT;
FND_MESSAGE.Set_Name('IBC', 'UPDATE_APPROVED_ITEM_ERROR');
FND_MESSAGE.Set_Name('IBC', 'IBC_TRANSLATION_UPDATE_ERROR');
Ibc_Citem_Versions_Pkg.update_row(
p_CITEM_VERSION_ID => p_citem_ver_id
,p_content_item_id => content_item_id
,p_citem_translation_status => p_new_status
,P_SOURCE_LANG => p_language
,px_object_version_number => px_object_version_number
);
l_activity := Ibc_Utilities_Pvt.G_ALA_UPDATE;
SELECT 'X'
FROM ibc_citem_versions_b
WHERE content_item_id = p_content_item_id
AND citem_version_status = p_citem_version_status;
SELECT 'X'
FROM ibc_content_items
WHERE content_item_id = p_content_item_id
AND NVL(locked_by_user_id,FND_GLOBAL.user_id) = FND_GLOBAL.user_id;