IMPEX IMPORT and EXPORT Script to export and import the content of any of the website to another website.

 "#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxProductCatalog"")){String newValue = StringUtils.replace(value, ""mxProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"



$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: ContentSlot ----

"#% impex.setTargetFile( ""ContentSlot.csv"" );"

insert_update ContentSlot ; &Item ; activeFrom[dateformat=dd.MM.yyyy hh:mm:ss] ; activeUntil[dateformat=dd.MM.yyyy hh:mm:ss] ; active[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; currentPosition ; display[allownull=true] ; name ; originalSlot(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; cmsComponents(catalogVersion(catalog(id),version),uid)

"#% impex.exportItems(""SELECT {CS:pk} FROM {ContentSlot as CS}, {CatalogVersion as CV}, {Catalog as C} WHERE {CS:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ContentSlot ; &Item ; activeFrom[dateformat=dd.MM.yyyy hh:mm:ss] ; activeUntil[dateformat=dd.MM.yyyy hh:mm:ss] ; active[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; currentPosition ; display[allownull=true] ; name ; originalSlot(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; cmsComponents(catalogVersion(catalog(id),version),uid)

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ContentSlot.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




#---------------------------------$contentCV is treated as string instead of PK ,directly put the catalogversion ID as per env.

#-- Local PK 8796094726745 for mxContentCatalog:Staged

#-- Dev  MX Content Catalog Staged 8796094726745

#-- Dev2  MX Content Catalog Staged 8796094726745


$contentCatalog=mxContentCatalog

$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]

# ---- Extension: cms2 ---- Type: ContentSlotName ----

"#% impex.setTargetFile( ""ContentSlotName.csv"" );"

insert ContentSlotName ; &Item ; compTypeGroup(code) ; name[allownull=true] ; template(catalogVersion(catalog(id),version),uid)[allownull=true,forceWrite=true] ; templatePOS

"#% impex.exportItems(""select {CSN:pk} from {ContentSlotName as CSN join PageTemplate as PT on {CSN:template}={PT.pk} and {PT:catalogversion}='8796094726745'}"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert ContentSlotName ; &Item ; compTypeGroup(code) ; name[allownull=true] ; template(catalogVersion(catalog(id),version),uid)[allownull=true,forceWrite=true] ; templatePOS

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ContentSlotName.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: ContentSlotForTemplate ----

"#% impex.setTargetFile( ""ContentSlotForTemplate.csv"" );"

insert_update ContentSlotForTemplate ; &Item ; allowOverwrite[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; contentSlot(catalogVersion(catalog(id),version),uid)[allownull=true] ; pageTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; position[allownull=true] ; uid[unique=true,allownull=true]

"#% impex.exportItems(""SELECT {CST:pk} FROM {ContentSlotForTemplate as CST}, {CatalogVersion as CV}, {Catalog as C} WHERE {CST:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ContentSlotForTemplate ; &Item ; allowOverwrite[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; contentSlot(catalogVersion(catalog(id),version),uid)[allownull=true] ; pageTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; position[allownull=true] ; uid[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ContentSlotForTemplate.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: ContentSlotForPage ----

"#% impex.setTargetFile( ""ContentSlotForPage.csv"" );"

insert_update ContentSlotForPage ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; contentSlot(catalogVersion(catalog(id),version),uid)[allownull=true] ; page(catalogVersion(catalog(id),version),uid)[allownull=true] ; position[allownull=true] ; uid[unique=true,allownull=true]

"#% impex.exportItems(""SELECT {CSP:pk} FROM {ContentSlotForPage as CSP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CSP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ContentSlotForPage ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; contentSlot(catalogVersion(catalog(id),version),uid)[allownull=true] ; page(catalogVersion(catalog(id),version),uid)[allownull=true] ; position[allownull=true] ; uid[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ContentSlotForPage.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: PageTemplate ----

"#% impex.setTargetFile( ""PageTemplate.csv"" );"

insert_update PageTemplate ; &Item ; active[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; frontendTemplateName ; name ; previewIcon(catalogVersion(catalog(id),version),code) ; uid[unique=true,allownull=true] ; velocityTemplate

"#% impex.exportItems(""SELECT {PT:pk} FROM {PageTemplate as PT}, {CatalogVersion as CV}, {Catalog as C} WHERE {PT:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {PT:active}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update PageTemplate ; &Item ; active[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; frontendTemplateName ; name ; previewIcon(catalogVersion(catalog(id),version),code) ; uid[unique=true,allownull=true] ; velocityTemplate

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""PageTemplate.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: CMSParagraphComponent ----

"#% impex.setTargetFile( ""CMSParagraphComponent.csv"" );"

insert_update CMSParagraphComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; &componentRef ; content[lang=en]

"#% impex.exportItems(""SELECT {PC:pk} FROM {CMSParagraphComponent as PC}, {CatalogVersion as CV}, {Catalog as C} WHERE {PC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CMSParagraphComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; &componentRef ; content[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CMSParagraphComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: ContentPage ----

"#% impex.setTargetFile( ""ContentPage.csv"" );"

insert_update ContentPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; hideFooter ; homepage[allownull=true] ; label ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; title[lang=en]

"#% impex.exportItems(""SELECT {CP:pk} FROM {ContentPage as CP}, {CatalogVersion as CV}, {Catalog as C} ,{CpprovalStatus as cs} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {cs:code}='approved' AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"


#-----------------------------------------------------------

insert_update ContentPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; hideFooter ; homepage[allownull=true] ; label ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; title[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ContentPage.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxProductCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: Category ----

"#% impex.setTargetFile( ""Category.csv"" );"

insert_update Category ; &Item ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryOrder ; code[unique=true,allownull=true] ; data_sheet(catalogVersion(catalog(id),version),code) ; detail(catalogVersion(catalog(id),version),code) ; logo(catalogVersion(catalog(id),version),code) ; nonQuickOrderProduct ; normal(catalogVersion(catalog(id),version),code) ; order ; others(catalogVersion(catalog(id),version),code) ; picture(catalogVersion(catalog(id),version),code) ; redirectUrl ; stockLevelThreshold ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; name[lang=en] ; pageTitle[lang=en] ; products(catalogVersion(catalog(id),version),code) ; allowedPrincipals(uid)

"#% impex.exportItems(""SELECT {MC:pk} FROM {Category as MC}, {CatalogVersion as CV}, {Catalog as C} WHERE {MC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update Category ; &Item ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryOrder ; code[unique=true,allownull=true] ; data_sheet(catalogVersion(catalog(id),version),code) ; detail(catalogVersion(catalog(id),version),code) ; logo(catalogVersion(catalog(id),version),code) ; nonQuickOrderProduct ; normal(catalogVersion(catalog(id),version),code) ; order ; others(catalogVersion(catalog(id),version),code) ; picture(catalogVersion(catalog(id),version),code) ; redirectUrl ; stockLevelThreshold ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; name[lang=en] ; pageTitle[lang=en] ; products(catalogVersion(catalog(id),version),code) ; allowedPrincipals(uid)

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxProductCatalog"")){String newValue = StringUtils.replace(value, ""mxProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""Category.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------



$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: ProductPage ----

"#% impex.setTargetFile( ""ProductPage.csv"" );"

insert_update ProductPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true]

"#% impex.exportItems(""SELECT {PP:pk} FROM {ProductPage as PP}, {CatalogVersion as CV}, {Catalog as C} WHERE {PP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ProductPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ProductPage.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: CMSLinkComponent ----

"#% impex.setTargetFile( ""CMSLinkComponent.csv"" );"

insert_update CMSLinkComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; category(catalogVersion(catalog(id),version),code) ; categoryPOS ; contentPage(catalogVersion(catalog(id),version),uid) ; contentPagePOS ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; product(catalogVersion(catalog(id),version),code) ; productPOS ; styleAttributes ; styleClasses ; target(code,itemtype(code))[allownull=true] ; uid[unique=true,allownull=true] ; url ; visible[allownull=true] ; linkName[lang=en]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {CMSLinkComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CMSLinkComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; category(catalogVersion(catalog(id),version),code) ; categoryPOS ; contentPage(catalogVersion(catalog(id),version),uid) ; contentPagePOS ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; product(catalogVersion(catalog(id),version),code) ; productPOS ; styleAttributes ; styleClasses ; target(code,itemtype(code))[allownull=true] ; uid[unique=true,allownull=true] ; url ; visible[allownull=true] ; linkName[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CMSLinkComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: CMSNavigationNode ----

"#% impex.setTargetFile( ""CMSNavigationNode.csv"" );"

insert_update CMSNavigationNode ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; parent(catalogVersion(catalog(id),version),uid) ; parentPOS ; uid[unique=true,allownull=true] ; visible[allownull=true] ; title[lang=en] ; links(catalogVersion(catalog(id),version),uid) ; &nodeRef

"#% impex.exportItems(""SELECT {CNN:pk} FROM {CMSNavigationNode as CNN}, {CatalogVersion as CV}, {Catalog as C} WHERE {CNN:catalogversion}={CV:PK} AND {CV:catalog}={C:PK}  AND {CNN:display}=1  AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CMSNavigationNode ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; parent(catalogVersion(catalog(id),version),uid) ; parentPOS ; uid[unique=true,allownull=true] ; visible[allownull=true] ; title[lang=en] ; links(catalogVersion(catalog(id),version),uid) ; &nodeRef

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CMSNavigationNode.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorcms ---- Type: NavigationBarComponent ----

"#% impex.setTargetFile( ""NavigationBarComponent.csv"" );"

insert_update NavigationBarComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; dropDownLayout(code,itemtype(code)) ; link(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNode(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; styleClass ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; wrapAfter

"#% impex.exportItems(""SELECT {NBC:pk} FROM {NavigationBarComponent as NBC}, {CatalogVersion as CV}, {Catalog as C} WHERE {NBC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {NBC:display}=1  AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update NavigationBarComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; dropDownLayout(code,itemtype(code)) ; link(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNode(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; styleClass ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; wrapAfter

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""NavigationBarComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: MarketCardComponent ----

"#% impex.setTargetFile( ""MarketCardComponent.csv"" );"

insert_update MarketCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; products(catalogVersion(catalog(id),version),code) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; headline[lang=en] ; imageText[lang=en] ; url[lang=en][default=''] ; content[lang=en] ; urlText[lang=en] ; &componentRef ; imageUrl[lang=en]

"#% impex.exportItems(""SELECT {MCC:pk} FROM {MarketCardComponent as MCC}, {CatalogVersion as CV}, {Catalog as C} WHERE {MCC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {MCC:display}=1 AND {MCC:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update MarketCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; products(catalogVersion(catalog(id),version),code) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; headline[lang=en] ; imageText[lang=en] ; url[lang=en][default=''] ; content[lang=en] ; urlText[lang=en] ; &componentRef ; imageUrl[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""MarketCardComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ApplicationIndividualTabComponent ----

"#% impex.setTargetFile( ""ApplicationIndividualTabComponent.csv"" );"

insert_update ApplicationIndividualTabComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; tabUrlLink ; imageUrl ; &componentRef ; tabName[lang=en] ; tabHeadLine[lang=en] ; tabBody[lang=en] ; tabUrltext[lang=en] ; headline[lang=en] ; content[lang=en] ; ctaText[lang=en] ;

"#% impex.exportItems(""SELECT {ITC:pk} FROM {ApplicationIndividualTabComponent as ITC}, {CatalogVersion as CV}, {Catalog as C} WHERE {ITC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK}  AND {ITC:display}=1 AND {ITC:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ApplicationIndividualTabComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; tabUrlLink ; imageUrl ; &componentRef ; tabName[lang=en] ; tabHeadLine[lang=en] ; tabBody[lang=en] ; tabUrltext[lang=en] ; headline[lang=en] ; content[lang=en] ; ctaText[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ApplicationIndividualTabComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: HomePageBannerComponent ----

"#% impex.setTargetFile( ""HomePageBannerComponent.csv"" );"

insert_update HomePageBannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; marketCards(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; content[lang=en] ; headline[lang=en] ; otherMarketsText[lang=en] ; imageUrl[lang=en]

"#% impex.exportItems(""SELECT {HBC:pk} FROM {HomePageBannerComponent as HBC}, {CatalogVersion as CV}, {Catalog as C} WHERE {HBC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK}  AND {HBC:display}=1 AND {HBC:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update HomePageBannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; marketCards(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true] ; content[lang=en] ; headline[lang=en] ; otherMarketsText[lang=en] ; imageUrl[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""HomePageBannerComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: SearchComponent ----

"#% impex.setTargetFile( ""SearchComponent.csv"" );"

insert_update SearchComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; quickLinks(catalogVersion(catalog(id),version),uid) ; styleClasses ; suggestedSearches(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {SC:pk} FROM {SearchComponent as SC}, {CatalogVersion as CV}, {Catalog as C} WHERE {SC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update SearchComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; quickLinks(catalogVersion(catalog(id),version),uid) ; styleClasses ; suggestedSearches(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""SearchComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorservices ---- Type: EmailPage ----

"#% impex.setTargetFile( ""EmailPage.csv"" );"

insert_update EmailPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; emailId ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; registerCustomerReportList(uid) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; fromEmail[lang=en] ; fromName[lang=en]

"#% impex.exportItems(""SELECT {P:pk} FROM {EmailPage as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update EmailPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; emailId ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; registerCustomerReportList(uid) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; fromEmail[lang=en] ; fromName[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""EmailPage.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: CategoryPage ----

"#% impex.setTargetFile( ""CategoryPage.csv"" );"

insert_update CategoryPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; title[lang=en]

"#% impex.exportItems(""SELECT {CP:pk} FROM {CategoryPage as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CategoryPage ; &Item ; approvalStatus(code,itemtype(code))[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; copyToCatalogsDisabled[allownull=true] ; defaultPage[allownull=true] ; display[allownull=true] ; lockedBy(uid) ; masterTemplate(catalogVersion(catalog(id),version),uid)[allownull=true] ; name ; navigationNodeList(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; originalPage(catalogVersion(catalog(id),version),uid) ; pageStatus(code,itemtype(code)) ; previewImage(catalogVersion(catalog(id),version),code) ; robotTag(code,itemtype(code)) ; uid[unique=true,allownull=true] ; title[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CategoryPage.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: MiniFacetComponent ----

"#% impex.setTargetFile( ""MiniFacetComponent.csv"" );"

insert_update MiniFacetComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryID[allownull=true] ; code[unique=true,allownull=true] ; display[allownull=true] ; facetList ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {MiniFacetComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update MiniFacetComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryID[allownull=true] ; code[unique=true,allownull=true] ; display[allownull=true] ; facetList ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""MiniFacetComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: StockComponent ----

"#% impex.setTargetFile( ""StockComponent.csv"" );"

insert_update StockComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {StockComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update StockComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""StockComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ApplicationNavLinksListComponent ----

"#% impex.setTargetFile( ""ApplicationNavLinksListComponent.csv"" );"

insert_update ApplicationNavLinksListComponent ; &Item ; applicationsLinkList(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {ApplicationNavLinksListComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ApplicationNavLinksListComponent ; &Item ; applicationsLinkList(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ApplicationNavLinksListComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: NewsReleasesComponent ----

"#% impex.setTargetFile( ""NewsReleasesComponent.csv"" );"

insert_update NewsReleasesComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryCombination[allownull=true] ; display[allownull=true] ; expandCollapse[allownull=true] ; name ; numberArticlesVisibleWhenCollapsed ; numberArticles[allownull=true] ; numberDays[allownull=true] ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {NewsReleasesComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update NewsReleasesComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryCombination[allownull=true] ; display[allownull=true] ; expandCollapse[allownull=true] ; name ; numberArticlesVisibleWhenCollapsed ; numberArticles[allownull=true] ; numberDays[allownull=true] ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""NewsReleasesComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ApplicationAccordionSectionComponent ----

"#% impex.setTargetFile( ""ApplicationAccordionSectionComponent.csv"" );"

insert_update ApplicationAccordionSectionComponent ; &Item ; accordionLeftContent(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; products(catalogVersion(catalog(id),version),code) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {ApplicationAccordionSectionComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ApplicationAccordionSectionComponent ; &Item ; accordionLeftContent(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; products(catalogVersion(catalog(id),version),code) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ApplicationAccordionSectionComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: WhatsNewCardComponent ----

"#% impex.setTargetFile( ""WhatsNewCardComponent.csv"" );"

insert_update WhatsNewCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {WhatsNewCardComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update WhatsNewCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""WhatsNewCardComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: DoubleDetailedCardComponent ----

"#% impex.setTargetFile( ""DoubleDetailedCardComponent.csv"" );"

insert_update DoubleDetailedCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {DoubleDetailedCardComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update DoubleDetailedCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""DoubleDetailedCardComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ExtendedDoubleDetailedCardComponent ----

"#% impex.setTargetFile( ""ExtendedDoubleDetailedCardComponent.csv"" );"

insert_update ExtendedDoubleDetailedCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {ExtendedDoubleDetailedCardComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ExtendedDoubleDetailedCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ExtendedDoubleDetailedCardComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: 2TabsListComponent ----

"#% impex.setTargetFile( ""2TabsListComponent.csv"" );"

insert_update 2TabsListComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; isVertical ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; tabList(catalogVersion(catalog(id),version),uid) ; tabs(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {2TabsListComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update 2TabsListComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; isVertical ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; tabList(catalogVersion(catalog(id),version),uid) ; tabs(catalogVersion(catalog(id),version),uid) ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""2TabsListComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: CarouselComponent ----

"#% impex.setTargetFile( ""CarouselComponent.csv"" );"

insert_update CarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; items(catalogVersion(catalog(id),version),uid) ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {CarouselComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; items(catalogVersion(catalog(id),version),uid) ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CarouselComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: WhatsNewCarouselComponent ----

"#% impex.setTargetFile( ""WhatsNewCarouselComponent.csv"" );"

insert_update WhatsNewCarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; components(catalogVersion(catalog(id),version),uid) ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {WhatsNewCarouselComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update WhatsNewCarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; components(catalogVersion(catalog(id),version),uid) ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""WhatsNewCarouselComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: SocialMediaDetailCardComponent ----

"#% impex.setTargetFile( ""SocialMediaDetailCardComponent.csv"" );"

insert_update SocialMediaDetailCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CP:pk} FROM {SocialMediaDetailCardComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update SocialMediaDetailCardComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""SocialMediaDetailCardComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: CarouselInnerComponent ----

"#% impex.setTargetFile( ""CarouselInnerComponent.csv"" );"

insert_update CarouselInnerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; linkText[lang=en] ; url ; &componentRef ; imageUrl[lang=en]

"#% impex.exportItems(""SELECT {CP:pk} FROM {CarouselInnerComponent as CP}, {CatalogVersion as CV}, {Catalog as C} WHERE {CP:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CarouselInnerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; linkText[lang=en] ; url ; &componentRef ; imageUrl[lang=en]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CarouselInnerComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=globalProductCatalog

$version=Staged

# ---- Extension: core ---- Type: Product ----

"#% impex.setTargetFile( ""Product.csv"" );"

insert_update Product ; &Item ; Europe1PriceFactory_PDG(code,itemtype(code)) ; Europe1PriceFactory_PPG(code,itemtype(code)) ; Europe1PriceFactory_PTG(code,itemtype(code)) ; activeFlag ; approvalStatus(code,itemtype(code))[allownull=true] ; assembly(code) ; assemblyPOS ; assemblyViewObject(uid) ; buyerIDS(key(code,itemtype(code))) ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; code[unique=true,allownull=true] ; contentUnit(code) ; data_sheet(catalogVersion(catalog(id),version),code) ; deliveryTime ; detail(catalogVersion(catalog(id),version),code) ; displayVariantImageInCart[allownull=true] ; ean ; endLineNumber ; endecaRollupKey ; erpGroupBuyer ; erpGroupSupplier ; europe1Discounts(&Item) ; europe1Prices(&Item) ; europe1Taxes(&Item) ; featured ; forceDisplay ; galleryImages(catalogVersion(catalog(id),version),qualifier) ; hasVideo ; highlighted ; isProductComparable ; logo(catalogVersion(catalog(id),version),code) ; majorCode ; manufacturerAID ; manufacturerName ; maxOrderQuantity ; minOrderQuantity ; minorCode ; nonSaleable ; normal(catalogVersion(catalog(id),version),code) ; numberContentUnits ; offlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; onlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; order ; orderQuantityInterval ; others(catalogVersion(catalog(id),version),code) ; picture(catalogVersion(catalog(id),version),code) ; priceQuantity ; priceSpiderDefaultVariant(catalogVersion(catalog(id),version),code) ; productConfiguratorURL ; productInquiryComponent ; productOrderLimit(&Item) ; productTrackerList(&Item) ; reviewCount ; reviewRating ; sequenceId ; specialTreatmentClasses() ; startLineNumber ; subminorCode ; subscriptionCode ; supplierAlternativeAID ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; unit(code) ; untypedFeatures(language(isocode),product(catalogVersion(catalog(id),version),code),qualifier,unit(code,systemVersion(catalog(id),version),unitType),valuePosition) ; variantType(code) ; xmlcontent ; description[lang=en] ; description[lang=es] ; description[lang=pt] ; unitOfMeasure[lang=en] ; supercategories(code,catalogVersion(catalog(id),version)) ; name ; name[lang=en] ; name[lang=es] ; name[lang=pt]

"#% impex.exportItems(""SELECT {P:pk} FROM {Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND ({P.varianttype} is not null )  and {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update Product ; &Item ; Europe1PriceFactory_PDG(code,itemtype(code)) ; Europe1PriceFactory_PPG(code,itemtype(code)) ; Europe1PriceFactory_PTG(code,itemtype(code)) ; activeFlag ; approvalStatus(code,itemtype(code))[allownull=true] ; assembly(code) ; assemblyPOS ; assemblyViewObject(uid) ; buyerIDS(key(code,itemtype(code))) ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; code[unique=true,allownull=true] ; contentUnit(code) ; data_sheet(catalogVersion(catalog(id),version),code) ; deliveryTime ; detail(catalogVersion(catalog(id),version),code) ; displayVariantImageInCart[allownull=true] ; ean ; endLineNumber ; endecaRollupKey ; erpGroupBuyer ; erpGroupSupplier ; europe1Discounts(&Item) ; europe1Prices(&Item) ; europe1Taxes(&Item) ; featured ; forceDisplay ; galleryImages(catalogVersion(catalog(id),version),qualifier) ; hasVideo ; highlighted ; isProductComparable ; logo(catalogVersion(catalog(id),version),code) ; majorCode ; manufacturerAID ; manufacturerName ; maxOrderQuantity ; minOrderQuantity ; minorCode ; nonSaleable ; normal(catalogVersion(catalog(id),version),code) ; numberContentUnits ; offlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; onlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; order ; orderQuantityInterval ; others(catalogVersion(catalog(id),version),code) ; picture(catalogVersion(catalog(id),version),code) ; priceQuantity ; priceSpiderDefaultVariant(catalogVersion(catalog(id),version),code) ; productConfiguratorURL ; productInquiryComponent ; productOrderLimit(&Item) ; productTrackerList(&Item) ; reviewCount ; reviewRating ; sequenceId ; specialTreatmentClasses() ; startLineNumber ; subminorCode ; subscriptionCode ; supplierAlternativeAID ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; unit(code) ; untypedFeatures(language(isocode),product(catalogVersion(catalog(id),version),code),qualifier,unit(code,systemVersion(catalog(id),version),unitType),valuePosition) ; variantType(code) ; xmlcontent ; description[lang=en] ; description[lang=es] ; description[lang=pt] ; unitOfMeasure[lang=en] ; supercategories(code,catalogVersion(catalog(id),version)) ; name ; name[lang=en] ; name[lang=es] ; name[lang=pt]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""globalProductCatalog"")){String newValue = StringUtils.replace(value, ""globalProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}String value1 = line.get(Integer.valueOf(i));if(StringUtils.contains(value1, ""Staged"")){String newValue1 = StringUtils.replace(value1, ""Staged"",""Staged"");line.put(Integer.valueOf(i), newValue1);}};"

"#% impex.includeExternalDataMedia( ""Product.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=globalProductCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: VariantProduct ----

"#% impex.setTargetFile( ""VariantProduct.csv"" );"

insert_update VariantProduct ; &Item ; Europe1PriceFactory_PDG(code,itemtype(code)) ; Europe1PriceFactory_PPG(code,itemtype(code)) ; Europe1PriceFactory_PTG(code,itemtype(code)) ; activeFlag ; affiliateCode ; approvalStatus(code,itemtype(code))[allownull=true] ; assembly(code) ; assemblyMaterial(code) ; assemblyMaterialPOS ; assemblyPOS ; assemblyViewObject(uid) ; baseProduct(catalogVersion(catalog(id),version),code)[allownull=true] ; buyerIDS(key(code,itemtype(code))) ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; code[unique=true,allownull=true] ; contentUnit(code) ; data_sheet(catalogVersion(catalog(id),version),code) ; deliveryTime ; deliveryUnit ; detail(catalogVersion(catalog(id),version),code) ; displayVariantImageInCart[allownull=true] ; ean ; enablePriceSpider ; endLineNumber ; endecaRollupKey ; erpGroupBuyer ; erpGroupSupplier ; europe1Discounts(&Item) ; europe1Prices(&Item) ; europe1Taxes(&Item) ; featured ; forceDisplay ; galleryImages(catalogVersion(catalog(id),version),qualifier) ; group(code) ; groupPOS ; hasVideo ; hazardousMatNum ; highlighted ; isHazardous ; isProductComparable ; leadTime ; logo(catalogVersion(catalog(id),version),code) ; majorCode ; manufacturerAID ; manufacturerName ; maxOrderQuantity ; minOrderQuantity ; minorCode ; nonSaleable ; normal(catalogVersion(catalog(id),version),code) ; numberContentUnits ; offlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; onlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; order ; orderQuantityInterval ; others(catalogVersion(catalog(id),version),code) ; parentProductCode ; partNumber ; picture(catalogVersion(catalog(id),version),code) ; priceQuantity ; priceSpiderDefaultVariant(catalogVersion(catalog(id),version),code) ; productConfiguratorURL ; productInquiryComponent ; productOrderLimit(&Item) ; productTrackerList(&Item) ; quickOrderOnly ; reviewCount ; reviewRating ; sequenceId ; sortOrder ; specialTreatmentClasses() ; startLineNumber ; subminorCode ; subscriptionCode ; supplierAlternativeAID ; threshold ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; tier(code,itemtype(code)) ; unit(code) ; untypedFeatures(language(isocode),product(catalogVersion(catalog(id),version),code),qualifier,unit(code,systemVersion(catalog(id),version),unitType),valuePosition) ; variantType(code) ; xmlcontent ; description[lang=en] ; description[lang=es] ; description[lang=pt] ; unitOfMeasure[lang=en] ; supercategories(code,catalogVersion(catalog(id),version))

"#% impex.exportItems(""SELECT {P:pk} FROM {VariantProduct as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK}  and ({P.code} like 'PE01_%' or {P.code} like 'AR01_%' or {P.code} like 'CL01_%' or {P.code} like 'CO01_%' or {P.code} like 'MX03_%' or {P.code} like 'BR01_%' )  and {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"


#-----------------------------------------------------------

insert_update VariantProduct ; &Item ; Europe1PriceFactory_PDG(code,itemtype(code)) ; Europe1PriceFactory_PPG(code,itemtype(code)) ; Europe1PriceFactory_PTG(code,itemtype(code)) ; activeFlag ; affiliateCode ; approvalStatus(code,itemtype(code))[allownull=true] ; assembly(code) ; assemblyMaterial(code) ; assemblyMaterialPOS ; assemblyPOS ; assemblyViewObject(uid) ; baseProduct(catalogVersion(catalog(id),version),code)[allownull=true] ; buyerIDS(key(code,itemtype(code))) ; catalog(id)[allownull=true] ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; code[unique=true,allownull=true] ; contentUnit(code) ; data_sheet(catalogVersion(catalog(id),version),code) ; deliveryTime ; deliveryUnit ; detail(catalogVersion(catalog(id),version),code) ; displayVariantImageInCart[allownull=true] ; ean ; enablePriceSpider ; endLineNumber ; endecaRollupKey ; erpGroupBuyer ; erpGroupSupplier ; europe1Discounts(&Item) ; europe1Prices(&Item) ; europe1Taxes(&Item) ; featured ; forceDisplay ; galleryImages(catalogVersion(catalog(id),version),qualifier) ; group(code) ; groupPOS ; hasVideo ; hazardousMatNum ; highlighted ; isHazardous ; isProductComparable ; leadTime ; logo(catalogVersion(catalog(id),version),code) ; majorCode ; manufacturerAID ; manufacturerName ; maxOrderQuantity ; minOrderQuantity ; minorCode ; nonSaleable ; normal(catalogVersion(catalog(id),version),code) ; numberContentUnits ; offlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; onlineDate[dateformat=dd.MM.yyyy hh:mm:ss] ; order ; orderQuantityInterval ; others(catalogVersion(catalog(id),version),code) ; parentProductCode ; partNumber ; picture(catalogVersion(catalog(id),version),code) ; priceQuantity ; priceSpiderDefaultVariant(catalogVersion(catalog(id),version),code) ; productConfiguratorURL ; productInquiryComponent ; productOrderLimit(&Item) ; productTrackerList(&Item) ; quickOrderOnly ; reviewCount ; reviewRating ; sequenceId ; sortOrder ; specialTreatmentClasses() ; startLineNumber ; subminorCode ; subscriptionCode ; supplierAlternativeAID ; threshold ; thumbnail(catalogVersion(catalog(id),version),code) ; thumbnails(catalogVersion(catalog(id),version),code) ; tier(code,itemtype(code)) ; unit(code) ; untypedFeatures(language(isocode),product(catalogVersion(catalog(id),version),code),qualifier,unit(code,systemVersion(catalog(id),version),unitType),valuePosition) ; variantType(code) ; xmlcontent ; description[lang=en] ; description[lang=es] ; description[lang=pt] ; unitOfMeasure[lang=en] ; supercategories(code,catalogVersion(catalog(id),version))

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""globalProductCatalog"")){String newValue = StringUtils.replace(value, ""globalProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}String value1 = line.get(Integer.valueOf(i));if(StringUtils.contains(value1, ""Staged"")){String newValue1 = StringUtils.replace(value1, ""Staged"",""Staged"");line.put(Integer.valueOf(i), newValue1);}String value2 = line.get(Integer.valueOf(i));if(StringUtils.contains(value2, ""PE01_"")||StringUtils.contains(value2, ""MX03_"")||StringUtils.contains(value2, ""BR01_"")||StringUtils.contains(value2, ""CO01_"")||StringUtils.contains(value2, ""CL01_"")||StringUtils.contains(value2, ""AR01_"")){String newValue2 = StringUtils.replace(value2, ""PE01_"","""");newValue2 = StringUtils.replace(newValue2, ""MX03_"","""");newValue2 = StringUtils.replace(newValue2, ""BR01_"","""");newValue2 = StringUtils.replace(newValue2, ""CO01_"","""");newValue2 = StringUtils.replace(newValue2, ""CL01_"","""");newValue2 = StringUtils.replace(newValue2, ""AR01_"","""");line.put(Integer.valueOf(i), newValue2);}} ;"

"#% impex.includeExternalDataMedia( ""VariantProduct.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxProductCatalog

$version=Staged

# ---- Extension: catalog ---- Type: CategoryProductRelation ----

"#% impex.setTargetFile( ""CategoryProductRelation.csv"" );"

insert_update CategoryProductRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% impex.exportItems(""SELECT {CPR:pk} FROM {CategoryProductRelation as CPR JOIN Category AS MC on {CPR.source} = {MC.PK}},{CatalogVersion as CV}, {Catalog as C} WHERE {MC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update CategoryProductRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxProductCatalog"")){String newValue = StringUtils.replace(value, ""mxProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CategoryProductRelation.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------



#----- Export script for all the CategoryCategoryRelation and filter out the mxProductCatalog and update them according to the regionalGlobalProductCatalog

# ---- Extension: catalog ---- Type: CategoryCategoryRelation ----

"#% impex.setTargetFile( ""CategoryCategoryRelation.csv"" );"

insert_update CategoryCategoryRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% impex.exportItems( ""CategoryCategoryRelation"" , false );"



#-----------------------------------------------------------

insert_update CategoryCategoryRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxProductCatalog"")){String newValue = StringUtils.replace(value, ""mxProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}String value1 = line.get(Integer.valueOf(i));if(StringUtils.contains(value1, ""Staged"")){String newValue1 = StringUtils.replace(value1, ""Staged"",""Staged"");line.put(Integer.valueOf(i), newValue1);}};"

"#% impex.includeExternalDataMedia( ""CategoryCategoryRelation.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$classificationsystem=Classification

$version=1.0

$catalog=mxProductCatalog

$catalogversion=Staged

# ---- Extension: catalog ---- Type: ProductFeature ----

"#% impex.setTargetFile( ""ProductFeature.csv"" );"

insert_update ProductFeature ; &Item ; booleanValue ; classificationAttributeAssignment(classificationAttribute(code,systemVersion(catalog(id),version)),classificationClass(catalogVersion(catalog(id),version),code),systemVersion(catalog(id),version))[forceWrite=true] ; description ; featurePosition ; language(isocode)[forceWrite=true,unique=true] ; numberValue ; product(catalogVersion(catalog(id),version),code)[forceWrite=true,unique=true,allownull=true] ; productPOS ; qualifier[forceWrite=true,unique=true,allownull=true] ; rawValue ; stringValue ; unit(code,systemVersion(catalog(id),version),unitType)[unique=true] ; valueDetails ; valuePosition[unique=true] ; valueType ; value[allownull=true]

"#% impex.exportItems("" SELECT {PF:pk} FROM {ProductFeature as PF}, {ClassificationSystemVersion as CSV}, {ClassificationSystem as CS}, {ClassAttributeAssignment as CAA}, {ClassificationClass as CC}, {ClassificationAttribute as CATT},{Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK}  and {C:id}='$catalog' AND {CV:version}='$catalogversion' and {PF.Product}={P.PK} and {CSV:catalog}={CS:PK} AND {CS:id}='$classificationsystem' AND {CSV:version}='$version' AND {PF:classificationAttributeAssignment}={CAA:pk} AND {CAA:systemVersion}={CSV:PK} AND {CAA:classificationClass}={CC:pk} AND {CC:catalog}={CS:PK} AND {CC:catalogVersion}={CSV:PK} AND {CAA:classificationAttribute}={CATT:pk} AND {CATT:systemVersion}={CSV:PK} "", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ProductFeature ; &Item ; booleanValue ; classificationAttributeAssignment(classificationAttribute(code,systemVersion(catalog(id),version)),classificationClass(catalogVersion(catalog(id),version),code),systemVersion(catalog(id),version))[forceWrite=true] ; description ; featurePosition ; language(isocode)[forceWrite=true,unique=true] ; numberValue ; product(catalogVersion(catalog(id),version),code)[forceWrite=true,unique=true,allownull=true] ; productPOS ; qualifier[forceWrite=true,unique=true,allownull=true] ; rawValue ; stringValue ; unit(code,systemVersion(catalog(id),version),unitType)[unique=true] ; valueDetails ; valuePosition[unique=true] ; valueType ; value[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxProductCatalog"")){String newValue = StringUtils.replace(value, ""mxProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}String value1 = line.get(Integer.valueOf(i));if(StringUtils.contains(value1, ""Staged"")){String newValue1 = StringUtils.replace(value1, ""Staged"",""Staged"");line.put(Integer.valueOf(i), newValue1);}String value2 = line.get(Integer.valueOf(i));if(StringUtils.contains(value2, ""MX03_"")){String newValue2 = StringUtils.replace(value2, ""MX03_"","""");line.put(Integer.valueOf(i), newValue2);}} ;"

"#% impex.includeExternalDataMedia( ""ProductFeature.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------



$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2 ---- Type: CMSImageComponent ----

"#% impex.setTargetFile( ""CMSImageComponent.csv"" );"

insert_update CMSImageComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {CMSImageComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update CMSImageComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""CMSImageComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorcms ---- Type: FooterComponent ----

"#% impex.setTargetFile( ""FooterComponent.csv"" );"

insert_update FooterComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; navigationNodes(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; showLanguageCurrency ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; wrapAfter

"#% impex.exportItems(""SELECT {CLK:pk} FROM {FooterComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update FooterComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; navigationNodes(catalogVersion(catalog(id),version),uid) ; onlyOneRestrictionMustApply[allownull=true] ; showLanguageCurrency ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true] ; wrapAfter

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""FooterComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2lib ---- Type: RotatingImagesComponent ----

"#% impex.setTargetFile( ""RotatingImagesComponent.csv"" );"

insert_update RotatingImagesComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; effect(code,itemtype(code)) ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; timeout ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {RotatingImagesComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update RotatingImagesComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; effect(code,itemtype(code)) ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; timeout ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""RotatingImagesComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------



$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorcms ---- Type: MiniCartComponent ----

"#% impex.setTargetFile( ""MiniCartComponent.csv"" );"

insert_update MiniCartComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; lightboxBannerComponent(catalogVersion(catalog(id),version),uid) ; name ; onlyOneRestrictionMustApply[allownull=true] ; shownProductCount[allownull=true] ; styleClasses ; totalDisplay(code,itemtype(code))[allownull=true] ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {MiniCartComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update MiniCartComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; lightboxBannerComponent(catalogVersion(catalog(id),version),uid) ; name ; onlyOneRestrictionMustApply[allownull=true] ; shownProductCount[allownull=true] ; styleClasses ; totalDisplay(code,itemtype(code))[allownull=true] ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""MiniCartComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------






$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorcms ---- Type: JspIncludeComponent ----

"#% impex.setTargetFile( ""JspIncludeComponent.csv"" );"

insert_update JspIncludeComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {JspIncludeComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update JspIncludeComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""JspIncludeComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------





$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2lib ---- Type: BannerComponent ----

"#% impex.setTargetFile( ""BannerComponent.csv"" );"

insert_update BannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {BannerComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update BannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; page(catalogVersion(catalog(id),version),uid) ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""BannerComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ApplicationAccordionListComponent ----

"#% impex.setTargetFile( ""ApplicationAccordionListComponent.csv"" );"

insert_update ApplicationAccordionListComponent ; &Item ; accordionComponentList(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {ApplicationAccordionListComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ApplicationAccordionListComponent ; &Item ; accordionComponentList(catalogVersion(catalog(id),version),uid) ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ApplicationAccordionListComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: acceleratorcms ---- Type: SimpleBannerComponent ----

"#% impex.setTargetFile( ""SimpleBannerComponent.csv"" );"

insert_update SimpleBannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {SimpleBannerComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update SimpleBannerComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; external[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; urlLink ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""SimpleBannerComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




$catalog=mxContentCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ExploreProductsSearchComponent ----

"#% impex.setTargetFile( ""ExploreProductsSearchComponent.csv"" );"

insert_update ExploreProductsSearchComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {ExploreProductsSearchComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ExploreProductsSearchComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ExploreProductsSearchComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------




#----------------------- When we do a sync from one product catalog to another these relations are not carried along ,please refer the manual other impex to create the relation using the distributionChannelInformationList(code) This script should only be used to directly update in any of the individual catalog.

$catalog=globalProductCatalog

$version=Staged

# ---- Extension: safetyac ---- Type: ProductDistrRelation ----

"#% impex.setTargetFile( ""ProductDistrRelation.csv"" );"

insert_update ProductDistrRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(code)[unique=true,allownull=true]

"#% impex.exportItems(""SELECT {CPR:pk} FROM {ProductDistrRelation as CPR JOIN VariantProduct AS MC on {CPR.source} = {MC.PK}},{CatalogVersion as CV}, {Catalog as C} WHERE {MC:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND ({MC.code} like 'PE01_%' or {MC.code} like 'AR01_%' or {MC.code} like 'CL01_%' or {MC.code} like 'CO01_%' or {MC.code} like 'MX03_%' or {MC.code} like 'BR01_%' )   AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"




#-----------------------------------------------------------

insert_update ProductDistrRelation ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),code)[unique=true,allownull=true] ; target(code)[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""globalProductCatalog"")){String newValue = StringUtils.replace(value, ""globalProductCatalog"",""regionalGlobalProductCatalog"");line.put(Integer.valueOf(i), newValue);}String value1 = line.get(Integer.valueOf(i));if(StringUtils.contains(value1, ""Staged"")){String newValue1 = StringUtils.replace(value1, ""Staged"",""Staged"");line.put(Integer.valueOf(i), newValue1);}String value2 = line.get(Integer.valueOf(i));if(StringUtils.contains(value2, ""PE01_"")||StringUtils.contains(value2, ""MX03_"")||StringUtils.contains(value2, ""BR01_"")||StringUtils.contains(value2, ""CO01_"")||StringUtils.contains(value2, ""CL01_"")||StringUtils.contains(value2, ""AR01_"")){String newValue2 = StringUtils.replace(value2, ""PE01_"","""");newValue2 = StringUtils.replace(newValue2, ""MX03_"","""");newValue2 = StringUtils.replace(newValue2, ""BR01_"","""");newValue2 = StringUtils.replace(newValue2, ""CO01_"","""");newValue2 = StringUtils.replace(newValue2, ""CL01_"","""");newValue2 = StringUtils.replace(newValue2, ""AR01_"","""");line.put(Integer.valueOf(i), newValue2);}} ;"

"#% impex.includeExternalDataMedia( ""ProductDistrRelation.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------



$catalog=mxContentCatalog

$version=Staged

# ---- Extension: cms2lib ---- Type: ProductCarouselComponent ----

"#% impex.setTargetFile( ""ProductCarouselComponent.csv"" );"

insert_update ProductCarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryCode ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; popup[allownull=true] ; scroll(code,itemtype(code))[allownull=true] ; searchQuery ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% impex.exportItems(""SELECT {CLK:pk} FROM {ProductCarouselComponent as CLK}, {CatalogVersion as CV}, {Catalog as C} WHERE {CLK:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND  {CLK:display}=1 AND {CLK:visible}=1 AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1  );"



#-----------------------------------------------------------

insert_update ProductCarouselComponent ; &Item ; catalogVersion(catalog(id),version)[unique=true,allownull=true] ; categoryCode ; display[allownull=true] ; name ; onlyOneRestrictionMustApply[allownull=true] ; popup[allownull=true] ; scroll(code,itemtype(code))[allownull=true] ; searchQuery ; styleClasses ; uid[unique=true,allownull=true] ; visible[allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ProductCarouselComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------


#----------------------------------------- Export and filter out only mxContentCatalog Staged src compoents and import them

# ---- Extension: cms2lib ---- Type: ProductsForProductCarouselComponent ----

"#% impex.setTargetFile( ""ProductsForProductCarouselComponent.csv"" );"

insert_update ProductsForProductCarouselComponent ; &Item ; creationtime[forceWrite=true,dateformat=dd.MM.yyyy hh:mm:ss] ; language(isocode)[unique=true] ; modifiedtime[dateformat=dd.MM.yyyy hh:mm:ss] ; owner(&Item)[forceWrite=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),uid)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% impex.exportItems( ""ProductsForProductCarouselComponent"" , false );"



#-----------------------------------------------------------

insert_update ProductsForProductCarouselComponent ; &Item ; language(isocode)[unique=true] ; qualifier ; reverseSequenceNumber ; sequenceNumber ; source(catalogVersion(catalog(id),version),uid)[unique=true,allownull=true] ; target(catalogVersion(catalog(id),version),code)[unique=true,allownull=true]

"#% beforeEach: import org.apache.commons.lang.StringUtils;int size = line.size()+1;for (i=1; i<size; i++){String value = line.get(Integer.valueOf(i));if(StringUtils.contains(value, ""mxContentCatalog"")){String newValue = StringUtils.replace(value, ""mxContentCatalog"",""latamContentCatalog"");line.put(Integer.valueOf(i), newValue);}} ;"

"#% impex.includeExternalDataMedia( ""ProductsForProductCarouselComponent.csv"" , ""UTF-8"", ';',  1 , -1 );"

#-----------------------------------------------------------

Comments

Popular Posts