Declaring a Business Service Public Method

A public method is an operation that can be used by other classes and methods. The signature takes IContext, IConnection, and an internal value object and returns E1MessageList.

You can add additional public methods to a business service class by accessing the JDeveloper Code Templates and selecting E1SM – EnterpriseOne Business Service Method Call. This template generates code for a public method. You press Tab to move through the highlighted fields and complete the code. This template enforces methodology and gives you a head start for developing a new public method.

This code sample shows how to declare a public message:

public static E1MessageList  addAddressBook(IContext context, 
IConnection connection, InternalAddAddressBook internalVO){
       startInternalMethod(context, "addAddressBook", internalVO);
       // call BSFN AddressBookMBF
       E1MessageList messages = callAddressBookMasterMBF(context, 
connection, internalVO, programID); 
       finishInternalMethod(context, "addAddressBook");        
       return messages;
   }