I am somehow trying reverse engineering. I was wondering how can I create an impex from code below. I am quite new at this, so I wounder if I am on the right track. Mainly i have problem in the Header section of the Impex.
So the main question is, how to create the two Hybris impex-es from given data.
<collectiontype elementtype="BoxLink" code="BoxLinkList" autocreate="true" generate="true" type="list"/>
<itemtype code="BoxLink" autocreate="true" generate="true"
jaloclass="com.ggcorporate.core.jalo.BoxLink">
<deployment table="BoxLink" typecode="10226"/>
<custom-properties>
<property name="catalogItemType">
<value>java.lang.Boolean.TRUE</value>
</property>
<property name="catalogVersionAttributeQualifier">
<value>"catalogVersion"</value>
</property>
<property name="uniqueKeyAttributeQualifier">
<value>"code"</value>
</property>
<property name="catalog.sync.default.root.type"><value>Boolean.TRUE</value></property>
<property name="catalog.sync.default.root.type.order"><value>Integer.valueOf(8)</value></property>
</custom-properties>
<attributes>
<attribute type="java.lang.String" qualifier="code">
<description>Short unique code for link box</description>
<persistence type="property"/>
<modifiers optional="false"/>
</attribute>
<attribute type="CatalogVersion" qualifier="catalogVersion">
<description>Catalog version for link box</description>
<persistence type="property"/>
<modifiers optional="false"/>
</attribute>
<attribute type="localized:java.lang.String" qualifier="link">
<description>Link name</description>
<persistence type="property"/>
</attribute>
<attribute type="java.lang.String" qualifier="url">
<persistence type="property"/>
<modifiers optional="false"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="LinkBoxComponent" extends="SimpleCMSComponent" generate="true" autocreate="true"
jaloclass="com.ggcorporate.core.jalo.LinkBoxComponent">
<deployment table="LinkBoxComponent" typecode="10227"/>
<attributes>
<attribute type="localized:java.lang.String" qualifier="title">
<description>Title for link box</description>
<persistence type="property"/>
</attribute>
<attribute type="BoxLinkList" qualifier="boxLinkList">
<description>List of links</description>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
Do i need to do something like this?
INSERT_UPDATE BoxLink;code[unique=tru];catalogVersion;link;url
;?;?;?;?;?
And this?
INSERT_UPDATE code[unique=true];title;link;url
;?;?;?;?
Based on ItemType below impex should work.
$contentCatalog=<<catalogName>>
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
INSERT_UPDATE BoxLink;$contentCV[unique=true];code[unique=true];link[en];url
;;boxcode;/test;www.test.com
INSERT_UPDATE LinkBoxComponent;uid[unique=true];$contentCV[unique=true];title[en];boxLinkList(code)
;linkboxcomp1;;link box title;boxcode,boxcode1