Note: This step is required only if you import file assets with the Repository Loader.
As described later in Import Initial File Assets, you use the Oracle Commerce Platform’s Repository Loader to import file assets into the ATG Content Administration system. The Repository Loader uses a set of TypeMapping
components to convert files of different types into content repository items, and it uses a TypeMapper
component to determine which TypeMapping
component to use for a given file.
ATG Content Administration provides a set of TypeMapping
components for the default content item descriptors in the PublishingFileRepository
, as well as a PublishingTypeMapper
component that defines this array of TypeMapping
components. These components are located in:
<ATG11dir>/Publishing/base/config/atg/epub/file/typemappers
However, if you intend to import file assets of the custom item types with the Repository Loader, you need to configure additional TypeMapping
components to support the custom content item descriptors:
Configure a
TypeMapping
component for each new item descriptor that you added to thePublishingFileRepository
’s definition file.Place the configuration files for the new
TypeMapping
components in theconfig
directory of your versioned module at/atg/epub/file/typemappers/
.Modify the
PublishingTypeMapper
to support the newTypeMapping
components you created in step 1.Modify the
PublishingTypeMapper
by layering on a new configuration file for the component. Place the new configuration file in theconfig
directory of your versioned module at/atg/epub/file/typemappers/
.
For more information on these tasks, see the Repository Loader chapter in the Repository Guide.
In the FTPFileSystem
example, the TypeMapping
component for the ftpTextFileAsset
item descriptor is named FTPTextFileAssetTypeMapping.properties
and looks like this:
$class=atg.repository.loader.TypeMappingImpl itemDescriptorName=ftpTextFileAsset repository=/atg/epub/file/PublishingFileRepository contentHandler=/atg/dynamo/service/loader/typemapping/Xml2RepositoryConten tHandler contentIsXML=false parseContent=false updatePropertyConfiguration=CONTENT_ITEM_DESCRIPTOR_ID_AND_PATH_PROP applicationLogging=/atg/epub/file/VersionedLoaderEventListener contentRootPathProvider=/atg/epub/file/VersionedLoaderEventListener
Similarly, the TypeMapping
component for the ftpBinaryFileAsset
item descriptor can be named FTPTBinaryFileAssetTypeMapping.properties
:
$class=atg.repository.loader.TypeMappingImpl itemDescriptorName=ftpBinaryFileAsset repository=/atg/epub/file/PublishingFileRepository contentHandler=/atg/dynamo/service/loader/typemapping/Xml2RepositoryConten tHandler contentIsXML=false parseContent=false updatePropertyConfiguration=CONTENT_ITEM_DESCRIPTOR_ID_AND_PATH_PROP applicationLogging=/atg/epub/file/VersionedLoaderEventListener contentRootPathProvider=/atg/epub/file/VersionedLoaderEventListener
Finally, the new configuration file to layer on for the PublishingTypeMapper
looks like this:
$class=atg.epub.loader.PublishingTypeMapper typeMappings+=\ FTPTextFileAssetTypeMapping,\ FTPBinaryFileAssetTypeMapping
For a description of properties you can configure for TypeMapping
and TypeMapper
components, see the Repository Loader chapter in the Repository Guide. For more information on the /atg/epub/file/VersionedLoaderEventListener
component (referenced in the configuration file examples above), see the Repository Guide.