0% found this document useful (0 votes)
24 views3 pages

8 Hybris HMC Media

Hybris supports media objects that reference physical files stored locally or remotely. Media items have URLs that point to file locations and are linked to products. Media can be created and searched for in Hybris Commerce Management and formats help serve images appropriately on different pages.

Uploaded by

xogexe2245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

8 Hybris HMC Media

Hybris supports media objects that reference physical files stored locally or remotely. Media items have URLs that point to file locations and are linked to products. Media can be created and searched for in Hybris Commerce Management and formats help serve images appropriately on different pages.

Uploaded by

xogexe2245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Hybris - Media Management =

• Any product in commerce site has images and these are called media
• To add any product to a commerce site, we have to create media with that image
• Hybris support media objects. Media item is a reference to any sort of physical file stored on local /
remote. It can be picture / text / flash / zip / …
• A media item in Hybris Commerce is not a physical file, but a reference to that file.
A media item has an URL that points to the location of the actual file. To reference a file in an SAP
Hybris Commerce application, you need to retrieve and use the media item's URL.

• A media is linked to only 1 file, but file can be linked to >1 media. A media item is defined by: -
Location on the disk or remote location Unique identifier URL
Folder Catalog version
Mime type Format
Media container Location hash
Meta data’s Security rules
• OOB Media type has multiple sub types for specialized objects like Impex, Log and Email.
• Medias are not localized, so have localized reference to medias. U need to declare an attribute this
way: localized:Media in items.xml file
• Hybris provides 2 OOB MediaStorageStrategy
o LocalFileMediaStorageStrategy = Default. Files stored along with Hybris under Data Directory
o S3MediaStorageStrategy = Files are stored within Amazon AWS S3 Buckets.
• Depending on media storage strategy, you need to select appropriate MediaURLStrategy, OOB have: -
o LocalMediaWebURLStrategy
o S3MediaURLStrategy
• Media can be created using different tools like HMC or via Impex.
→ hMC → Multimedia → Media
Unique Identifier = Enter the unique identifier for your media.
Catalog Versions = Enter the catalog version
Note If you do not mention catalog version of media same as the catalog version of product, media is
not linked to product.

Contact us for more information → chennareddytraining@gmail.com (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)


Media Format = It’s Media dimension. Select existing standard formats in drop down or you can also
create your own format. If you upload an image of 40*40, but use higher media format, it still accepts.
• Media formats & Media container = Media formats help you to server the same image in different (for
different contexts). Example: - Product Listing Page (PLP) you need small image, but Product Details
Page (PDP) you need bigger image. All these formats are loaded within “Media Container”.
OOB formats are: -

• Media Contexts = Hybris is multi-channel platform, you can load medias in different context (Mobile,
Desktop, and so on).
Media context is a mapping container, it maps source format to target format, so proper image is
loaded.
Secured Media (By default media access is not secure) → media.default.secured=false (Make it to True
to secure all media). If you want to secure only 1 folder then → media.folderName.secured=true
• Q: How to Search media that you have just created?
Use different filter options under Search. You can also select checkbox for Subtypes in Search option.
The following Search Criteria are shown in the following image −
Identifier Mime Type Folder Catalog Version
• Synchronization of Media Items
During synchronization of a catalog version, all the media items in the source catalog version are
copied. After synchronization, every media item is available twice: once in the source catalog version,
and once in the target catalog version.
However, the files referenced by media items will not be duplicated and are available only once.
Instead of creating an individual copy of a Media-item-referenced file in target catalog version, Media
item in target catalog version holds a reference to original file. The concept is similar to symbolic links.

Contact us for more information → chennareddytraining@gmail.com (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)


• Controlling Access Using Media Folders
Media Folders enable you to store individual media files in different directories on the file system.
Structuring media files in this way is an effective and at the same time simple approach to enable
access control for the contained media files. Since media folders pertain to media files, they do not
provide a logical grouping functionality for media items.
• Storing Media Files
Media files are stored in standard directories located in ${HYBRIS_DATA_DIR}/media directory in
structure of subfolders. You can enable this way of storing files for your custom MediaFolder and also
change the default depth of subfolders that are generated for each media file.
• Structuring Media Items = Hybris enables several means of grouping and structuring media items:
o Assigning a Media Format to media items to keep track of the format of the media
o Assigning multiple media to a Media Container to group the media logically
o Assigning multiple media formats to a Media Context to define a replacement list for media
formats in a given context

• Referencing Files of Media Items


Hybris differentiates between the following means of referencing files for media items:
o Using the MediaWeb for Media Storage and Web Requests section:
The file referenced by the media item is managed by the Hybris MediaWeb.
Where MediaWeb actually keeps the files, such as in MediaWeb itself, on the local computer,
on a network share is not significant in this case.
o Using an URL = Media items need to reference their file using a URL if the file is outside the
Hybris MediaWeb, such as:
▪ In an image database
▪ In a Media Asset Management system
▪ In the classpath of a JAR file
• Media URLs = URL of a media item is constructed differently. Depending if access to a media item is
secured or not:
Not secured URL pattern = ${server_address} : ${port} / localMediaWebRoot / realFileName ?context=
encodedMediaContext
http://localhost:9001/medias/someFile.jpg?context=NAYDCL3IGAZC6ZTPN4XGU4DHHI5DU4LXMVZHI6
JRGIZTINI.

Contact us for more information → chennareddytraining@gmail.com (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy