Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Tutorial 3 - CoreLookup

Tutorial 3 - CoreLookup

Introduction

In this tutorial, you will inspect an Email resource that uses core commands to obtain e-mail information from the Elastic Path Core.

Warning: Before you begin

Make sure your development environment has been properly set up as described in Setting up your Developer Environment.

Begin: Installing Cortex API Tutorials

Source files

The files created in this tutorial may be found in the tutorials zip under /Rest-Tutorials/rest-resource-corelookup directory.

rest-resource-corelookup has the following directory structure:

  • <artifact_id>
    • src
      • main
        • java
        • resources
          • OSGI-INF
            • blueprint
              • email-blueprint
              • springCtx-import
            • config
              • permission.properties
          • spring
            • applicationContext-corelookup-resource.xml
      • test
        • java
    • target
    • pom.xml

EmailDto.java

The Email data transfer object. It is used to wrap and propagate data from the core to the resource.

EmailDtoAssembler.java

The assembler responsible for creating EmailDtos.

GetEmailCommand.java and GetEmailCommandImpl.java

GetEmailCommand.java and GetEmailCommandImpl.java implements the method used to retrieve email information from the core.