View source | Discuss this page | Page history | Printable version   

Retail:How to customize Mobile Services

Overview

Bulbgraph.png   This feature is available starting from RR16Q2

Mobile Services are the different requests that a Web POS client can do to a Mobile Server. Each module can define its own service. Since 16Q2 release it is possible to have different implementors for a Mobile Service. In this how to it is explained how to add new implementors and how to ensure that they are sorted as desired.

How to add a new Mobile Service implementor

The Java class implementing the service must extend the abstract class SecuredJSONProcess or one of its children. To identify the Mobile Service that it is implementing it is needed to add the MobileServiceQualifier annotation and declare the service name:

@MobileServiceQualifier(serviceName = "org.openbravo.retail.posterminal.master.BusinessPartner")

To determine the order of the available classes implementing the service name it is required to override the getPriority() method. This method returns a integer where lower values mean higher priority. It is also possible to define if it is required to execute the next available implementor by overriding the methods executeNextServiceClass() or executeNextServiceClassOnFailure(). By default all Services provided by Openbravo have a priority of 100 and do not call next implementor on any case.

Retrieved from "http://wiki.openbravo.com/wiki/Retail:How_to_customize_Mobile_Services"

This page has been accessed 2,119 times. This page was last modified on 22 February 2016, at 16:35. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.