This documentation is not maintained. Please refer to doc.castsoftware.com/technologies to find the latest updates.


Summary: This document provides basic information about the extension providing support for analyzing JEE applications that use the SAP Hybris framework.

Extension ID

com.castsoftware.sap.hybris

What's new?

Please see SAP Hybris - 1.0 - Release Notes for more information.

In what situation should you install this extension?

If your application source code uses the SAP Hybris framework you should install this extension.

This extension provides support for the Hybris framework (java package com.hybris.ymkt.common.http). The analysis of your JEE application will be enriched with modelling of the HTTP API created with Spring MVC. This will allow the resolution of transactions starting in a client application which uses these API (web app for instance) to be traced into the backend application.

  • The extension creates Hybris HttpRequest services which represent end-points of transactions when they are not connected to an operation on an ABAP server side (analyzed by the ABAP analyzer).
  • JEE is acting here as the client of an ABAP server.

Application configuration

In an xml file present in a "resources" folder, we have beans with property name equal to "oDataService". The extension will focus on these particular beans, for example:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/aop
           http://www.springframework.org/schema/aop/spring-aop.xsd">
...
    <bean id="bookingDetailsODataService" parent="oDataServiceCRM">
        <property name="rootUrl" value="#{configurationService.configuration.getProperty('crm.odata.booking.url.root')}" />
    </bean>
    <bean id="bookingODataService"
        class="com.company.companyodata.service.impl.BookingODataServiceImpl" parent="AbstractODataService">
        <property name="oDataService" ref="bookingDetailsODataService" />
        <property name="modelService" ref="modelService"/>
    </bean>
....
</beans>

In this xml file, we can see that the "bookingODataService" bean has "oDataService" property ref equal to "bookingDetailsODataService" which corresponds to another bean whose "rootUrl" property is

"#{configurationService.configuration.getProperty('crm.odata.booking.url.root')}".

We can also see that this bean is connected to the "com.company.companyodata.service.impl.BookingODataSeviceImpl" java class. This url will be the root url of http services that the extension will create for the class "com.company.companyodata.service.impl.BookingODataSeviceImpl". This root url is defined through a property which can be found in a "project.properties" file - note that the "${CRM_ODATA_URL}" part will be removed from url:

...
crm.odata.booking.url.root=${CRM_ODATA_URL}/ZAPPOINTMENT_PLANNER_SRV/
...

Application analysis

The extension will take into account the following Java code:

package com.company.companyodata.service.impl;
 
import com.hybris.ymkt.common.http.HttpURLConnectionRequest;
import com.hybris.ymkt.common.http.HttpURLConnectionResponse;
 
public class BookingODataServiceImpl extends AbstractODataService implements BookingODataService
{
    public String createBookingServiceRequest(final CsTicketModel csTicketModel)
            throws IOException, EdmException, EntityProviderException
    {
        ...
        final URL url = getoDataService().createURL(companyodataConstants.BOOKING_HEADERSET);
        final HttpURLConnectionRequest request = new HttpURLConnectionRequest(companyodataConstants.HTTP_METHOD_POST,
                url);
        ...
    }
}

The extension focuses on "createUrl" and "HttpURLConnectionRequest" in order to create http resources. The "url" variable is evaluated and the url root (mentioned previously) is added to it as a prefix.

Below is an example of what is obtained after an analysis. The "Hybris Post Http Request service" has been created by the extension with the call link from the java method to the request service. The part on the right is created by the ABAP analyzer, and the link between the Hybris object and the ABAP operation is created by the web service linker:

Click to enlarge

Function Point, Quality and Sizing support

This extension provides the following support:

  • Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
  • Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
Function Points
(transactions)
Quality and Sizing
(tick)(error)

CAST AIP compatibility

This extension is compatible with:

CAST AIP release

Supported

8.3.x(tick)
8.2.x(tick)

Supported DBMS servers

This extension is compatible with the following DBMS servers:

CSSOracleMicrosoft
(tick)(error)(error)

Prerequisites

(tick)An installation of any compatible release of CAST AIP (see table above)

Dependencies with other extensions

Some CAST extensions require the presence of other CAST extensions in order to function correctly. The SAP Hybris extension requires that the following other CAST extensions are also installed:

Note that:

  • when using the CAST Extension Downloader to download the extension and the Manage Extensions interface in CAST Server Manager to install the extension, any dependent extensions are automatically downloaded and installed for you. You do not need to do anything.
  • the JEE Analyzer is not a dependency, but since this extension is always installed with AIP, you do not need to do anything.

Download and installation instructions

Please see:

The latest release status of this extension can be seen when downloading it from the CAST Extend server.

CAST Transaction Configuration Center (TCC) setup

If you are using the extension with CAST AIP ≥ 8.3.x, a SAP Hybris specific setup is automatically imported when the extension is installed. Various SAP Hybris specific Entry points, End Points, Data Entities and Excluded Items will be added:

Manual import action for CAST AIP ≤ 8.2.x

If you are using the extensions with CAST AIP ≤ 8.2.x, you can manually import the TCC setup, should you want to:

Show me how to do this...
  • Locate the .TCCSetup file in the extension folder: Configuration\TCC\Base_Java_Hyrbis.TCCSetup

  • In the CAST Transaction Configuration Center, ensure you have selected the Templates node:

  • This .TCCSetup file is to be imported into the CAST Transaction Calibration Center using either the:

    • File > Import Configuration menu option:

    • Or right clicking on the Template node and selecting Import Configuration:

  • The import of the "Base_Java_Hybris.TCCSetup" file will provide you with various SAP Hybris specific Entry points, End Points, Data Entities and Excluded Items will be added.
  • You can now re-use the definitions in any Applications you are working in the CAST Transaction Configuration Center.

Packaging, delivering and analyzing your source code

Once the extension is installed, no further configuration changes are required before you can package your source code and run an analysis. The process of packaging, delivering and analyzing your source code does not change in any way:

  • Package and deliver your application.
  • Analyze your delivered application source code.

Note that if your SAP Hybris resources (i.e. the configuration XML files) are present in a folder outside the WebContent folder, then following the packaging action in the CAST Delivery Manager Tool, you should investigate the corresponding JEE analysis units in the CAST Management Studio - check that in the Source Settings > Resources tab that there is an "include" entry in the "XML" section that points to a folder containing your resources:

Click to enlarge:

What results can you expect?

Objects

The following objects are displayed in CAST Enlighten:

IconDescription

HYBRIS Get HttpRequest service

HYBRIS Post HttpRequest service

HYBRIS Put HttpRequest service

HYBRIS Delete HttpRequest service

Transactions

Get, Post, Put and Delete HttpRequestService objects are transaction end-points except if they are calling an external object (an object belonging to a server: ABAP operation in this case).