New standard views for root entity MediaAssetFile

This article describes two new standard views since PIM 8: "Media asset file" view and "Media asset file details(form)" view.

Contents

Overview

In the previous versions our PIM a user can show corresponding media asset documents in the "Documents" view which was available for Heiler classic and Media Manager provider. But unfortunately this view is not a standard ListModelTableView, so that it can not benifit from the implemented functionalities for the generic data model, e.g. automatic synchronization for modified entities which is especially important for multi-server mechanism. Therefore since PIM 8 a new ListModelTableView is provided to replace the old "Documents" view for the user, but at first only for Media Manager provider. That means, since PIM 8 the "Documents" view is only available for PIM desktop with Heiler classic provider, and by PIM desktop with Media Manager provider this new view names "Media asset file" view will provide all important functionalities like before, and the user can even edit the attributes in this view. Furthermore another new view - "Media asset file details (form)" - provides a comfortable overview for the user to show and edit attributes of one document.

Define Entity(Type) in repository

For the new ListModelTableView the root EntityType "MediaAssetFileType" is redefined to present the media asset file.

An old root EntityType names "MediaAssetFileType" is already defined in the previsous version but not used anymore, therefore the new EntityType "MediaAssetFileType" takes its name and is completely redesigned, but currently only available for Media Manager provider in PIM 8.

All new defined Entities and EntityTypes are currently only used in two new views "Media asset file" view and "Media asset file details(form)" view, the other views in media asset area (e.g. Multimedia documents view) get the information at the basic on the old EntityType MediaAssetType and its subEntity MediaAssetDocumentType, MediaAssetDocumentAttributesType, therefore the customers have to map the Media Manager attributes in repository twice: the first one in new MediaAssetFileAttributeType and MediaAssetFileAttributeLangType for new views and second one in old MediaAssetDocumentAttributesType for other views. It should be enhanced in the future.

MediaAssetFile(Type)

The root EntityType MediaAssetFileType is defined for single media asset object from Media Manager. Currently it has only three field types for internal id, identifier and thumbnail identifier.

images/download/thumbnails/68125621/MediaAssetFileType.JPG images/download/thumbnails/68125621/MediaAssetFile.JPG

MediaAssetFileAttribute(Type)

First sub EntityType of MediaAssetFileType is MediaAssetFileAttributeType which is defined for all language independent attributes, e.g. file name, file size, height.

images/download/thumbnails/68125621/MediaAssetFileAttributeType.JPG images/download/thumbnails/68125621/MediaAssetFileAttribute.JPG

MediaAssetFileAttributeLang(Type)

Second sub EntityType of MediaAssetFileType is MediaAssetFileAttributeLangType which is defined for all language-specific attributes, therefore the FieldType MediaAssetFileAttributeLangType.Language is defined as the primary key, and the standard Field MediaAssetFileAttributeLang.Language gets the value from an new Enumeration Enum.MediaAssetFileAttributeLanguage which supports only the in hmm.properties mapped languages.

images/download/thumbnails/68125621/MediaAssetFileAttributeLangType.JPG images/download/thumbnails/68125621/MediaAssetFileAttributeLang.JPG

In the standard repository only two lanaguage-specific attributes are actived: MediaAssetFileAttributeLangType.Name and MediaAssetFileAttributeLangType.Memo, other inactived attributes are examples which can be easily copied and adjusted by customer for individual property field (meta data) definition.

A property field (meta data) definition can be defined with different type for each supported language in Media Manager, but if you want to map it in PIM repository, it has to be defined with same type for each support language, because the FieldType in repository can be defined with only one "Class Name" for all primary keys.

Bring Media Manager property field in media asset file views of PIM desktop

To set desired property field (meta data) definition in PIM desktop, the customer should perform the following steps:

  1. Copy the corresponding example FieldType and Field, then active them in repository.

  2. Set the corresponding displayItem of the attribute (defined in Media Manager) in the property Persistence XPath of the individual FieldType.

    images/download/thumbnails/68125621/AdjustPropertyFieldType.JPG
  3. Set the corresponding description and name in the repository for all languages.

  4. Following Field(Type) examples are prepared for all property fields whose type is supported in PIM desktop, all additional adjustments have to be performed, if there are described.

  • MediaAssetFileAttributeLang(Type).MetaDataBoolean: example for "Boolean" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataText: example for "Text" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataInteger: example for "Integer" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataDecimal: example for "Decimal number" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataDate: example for "Date" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataTime: example for "Time" type property field.

  • MediaAssetFileAttributeLang(Type).MetaDataLongText: example for "Long text" type property field (index between 101 and 110).

  • MediaAssetFileAttributeLang(Type).MetaDataSelectionList: example for "Selection list" type property field.
    Adjustment: The Field constraints property "Enumeration" should be set with an new enumeration which can be also copied from an example enumeration Enum.MediaAssetFileAttributeLangMetaDataSelectionList and then adjust the value of the Enum parameter metaDataFieldIndex with the index of the corresponding property field in Media Manager. Of course the description and name of the new enumeration should be also defined in the repository for all languages.
    images/download/thumbnails/68125621/MultiSelectionListField.JPG images/download/thumbnails/68125621/Enum_MAFAL_SelectionList.JPG

  • MediaAssetFileAttributeLang(Type).MetaDataMultiSelectionList: example for "Multiple selection list" type property field.
    Adjustment: The Field constraints property "Enumeration" should be set with an new enumeration which can be also copied from an example enumeration Enum.MediaAssetFileAttributeLangMetaDataMultiSelectionList and then adjust the value of the Enum parameter metaDataFieldIndex with the index of the corresponding property field in Media Manager. Of course the description and name of the new enumeration should be also defined in the repositoryfor all languages.
    images/download/thumbnails/68125621/MultiSelectionListField.JPG images/download/thumbnails/68125621/Enum_MAFAL_MultiSelectionList.JPG

    For property fields with the types "Selection list" and "Multiple selection list" it should be carefully checked, whether the following indexes identical are: 1. value of the Enum parameter metaDataFieldIndex, 2. the numerical suffix of the value which is set for the property Persistence XPath in the individual FieldType.

"Media asset file" view

As mentioned, the new ListModelTableView named "Media asset file" view shows al l(or used/unused) documents for a category or a search request, but only for PIM desktop with Media Manager provider. All important functionalities of old "Documents" view are migrated in this view. Furthermore it is enhanced with the following points:

  • The user can edit some attributes in this view, e.g. status, access level, memo and all customer property fields.

  • No paging any more, all requested documents will be shown on one page.

  • The information about the filter (used/unused) is now contained in the caption of the report which is located above the table head row.

"Media asset file details(form)" view

Since PIM 8 an new EntityDetailModelFormView named "Media asset file details(form)" view offers the user a better overview of all attributes of one document, and all editable attributes can be also modified in this view comfortably. Currently this view can only react on the selected document in "Media asset file" view and also only supports the PIM desktop with Media Manager provider.

Rest List API for new Entity

Since the MediaAssetFile is defined as generic Entity, we can then use the REST List API for it. For more details please visit the page REST List API for MediaAssetFile entity.