Extension overview in SAP Commerce?

  • The hybris Commerce Suite is based on a flexible, modular concept that allows you to put new functionality into extensions.
  • An extension is an encapsulated piece of the hybris Commerce Suite that can contain business logic, type definitions, a web application, or a hybris Management Console (hMC) configuration. 
  • Because extensions are independent of one another by default, you can migrate an extension from one hybris Commerce Suite version to another.

Basic Structure of an Extension:

    An extension based on the yempty extension template contains the following directories and files:

Directory or File of a Blank Extension

Description

/.externalToolBuilders directory

Contains the Eclipse builder that automatically generates hybris Models if any extension's items.xml file has been modified in Eclipse.

/.settings directory

Contains configuration files for Eclipse in general and Eclipse-related Spring configuration files.

/lib directory

All external library files should be stored here.

/resources directory

Contains the $extension -items.xml file and the localization for the extension types (within the /localization subdirectory).

/src directory

Contains the source code files for the extension's core extension module.

/testsrc directory

JUnit test files for the extension are located here.

/web directory

This directory contains the web extension module parts of the extension (JSP files, libraries). Sources and resources from this directory are only accessible to a Web application containing the extension. They cannot be accessed from another extension.

.classpath file

Classpath file for Eclipse.

.pmd file

Control file for PMD with hybris specific settings.

.project file

Project file for Eclipse.

.ruleset file

Ruleset file for PMD with hybris-specific settings.

.springBeans file

Configuration for Spring IDE Eclipse plugin.

buildcallbacks.xml

Allows you to implement custom build framework logic.

extensioninfo.xml file

Configures the extension modules. This file is used by the build framework. It also determines which extensions are required for proper functioning.

project.properties file

Configuration properties for the extension.

external-dependencies file

Third party dependencies of Hybris Commerce extensions are defined here.

  • The directories and files above exist after the extension is generated (or after ant clean is run). During an extension build, some additional directories and files are created:

Directory or File of a Blank Extension

Description

platformhome.properties

Automatically generated file. It contains only the relative path to ${HYBRIS_BIN_DIR} /platform . Do not modify it.

extensioninfo.xsd

Copied from ${HYBRIS_BIN_DIR} /platform/resources/schemas . Allows validating the extensioninfo.xml file.

build.xml file

This build file calls the platform's build file for actual action and provides the necessary parameters to it. This way ant targets are consistent throughout the entire installation.

/classes directory

Contains all .class files for src , testsrc and gensrc folders of the extension.

 Checking Installed Extensions:

To check the installed extensions of the hybris Commerce Suite do the following:

  • Open the hybris Administration Console.
  • Go to the Platform tab and select Extensions option.
  • The Extensions page displays with list of all installed extensions

Extension Modules:

The following extension modules can be available per extension:

Extension Module

Contained Functionality

Core

Declarations and localizations of types, Jalo item classes

Hmc

hybris Management Console (hMC) configuration and localization for it, custom hybris Management Console elements, such as editors, tabs, display chips.

Web

Web application

 An extension is configured in the extensioninfo.xml file. It defines the following:

  • A list of extensions required for current extension. If the required extension does not exist in your installation, then the build of the hybris Commerce Suite fails.
  • A list of available extension modules with their configuration:
  • core extension module: Among other things, you can define whether item and extension classes will be generated or not.
  • web extension module: Among other things, you can define webroot of the Web application.
  •  hmc extension module

No comments:

Post a Comment