Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is normally only one service class per app. The service class' job is to get data from the back end and perform some biz logic on it and return it to the front end (actions). There should be one service interface and one class that implements it, e.g. OasSkeletonService, and OasSkeletonServiceImpl. This allows us an easy method to swap the SAP implementation with a Mock implementation for testing purposes. See the applicationContext.xml for information on how to do this swapping.

For SAP apps, the service calls RFCs and converts their proxy data into biz model objects. The service class should be a subclass of SAPServiceSupport which provides methods to call the back end and process errors.

...

As long as the application service extends SAPServiceSupport which is in mortar, it does not have to handle error messages because the superclass handles them. See ApplicationResources for documentation on the error handling.