The /atg/content/service/MimeTypeCategoryListener component is responsible for determining when the url property of a mediaContent item has been set or changed, and then invoking MimeCategoryTyper to determine the new value of the item’s mediaType property. To do this, MimeTypeCategoryListener registers an atg.repository.PropertiesChangedListener on the mediaContent item descriptor.

The MimeTypeCategoryListener component’s properties file specifies the item descriptor to set the listener on, the names of the url and mediaType properties, and the MimeCategoryTyper component responsible for setting the mediaType value:

mimeCategoryTyper=/atg/content/service/MimeCategoryTyper
itemDescriptorName=mediaContent
repository=/atg/content/ContentManagementRepository
urlPropertyName=url
mimeTypeCategoryPropertyName=mediaType

When MimeTypeCategoryListener detects that the url property of a mediaContent item has changed, it invokes MimeCategoryTyper to determine the new value of the mediaType property of the item, as described above. The MimeTypeCategoryListener component is registered in the initialServices property of the /Initial component, so that it starts up automatically when the Oracle Commerce Core Platform starts up.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices